diff --git a/packages/ambassador-council/deployments/optimistic-mainnet/official/2023-12-18-00.json b/packages/ambassador-council/deployments/optimistic-mainnet/official/2023-12-18-00.json new file mode 100644 index 0000000000..1341b6c8f3 --- /dev/null +++ b/packages/ambassador-council/deployments/optimistic-mainnet/official/2023-12-18-00.json @@ -0,0 +1,90 @@ +{ + "properties": { + "completed": true, + "totalGasUsed": "5631486" + }, + "transactions": { + "0x9ce2ac5f24820d9cbcfa8a488049a4d287161eb49ffe58c5028fed6df2ec754f": { + "status": "confirmed", + "block": 113670489, + "description": "Deployment of contracts/modules/ElectionModule.sol:ElectionModule" + }, + "0xf08a430e4747ea76107992f3a3fbb328402a3778e41d1a1ee36695f19ef08712": { + "status": "confirmed", + "block": 113670498, + "description": "Deployment of contracts/Router.sol:Router" + } + }, + "contracts": { + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": { + "deployedAddress": "0x6EABf41D76756D6973DFd3D034333D4F4FFd5B4e", + "deployTransaction": "0xa73cdbcd381aea2f7f0e3acd901d1b3e1157a714fb8de25a7c96f942a58b9a36", + "isModule": true, + "deployedBytecodeHash": "0x1480c7a338366f52aa5d5edb9181e25dc7eefbdb1e7ab7447580d325fe9c7fc8", + "contractFullyQualifiedName": "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule", + "contractName": "ElectionInspectorModule", + "sourceName": "contracts/modules/ElectionInspectionModule.sol", + "deploymentBlock": 90347307, + "deploymentCommit": "04fea879760768de665ce4962aa381d67d6024b6", + "proxyAddress": "0x37fAc8c146889333734015B0C942b620aCfeeff8" + }, + "contracts/modules/ElectionModule.sol:ElectionModule": { + "deployedAddress": "0xB5e9F6Be3A03F881018E51b59A2B1f2856D181fE", + "deployTransaction": "0x9ce2ac5f24820d9cbcfa8a488049a4d287161eb49ffe58c5028fed6df2ec754f", + "isModule": true, + "deployedBytecodeHash": "0x23f7d5ec07a95228bb2fdb862b484ee783377f724f5043a02d7efc23eb2e518d", + "contractFullyQualifiedName": "contracts/modules/ElectionModule.sol:ElectionModule", + "contractName": "ElectionModule", + "sourceName": "contracts/modules/ElectionModule.sol", + "deploymentBlock": 113670489, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67", + "proxyAddress": "0x37fAc8c146889333734015B0C942b620aCfeeff8" + }, + "contracts/modules/OwnerModule.sol:OwnerModule": { + "deployedAddress": "0x45eFa1587820488b4f3c0F06a08b3aA871E7B42C", + "deployTransaction": "0xa1b5a8ec378c742acb7810bdc600ce6d257c4f69f45bf3fdf7f964549030eff4", + "isModule": true, + "deployedBytecodeHash": "0xfa5f32d34a9b72a207fe290a3bf7e6b506da8df11503cbd781d4a0e85e99fa75", + "contractFullyQualifiedName": "contracts/modules/OwnerModule.sol:OwnerModule", + "contractName": "OwnerModule", + "sourceName": "contracts/modules/OwnerModule.sol", + "deploymentBlock": 9312923, + "deploymentCommit": "4db77155f427aa4956322e76f55a4a51f80ccd62", + "proxyAddress": "0x37fAc8c146889333734015B0C942b620aCfeeff8" + }, + "contracts/modules/UpgradeModule.sol:UpgradeModule": { + "deployedAddress": "0x028Cc633432a98b42e05A1175Ae9c19EFBb88237", + "deployTransaction": "0xa47eecb51ad59a4389fa50e3cecddcac9549180e8443017b2d4b03bb7dcbe84b", + "isModule": true, + "deployedBytecodeHash": "0xb0900efdf426a3b3737cd397b332e658d9cc4155b64d64965a40b3324676d56b", + "contractFullyQualifiedName": "contracts/modules/UpgradeModule.sol:UpgradeModule", + "contractName": "UpgradeModule", + "sourceName": "contracts/modules/UpgradeModule.sol", + "deploymentBlock": 9312927, + "deploymentCommit": "4db77155f427aa4956322e76f55a4a51f80ccd62", + "proxyAddress": "0x37fAc8c146889333734015B0C942b620aCfeeff8" + }, + "contracts/AmbassadorCouncil.sol:AmbassadorCouncil": { + "deployedAddress": "0x37fAc8c146889333734015B0C942b620aCfeeff8", + "deployTransaction": "0xdd35bbf8532b0d38cefc33f000734609abf0e156b559e58d6a045abe3e11e295", + "isProxy": true, + "deployedBytecodeHash": "0xeab14b3ba2135da255874fc3077925d3858c000c4344de263819d2c2a9107141", + "contractFullyQualifiedName": "contracts/AmbassadorCouncil.sol:AmbassadorCouncil", + "contractName": "AmbassadorCouncil", + "sourceName": "contracts/AmbassadorCouncil.sol", + "deploymentBlock": 9312941, + "deploymentCommit": "4db77155f427aa4956322e76f55a4a51f80ccd62" + }, + "contracts/Router.sol:Router": { + "deployedAddress": "0xbcDC2124ACb0FDcf6C2Cb5AD06b2f95D8D55839f", + "deployTransaction": "0xf08a430e4747ea76107992f3a3fbb328402a3778e41d1a1ee36695f19ef08712", + "isRouter": true, + "deployedBytecodeHash": "0x6095cf83120fb7db79bbe4175e9b42160fa9556eb6ce09c120539b365d43d09d", + "contractFullyQualifiedName": "contracts/Router.sol:Router", + "contractName": "Router", + "sourceName": "contracts/Router.sol", + "deploymentBlock": 113670498, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67" + } + } +} \ No newline at end of file diff --git a/packages/ambassador-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json b/packages/ambassador-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json new file mode 100644 index 0000000000..2226266239 --- /dev/null +++ b/packages/ambassador-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json @@ -0,0 +1,13443 @@ +{ + "@synthetixio/core-contracts/contracts/errors/AccessError.sol:AccessError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/AddressError.sol:AddressError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol:ArrayError": [ + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol:ChangeError": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/InitError.sol:InitError": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol:InitializableMixin": [], + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol:IERC165": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol:IERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol:IERC721Metadata": [ + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol:IERC721Receiver": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol:IOwnable": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol:IUUPSImplementation": [ + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol:Ownable": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol:OwnableMixin": [], + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol:OwnableStorage": [], + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol:AbstractProxy": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol:ProxyStorage": [], + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol:UUPSImplementation": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol:UUPSProxy": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721.sol:ERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol:ERC721Storage": [], + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol:AddressUtil": [], + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol:MathUtil": [], + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol:MerkleProof": [], + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol:SetUtil": [ + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol:StringUtil": [], + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol:IElectionInspectorModule": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol:IElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol:IOwnerModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol:ElectionStorage": [], + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol:ElectionBase": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol:ElectionCredentials": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol:ElectionSchedule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol:ElectionTally": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol:ElectionVotes": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol:CouncilToken": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "TokenIsNotTransferable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "tokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol:ICrossDomainMessenger": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "gasLimit", + "type": "uint32" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol:IDebtShare": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "periodId", + "type": "uint256" + } + ], + "name": "balanceOfOnPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol:ISynthetixElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDebtShareContractAddress", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol:DebtShareStorage": [], + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol:CrossChainDebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol:DebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "contracts/AmbassadorCouncil.sol:AmbassadorCouncil": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/Router.sol:Router": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "sel", + "type": "bytes4" + } + ], + "name": "UnknownSelector", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/packages/ambassador-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json b/packages/ambassador-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json new file mode 100644 index 0000000000..2432e13958 --- /dev/null +++ b/packages/ambassador-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json @@ -0,0 +1,98749 @@ +{ + "contracts/AmbassadorCouncil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\n\ncontract AmbassadorCouncil is UUPSProxy {\n // solhint-disable-next-line no-empty-blocks\n constructor(address firstImplementation) UUPSProxy(firstImplementation) {}\n}\n", + "ast": { + "absolutePath": "contracts/AmbassadorCouncil.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "AmbassadorCouncil": [ + 7144 + ], + "ProxyStorage": [ + 542 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 7145, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7131, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:46" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 7132, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7145, + "sourceUnit": 817, + "src": "56:67:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7133, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "155:9:46" + }, + "id": 7134, + "nodeType": "InheritanceSpecifier", + "src": "155:9:46" + } + ], + "canonicalName": "AmbassadorCouncil", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7144, + "linearizedBaseContracts": [ + 7144, + 816, + 542, + 526 + ], + "name": "AmbassadorCouncil", + "nameLocation": "134:17:46", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 7142, + "nodeType": "Block", + "src": "292:2:46", + "statements": [] + }, + "id": 7143, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "id": 7139, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7136, + "src": "271:19:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7140, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 7138, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "261:9:46" + }, + "nodeType": "ModifierInvocation", + "src": "261:30:46" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7136, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "240:19:46", + "nodeType": "VariableDeclaration", + "scope": 7143, + "src": "232:27:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "232:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "231:29:46" + }, + "returnParameters": { + "id": 7141, + "nodeType": "ParameterList", + "parameters": [], + "src": "292:0:46" + }, + "scope": 7144, + "src": "220:74:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 7145, + "src": "125:171:46", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:266:46" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./AbstractProxy.sol\";\nimport \"./ProxyStorage.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../utils/AddressUtil.sol\";\n\ncontract UUPSProxy is AbstractProxy, ProxyStorage {\n constructor(address firstImplementation) {\n if (firstImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(firstImplementation)) {\n revert AddressError.NotAContract(firstImplementation);\n }\n\n _proxyStore().implementation = firstImplementation;\n }\n\n function _getImplementation() internal view virtual override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ProxyStorage": [ + 542 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 817, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 758, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:18" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "file": "./AbstractProxy.sol", + "id": 759, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 527, + "src": "56:29:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 760, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 543, + "src": "86:28:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 761, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 16, + "src": "115:36:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 762, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 1697, + "src": "152:34:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 763, + "name": "AbstractProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 526, + "src": "210:13:18" + }, + "id": 764, + "nodeType": "InheritanceSpecifier", + "src": "210:13:18" + }, + { + "baseName": { + "id": 765, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "225:12:18" + }, + "id": 766, + "nodeType": "InheritanceSpecifier", + "src": "225:12:18" + } + ], + "canonicalName": "UUPSProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 816, + "linearizedBaseContracts": [ + 816, + 542, + 526 + ], + "name": "UUPSProxy", + "nameLocation": "197:9:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 803, + "nodeType": "Block", + "src": "285:312:18", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 771, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "299:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "322:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 772, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "322:7:18", + "typeDescriptions": {} + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "322:10:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "299:33:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 783, + "nodeType": "IfStatement", + "src": "295:97:18", + "trueBody": { + "id": 782, + "nodeType": "Block", + "src": "334:58:18", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 777, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "355:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "355:24:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "355:26:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 781, + "nodeType": "RevertStatement", + "src": "348:33:18" + } + ] + } + }, + { + "condition": { + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "406:44:18", + "subExpression": { + "arguments": [ + { + "id": 786, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "430:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 784, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "407:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "407:22:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "407:43:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 796, + "nodeType": "IfStatement", + "src": "402:128:18", + "trueBody": { + "id": 795, + "nodeType": "Block", + "src": "452:78:18", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 792, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "499:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 789, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "473:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "473:25:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:46:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 794, + "nodeType": "RevertStatement", + "src": "466:53:18" + } + ] + } + }, + { + "expression": { + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 797, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "540:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "540:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "540:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 800, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "571:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "540:50:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 802, + "nodeType": "ExpressionStatement", + "src": "540:50:18" + } + ] + }, + "id": 804, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "264:19:18", + "nodeType": "VariableDeclaration", + "scope": 804, + "src": "256:27:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "255:29:18" + }, + "returnParameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [], + "src": "285:0:18" + }, + "scope": 816, + "src": "244:353:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 525 + ], + "body": { + "id": 814, + "nodeType": "Block", + "src": "682:52:18", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 810, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "699:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "699:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 812, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "699:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 809, + "id": 813, + "nodeType": "Return", + "src": "692:35:18" + } + ] + }, + "id": 815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "612:18:18", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 806, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "655:8:18" + }, + "parameters": { + "id": 805, + "nodeType": "ParameterList", + "parameters": [], + "src": "630:2:18" + }, + "returnParameters": { + "id": 809, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 808, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 815, + "src": "673:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "673:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "672:9:18" + }, + "scope": 816, + "src": "603:131:18", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 817, + "src": "188:548:18", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:706:18" + } + }, + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nabstract contract AbstractProxy {\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n address implementation = _getImplementation();\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _getImplementation() internal view virtual returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ] + }, + "id": 527, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 496, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:15" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "AbstractProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 526, + "linearizedBaseContracts": [ + 526 + ], + "name": "AbstractProxy", + "nameLocation": "74:13:15", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "122:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 499, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "132:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "132:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "132:10:15" + } + ] + }, + "id": 503, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 497, + "nodeType": "ParameterList", + "parameters": [], + "src": "102:2:15" + }, + "returnParameters": { + "id": 498, + "nodeType": "ParameterList", + "parameters": [], + "src": "122:0:15" + }, + "scope": 526, + "src": "94:55:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "182:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 506, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "192:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "192:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 508, + "nodeType": "ExpressionStatement", + "src": "192:10:15" + } + ] + }, + "id": 510, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 504, + "nodeType": "ParameterList", + "parameters": [], + "src": "162:2:15" + }, + "returnParameters": { + "id": 505, + "nodeType": "ParameterList", + "parameters": [], + "src": "182:0:15" + }, + "scope": 526, + "src": "155:54:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 519, + "nodeType": "Block", + "src": "244:521:15", + "statements": [ + { + "assignments": [ + 514 + ], + "declarations": [ + { + "constant": false, + "id": 514, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "262:14:15", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "254:22:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "254:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 517, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 515, + "name": "_getImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "279:18:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "279:20:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "254:45:15" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "375:384:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "402:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "405:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "408:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "408:14:15" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "389:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "389:34:15" + }, + "nodeType": "YulExpressionStatement", + "src": "389:34:15" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "437:74:15", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "464:3:15" + }, + "nodeType": "YulFunctionCall", + "src": "464:5:15" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "471:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "487:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "490:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "490:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "506:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "509:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "451:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "451:60:15" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "441:6:15", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "540:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "543:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "546:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "546:16:15" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "525:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "525:38:15" + }, + "nodeType": "YulExpressionStatement", + "src": "525:38:15" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "610:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "635:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "638:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "638:16:15" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "628:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "628:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "628:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "603:66:15", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "608:1:15", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "690:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "715:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "718:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "718:16:15" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "708:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "708:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "708:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "682:67:15", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "584:6:15" + }, + "nodeType": "YulSwitch", + "src": "577:172:15" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 514, + "isOffset": false, + "isSlot": false, + "src": "471:14:15", + "valueSize": 1 + } + ], + "id": 518, + "nodeType": "InlineAssembly", + "src": "366:393:15" + } + ] + }, + "id": 520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "224:8:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "232:2:15" + }, + "returnParameters": { + "id": 512, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:0:15" + }, + "scope": 526, + "src": "215:550:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 525, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "780:18:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 521, + "nodeType": "ParameterList", + "parameters": [], + "src": "798:2:15" + }, + "returnParameters": { + "id": 524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 525, + "src": "832:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "832:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "831:9:15" + }, + "scope": 526, + "src": "771:70:15", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 527, + "src": "56:787:15", + "usedErrors": [] + } + ], + "src": "31:813:15" + } + }, + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ProxyStorage {\n struct ProxyStore {\n address implementation;\n bool simulatingUpgrade;\n }\n\n function _proxyStore() internal pure returns (ProxyStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.v3.proxy\")) - 1)\n store.slot := 0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "exportedSymbols": { + "ProxyStorage": [ + 542 + ] + }, + "id": 543, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 528, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:16" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ProxyStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 542, + "linearizedBaseContracts": [ + 542 + ], + "name": "ProxyStorage", + "nameLocation": "65:12:16", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ProxyStorage.ProxyStore", + "id": 533, + "members": [ + { + "constant": false, + "id": 530, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "120:14:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "112:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "112:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 532, + "mutability": "mutable", + "name": "simulatingUpgrade", + "nameLocation": "149:17:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "144:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 531, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "144:4:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "name": "ProxyStore", + "nameLocation": "91:10:16", + "nodeType": "StructDefinition", + "scope": 542, + "src": "84:89:16", + "visibility": "public" + }, + { + "body": { + "id": 540, + "nodeType": "Block", + "src": "251:198:16", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "270:173:16", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "353:80:16", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "367:66:16", + "type": "", + "value": "0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "353:10:16" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 537, + "isOffset": false, + "isSlot": true, + "src": "353:10:16", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 539, + "nodeType": "InlineAssembly", + "src": "261:182:16" + } + ] + }, + "id": 541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_proxyStore", + "nameLocation": "188:11:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:16" + }, + "returnParameters": { + "id": 538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 537, + "mutability": "mutable", + "name": "store", + "nameLocation": "244:5:16", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "225:24:16", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 536, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 535, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "225:10:16" + }, + "referencedDeclaration": 533, + "src": "225:10:16", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "src": "224:26:16" + }, + "scope": 542, + "src": "179:270:16", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 543, + "src": "56:395:16", + "usedErrors": [] + } + ], + "src": "31:421:16" + } + }, + "@synthetixio/core-contracts/contracts/errors/AddressError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressError {\n error ZeroAddress();\n error NotAContract(address contr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ] + }, + "id": 16, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:1" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 15, + "linearizedBaseContracts": [ + 15 + ], + "name": "AddressError", + "nameLocation": "64:12:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 10, + "name": "ZeroAddress", + "nameLocation": "89:11:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "100:2:1" + }, + "src": "83:20:1" + }, + { + "id": 14, + "name": "NotAContract", + "nameLocation": "114:12:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12, + "mutability": "mutable", + "name": "contr", + "nameLocation": "135:5:1", + "nodeType": "VariableDeclaration", + "scope": 14, + "src": "127:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "127:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "126:15:1" + }, + "src": "108:34:1" + } + ], + "scope": 16, + "src": "56:88:1", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:114:1" + } + }, + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressUtil {\n function isContract(address account) internal view returns (bool) {\n uint256 size;\n\n assembly {\n size := extcodesize(account)\n }\n\n return size > 0;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "exportedSymbols": { + "AddressUtil": [ + 1696 + ] + }, + "id": 1697, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1679, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:21" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1696, + "linearizedBaseContracts": [ + 1696 + ], + "name": "AddressUtil", + "nameLocation": "64:11:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1694, + "nodeType": "Block", + "src": "148:126:21", + "statements": [ + { + "assignments": [ + 1687 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "size", + "nameLocation": "166:4:21", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "158:12:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "158:7:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1688, + "nodeType": "VariableDeclarationStatement", + "src": "158:12:21" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "190:52:21", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "204:28:21", + "value": { + "arguments": [ + { + "name": "account", + "nodeType": "YulIdentifier", + "src": "224:7:21" + } + ], + "functionName": { + "name": "extcodesize", + "nodeType": "YulIdentifier", + "src": "212:11:21" + }, + "nodeType": "YulFunctionCall", + "src": "212:20:21" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "204:4:21" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1681, + "isOffset": false, + "isSlot": false, + "src": "224:7:21", + "valueSize": 1 + }, + { + "declaration": 1687, + "isOffset": false, + "isSlot": false, + "src": "204:4:21", + "valueSize": 1 + } + ], + "id": 1689, + "nodeType": "InlineAssembly", + "src": "181:61:21" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1690, + "name": "size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "259:4:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "266:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "259:8:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1685, + "id": 1693, + "nodeType": "Return", + "src": "252:15:21" + } + ] + }, + "id": 1695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isContract", + "nameLocation": "91:10:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1681, + "mutability": "mutable", + "name": "account", + "nameLocation": "110:7:21", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "102:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "101:17:21" + }, + "returnParameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "142:4:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "142:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "141:6:21" + }, + "scope": 1696, + "src": "82:192:21", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1697, + "src": "56:220:21", + "usedErrors": [] + } + ], + "src": "31:246:21" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ArrayError.sol\";\nimport \"../../tokens/CouncilToken.sol\";\nimport \"./ElectionBase.sol\";\n\n/// @dev Core functionality for keeping track of council members with an NFT token\ncontract ElectionCredentials is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _createCouncilToken(string memory tokenName, string memory tokenSymbol) internal {\n CouncilToken implementation = new CouncilToken();\n\n UUPSProxy proxy = new UUPSProxy(address(implementation));\n\n CouncilToken token = CouncilToken(address(proxy));\n\n token.nominateNewOwner(address(this));\n token.acceptOwnership();\n\n token.initialize(tokenName, tokenSymbol);\n\n _electionStore().councilToken = address(token);\n\n emit CouncilTokenCreated(address(proxy), address(implementation));\n }\n\n function _removeAllCouncilMembers(uint epochIndex) internal {\n SetUtil.AddressSet storage members = _electionStore().councilMembers;\n\n uint numMembers = members.length();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n // Always removes the first element in the array\n // until none are left.\n _removeCouncilMember(members.valueAt(1), epochIndex);\n }\n }\n\n function _addCouncilMembers(address[] memory membersToAdd, uint epochIndex) internal {\n uint numMembers = membersToAdd.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _addCouncilMember(membersToAdd[memberIndex], epochIndex);\n }\n }\n\n function _removeCouncilMembers(address[] memory membersToRemove, uint epochIndex) internal {\n uint numMembers = membersToRemove.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _removeCouncilMember(membersToRemove[memberIndex], epochIndex);\n }\n }\n\n function _addCouncilMember(address newMember, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (members.contains(newMember)) {\n revert AlreadyACouncilMember();\n }\n\n members.add(newMember);\n\n // Note that tokenId = 0 will not be used.\n uint tokenId = members.length();\n _getCouncilToken().mint(newMember, tokenId);\n\n store.councilTokenIds[newMember] = tokenId;\n\n emit CouncilMemberAdded(newMember, epochIndex);\n }\n\n function _removeCouncilMember(address member, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (!members.contains(member)) {\n revert NotACouncilMember();\n }\n\n members.remove(member);\n\n uint tokenId = _getCouncilMemberTokenId(member);\n _getCouncilToken().burn(tokenId);\n\n // tokenId = 0 means no associated token.\n store.councilTokenIds[member] = 0;\n\n emit CouncilMemberRemoved(member, epochIndex);\n }\n\n function _getCouncilToken() private view returns (CouncilToken) {\n return CouncilToken(_electionStore().councilToken);\n }\n\n function _getCouncilMemberTokenId(address member) private view returns (uint) {\n uint tokenId = _electionStore().councilTokenIds[member];\n\n if (tokenId == 0) revert NotACouncilMember();\n\n return tokenId;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionStorage": [ + 4331 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 5066, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4685, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:35" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 4686, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 817, + "src": "56:67:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "id": 4687, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 21, + "src": "124:69:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "file": "../../tokens/CouncilToken.sol", + "id": 4688, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 6380, + "src": "194:39:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 4689, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 4684, + "src": "234:28:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4691, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "379:12:35" + }, + "id": 4692, + "nodeType": "InheritanceSpecifier", + "src": "379:12:35" + } + ], + "canonicalName": "ElectionCredentials", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4690, + "nodeType": "StructuredDocumentation", + "src": "264:83:35", + "text": "@dev Core functionality for keeping track of council members with an NFT token" + }, + "fullyImplemented": true, + "id": 5065, + "linearizedBaseContracts": [ + 5065, + 4683, + 4331 + ], + "name": "ElectionCredentials", + "nameLocation": "356:19:35", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4696, + "libraryName": { + "id": 4693, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "404:7:35" + }, + "nodeType": "UsingForDirective", + "src": "398:37:35", + "typeName": { + "id": 4695, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4694, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "416:18:35" + }, + "referencedDeclaration": 1788, + "src": "416:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 4774, + "nodeType": "Block", + "src": "531:457:35", + "statements": [ + { + "assignments": [ + 4705 + ], + "declarations": [ + { + "constant": false, + "id": 4705, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "554:14:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "541:27:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4704, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4703, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "541:12:35" + }, + "referencedDeclaration": 6379, + "src": "541:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "571:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () returns (contract CouncilToken)" + }, + "typeName": { + "id": 4707, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4706, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "575:12:35" + }, + "referencedDeclaration": 6379, + "src": "575:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + }, + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "571:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "541:48:35" + }, + { + "assignments": [ + 4713 + ], + "declarations": [ + { + "constant": false, + "id": 4713, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "610:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "600:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + }, + "typeName": { + "id": 4712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4711, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "600:9:35" + }, + "referencedDeclaration": 816, + "src": "600:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "visibility": "internal" + } + ], + "id": 4722, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4719, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "640:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "632:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:35", + "typeDescriptions": {} + } + }, + "id": 4720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "618:13:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_UUPSProxy_$816_$", + "typeString": "function (address) returns (contract UUPSProxy)" + }, + "typeName": { + "id": 4715, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4714, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "622:9:35" + }, + "referencedDeclaration": 816, + "src": "622:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + }, + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "618:38:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "600:56:35" + }, + { + "assignments": [ + 4725 + ], + "declarations": [ + { + "constant": false, + "id": 4725, + "mutability": "mutable", + "name": "token", + "nameLocation": "680:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "667:18:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4724, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4723, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "667:12:35" + }, + "referencedDeclaration": 6379, + "src": "667:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4732, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4729, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "709:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "701:7:35", + "typeDescriptions": {} + } + }, + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4726, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "688:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 4731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "688:28:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "667:49:35" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4738, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "758:4:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + ], + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "750:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "750:7:35", + "typeDescriptions": {} + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "750:13:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4733, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "727:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "nominateNewOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 359, + "src": "727:22:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "727:37:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4741, + "nodeType": "ExpressionStatement", + "src": "727:37:35" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4742, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "774:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 310, + "src": "774:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "774:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4746, + "nodeType": "ExpressionStatement", + "src": "774:23:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4750, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4698, + "src": "825:9:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 4751, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4700, + "src": "836:11:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 4747, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "808:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 6308, + "src": "808:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory) external" + } + }, + "id": 4752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "808:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4753, + "nodeType": "ExpressionStatement", + "src": "808:40:35" + }, + { + "expression": { + "id": 4761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4754, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "859:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "859:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "859:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4759, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "899:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "891:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:35", + "typeDescriptions": {} + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "891:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "859:46:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4762, + "nodeType": "ExpressionStatement", + "src": "859:46:35" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 4766, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "949:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "941:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "941:7:35", + "typeDescriptions": {} + } + }, + "id": 4767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "941:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 4770, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "965:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "957:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "957:7:35", + "typeDescriptions": {} + } + }, + "id": 4771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "957:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4763, + "name": "CouncilTokenCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4390, + "src": "921:19:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:60:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4773, + "nodeType": "EmitStatement", + "src": "916:65:35" + } + ] + }, + "id": 4775, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createCouncilToken", + "nameLocation": "450:19:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4698, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "484:9:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "470:23:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "470:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4700, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "509:11:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "495:25:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4699, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "495:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "469:52:35" + }, + "returnParameters": { + "id": 4702, + "nodeType": "ParameterList", + "parameters": [], + "src": "531:0:35" + }, + "scope": 5065, + "src": "441:547:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4815, + "nodeType": "Block", + "src": "1054:382:35", + "statements": [ + { + "assignments": [ + 4784 + ], + "declarations": [ + { + "constant": false, + "id": 4784, + "mutability": "mutable", + "name": "members", + "nameLocation": "1091:7:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1064:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4783, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4782, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1064:18:35" + }, + "referencedDeclaration": 1788, + "src": "1064:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4788, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4785, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1101:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1101:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "1101:31:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1064:68:35" + }, + { + "assignments": [ + 4790 + ], + "declarations": [ + { + "constant": false, + "id": 4790, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1148:10:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1143:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1143:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4794, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1161:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "1161:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1161:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1143:34:35" + }, + { + "body": { + "id": 4813, + "nodeType": "Block", + "src": "1256:174:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "31", + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1404:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 4806, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1388:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "1388:15:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1388:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4810, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4777, + "src": "1408:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4805, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "1367:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1367:52:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4812, + "nodeType": "ExpressionStatement", + "src": "1367:52:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4799, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1215:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4800, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4790, + "src": "1229:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1215:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4814, + "initializationExpression": { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1198:11:35", + "nodeType": "VariableDeclaration", + "scope": 4814, + "src": "1193:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4795, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1193:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4798, + "initialValue": { + "hexValue": "30", + "id": 4797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1212:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1193:20:35" + }, + "loopExpression": { + "expression": { + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1241:13:35", + "subExpression": { + "id": 4802, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1241:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4804, + "nodeType": "ExpressionStatement", + "src": "1241:13:35" + }, + "nodeType": "ForStatement", + "src": "1188:242:35" + } + ] + }, + "id": 4816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeAllCouncilMembers", + "nameLocation": "1003:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4777, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1033:10:35", + "nodeType": "VariableDeclaration", + "scope": 4816, + "src": "1028:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1028:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1027:17:35" + }, + "returnParameters": { + "id": 4779, + "nodeType": "ParameterList", + "parameters": [], + "src": "1054:0:35" + }, + "scope": 5065, + "src": "994:442:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4857, + "nodeType": "Block", + "src": "1527:274:35", + "statements": [ + { + "assignments": [ + 4825 + ], + "declarations": [ + { + "constant": false, + "id": 4825, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1542:10:35", + "nodeType": "VariableDeclaration", + "scope": 4857, + "src": "1537:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1537:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4828, + "initialValue": { + "expression": { + "id": 4826, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1555:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1555:19:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1537:37:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4829, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1588:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1602:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1588:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4837, + "nodeType": "IfStatement", + "src": "1584:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4832, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1612:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1612:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1612:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4836, + "nodeType": "RevertStatement", + "src": "1605:30:35" + } + }, + { + "body": { + "id": 4855, + "nodeType": "Block", + "src": "1714:81:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4849, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1746:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4851, + "indexExpression": { + "id": 4850, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1759:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1746:25:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4852, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4821, + "src": "1773:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4848, + "name": "_addCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4963, + "src": "1728:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:56:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4854, + "nodeType": "ExpressionStatement", + "src": "1728:56:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4842, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1673:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4843, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1687:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1673:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4856, + "initializationExpression": { + "assignments": [ + 4839 + ], + "declarations": [ + { + "constant": false, + "id": 4839, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1656:11:35", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "1651:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1651:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4841, + "initialValue": { + "hexValue": "30", + "id": 4840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1670:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1651:20:35" + }, + "loopExpression": { + "expression": { + "id": 4846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1699:13:35", + "subExpression": { + "id": 4845, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1699:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4847, + "nodeType": "ExpressionStatement", + "src": "1699:13:35" + }, + "nodeType": "ForStatement", + "src": "1646:149:35" + } + ] + }, + "id": 4858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMembers", + "nameLocation": "1451:18:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4819, + "mutability": "mutable", + "name": "membersToAdd", + "nameLocation": "1487:12:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1470:29:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1470:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4818, + "nodeType": "ArrayTypeName", + "src": "1470:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4821, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1506:10:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1501:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4820, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1501:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1469:48:35" + }, + "returnParameters": { + "id": 4823, + "nodeType": "ParameterList", + "parameters": [], + "src": "1527:0:35" + }, + "scope": 5065, + "src": "1442:359:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4899, + "nodeType": "Block", + "src": "1898:283:35", + "statements": [ + { + "assignments": [ + 4867 + ], + "declarations": [ + { + "constant": false, + "id": 4867, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1913:10:35", + "nodeType": "VariableDeclaration", + "scope": 4899, + "src": "1908:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4866, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4870, + "initialValue": { + "expression": { + "id": 4868, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "1926:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1926:22:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1908:40:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4871, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "1962:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1962:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4879, + "nodeType": "IfStatement", + "src": "1958:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4874, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1986:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1986:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4878, + "nodeType": "RevertStatement", + "src": "1979:30:35" + } + }, + { + "body": { + "id": 4897, + "nodeType": "Block", + "src": "2088:87:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4891, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "2123:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4893, + "indexExpression": { + "id": 4892, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2139:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2123:28:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4894, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4863, + "src": "2153:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4890, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "2102:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:62:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4896, + "nodeType": "ExpressionStatement", + "src": "2102:62:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4884, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2047:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4885, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "2061:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2047:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4898, + "initializationExpression": { + "assignments": [ + 4881 + ], + "declarations": [ + { + "constant": false, + "id": 4881, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "2030:11:35", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "2025:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4880, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2025:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4883, + "initialValue": { + "hexValue": "30", + "id": 4882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2044:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2025:20:35" + }, + "loopExpression": { + "expression": { + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2073:13:35", + "subExpression": { + "id": 4887, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2073:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4889, + "nodeType": "ExpressionStatement", + "src": "2073:13:35" + }, + "nodeType": "ForStatement", + "src": "2020:155:35" + } + ] + }, + "id": 4900, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMembers", + "nameLocation": "1816:21:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4861, + "mutability": "mutable", + "name": "membersToRemove", + "nameLocation": "1855:15:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1838:32:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1838:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4860, + "nodeType": "ArrayTypeName", + "src": "1838:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1877:10:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1872:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1872:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1837:51:35" + }, + "returnParameters": { + "id": 4865, + "nodeType": "ParameterList", + "parameters": [], + "src": "1898:0:35" + }, + "scope": 5065, + "src": "1807:374:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4962, + "nodeType": "Block", + "src": "2259:517:35", + "statements": [ + { + "assignments": [ + 4909 + ], + "declarations": [ + { + "constant": false, + "id": 4909, + "mutability": "mutable", + "name": "store", + "nameLocation": "2291:5:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2269:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4908, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4907, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2269:13:35" + }, + "referencedDeclaration": 4246, + "src": "2269:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4912, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4910, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2299:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2299:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2269:46:35" + }, + { + "assignments": [ + 4917 + ], + "declarations": [ + { + "constant": false, + "id": 4917, + "mutability": "mutable", + "name": "members", + "nameLocation": "2352:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2325:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4916, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4915, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2325:18:35" + }, + "referencedDeclaration": 1788, + "src": "2325:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4920, + "initialValue": { + "expression": { + "id": 4918, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2362:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2362:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2325:57:35" + }, + { + "condition": { + "arguments": [ + { + "id": 4923, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2414:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4921, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2397:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4922, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2397:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:27:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4929, + "nodeType": "IfStatement", + "src": "2393:88:35", + "trueBody": { + "id": 4928, + "nodeType": "Block", + "src": "2426:55:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4925, + "name": "AlreadyACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4368, + "src": "2447:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2447:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4927, + "nodeType": "RevertStatement", + "src": "2440:30:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4933, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2503:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4930, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2491:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4932, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2491:11:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2491:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4935, + "nodeType": "ExpressionStatement", + "src": "2491:22:35" + }, + { + "assignments": [ + 4937 + ], + "declarations": [ + { + "constant": false, + "id": 4937, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2580:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2575:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4936, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2575:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4941, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4938, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2590:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2590:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2590:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2575:31:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4945, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2640:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4946, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2651:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4942, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "2616:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 6336, + "src": "2616:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4948, + "nodeType": "ExpressionStatement", + "src": "2616:43:35" + }, + { + "expression": { + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 4949, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2670:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4952, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "2670:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4953, + "indexExpression": { + "id": 4951, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2692:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2670:32:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4954, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2705:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2670:42:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4956, + "nodeType": "ExpressionStatement", + "src": "2670:42:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4958, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2747:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4959, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4904, + "src": "2758:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4957, + "name": "CouncilMemberAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "2728:18:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2728:41:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4961, + "nodeType": "EmitStatement", + "src": "2723:46:35" + } + ] + }, + "id": 4963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMember", + "nameLocation": "2196:17:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4902, + "mutability": "mutable", + "name": "newMember", + "nameLocation": "2222:9:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2214:17:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4901, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2214:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4904, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2238:10:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2233:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2233:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2213:36:35" + }, + "returnParameters": { + "id": 4906, + "nodeType": "ParameterList", + "parameters": [], + "src": "2259:0:35" + }, + "scope": 5065, + "src": "2187:589:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5025, + "nodeType": "Block", + "src": "2854:505:35", + "statements": [ + { + "assignments": [ + 4972 + ], + "declarations": [ + { + "constant": false, + "id": 4972, + "mutability": "mutable", + "name": "store", + "nameLocation": "2886:5:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2864:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4971, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4970, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2864:13:35" + }, + "referencedDeclaration": 4246, + "src": "2864:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4975, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4973, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2894:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2894:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2864:46:35" + }, + { + "assignments": [ + 4980 + ], + "declarations": [ + { + "constant": false, + "id": 4980, + "mutability": "mutable", + "name": "members", + "nameLocation": "2947:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2920:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4979, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4978, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2920:18:35" + }, + "referencedDeclaration": 1788, + "src": "2920:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4983, + "initialValue": { + "expression": { + "id": 4981, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "2957:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2957:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2920:57:35" + }, + { + "condition": { + "id": 4988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2992:25:35", + "subExpression": { + "arguments": [ + { + "id": 4986, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3010:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4984, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "2993:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2993:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:24:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4993, + "nodeType": "IfStatement", + "src": "2988:82:35", + "trueBody": { + "id": 4992, + "nodeType": "Block", + "src": "3019:51:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4989, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3040:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4991, + "nodeType": "RevertStatement", + "src": "3033:26:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4997, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3095:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4994, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "3080:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4996, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "3080:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3080:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4999, + "nodeType": "ExpressionStatement", + "src": "3080:22:35" + }, + { + "assignments": [ + 5001 + ], + "declarations": [ + { + "constant": false, + "id": 5001, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3118:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "3113:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5000, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3113:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5005, + "initialValue": { + "arguments": [ + { + "id": 5003, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3153:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5002, + "name": "_getCouncilMemberTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5064, + "src": "3128:24:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 5004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3128:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3113:47:35" + }, + { + "expression": { + "arguments": [ + { + "id": 5009, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5001, + "src": "3194:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5006, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "3170:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 5008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 6348, + "src": "3170:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5011, + "nodeType": "ExpressionStatement", + "src": "3170:32:35" + }, + { + "expression": { + "id": 5018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5012, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "3263:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5015, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3263:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5016, + "indexExpression": { + "id": 5014, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3285:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3263:29:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 5017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3295:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3263:33:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5019, + "nodeType": "ExpressionStatement", + "src": "3263:33:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5021, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3333:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5022, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4967, + "src": "3341:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5020, + "name": "CouncilMemberRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4406, + "src": "3312:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3312:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5024, + "nodeType": "EmitStatement", + "src": "3307:45:35" + } + ] + }, + "id": 5026, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMember", + "nameLocation": "2791:20:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4965, + "mutability": "mutable", + "name": "member", + "nameLocation": "2820:6:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2812:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4964, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2812:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4967, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2833:10:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2828:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4966, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2828:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2811:33:35" + }, + "returnParameters": { + "id": 4969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2854:0:35" + }, + "scope": 5065, + "src": "2782:577:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5038, + "nodeType": "Block", + "src": "3429:67:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5033, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3459:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3459:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3459:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5032, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3446:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 5036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3446:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "functionReturnParameters": 5031, + "id": 5037, + "nodeType": "Return", + "src": "3439:50:35" + } + ] + }, + "id": 5039, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilToken", + "nameLocation": "3374:16:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5027, + "nodeType": "ParameterList", + "parameters": [], + "src": "3390:2:35" + }, + "returnParameters": { + "id": 5031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5030, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5039, + "src": "3415:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 5029, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5028, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "3415:12:35" + }, + "referencedDeclaration": 6379, + "src": "3415:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "src": "3414:14:35" + }, + "scope": 5065, + "src": "3365:131:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5063, + "nodeType": "Block", + "src": "3580:152:35", + "statements": [ + { + "assignments": [ + 5047 + ], + "declarations": [ + { + "constant": false, + "id": 5047, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3595:7:35", + "nodeType": "VariableDeclaration", + "scope": 5063, + "src": "3590:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3590:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5053, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5048, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3605:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3605:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5050, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3605:32:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5052, + "indexExpression": { + "id": 5051, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5041, + "src": "3638:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3605:40:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3590:55:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5054, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3660:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3660:12:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5060, + "nodeType": "IfStatement", + "src": "3656:44:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5057, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3681:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3681:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5059, + "nodeType": "RevertStatement", + "src": "3674:26:35" + } + }, + { + "expression": { + "id": 5061, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3718:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5045, + "id": 5062, + "nodeType": "Return", + "src": "3711:14:35" + } + ] + }, + "id": 5064, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilMemberTokenId", + "nameLocation": "3511:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5041, + "mutability": "mutable", + "name": "member", + "nameLocation": "3544:6:35", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3536:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3536:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3535:16:35" + }, + "returnParameters": { + "id": 5045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5044, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3574:4:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5043, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3574:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3573:6:35" + }, + "scope": 5065, + "src": "3502:230:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5066, + "src": "347:3387:35", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3704:35" + } + }, + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ArrayError {\n error EmptyArray();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "exportedSymbols": { + "ArrayError": [ + 20 + ] + }, + "id": 21, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 17, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:2" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ArrayError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 20, + "linearizedBaseContracts": [ + 20 + ], + "name": "ArrayError", + "nameLocation": "64:10:2", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19, + "name": "EmptyArray", + "nameLocation": "87:10:2", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "97:2:2" + }, + "src": "81:19:2" + } + ], + "scope": 21, + "src": "56:46:2", + "usedErrors": [ + 19 + ] + } + ], + "src": "31:72:2" + } + }, + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/token/ERC721.sol\";\n\ncontract CouncilToken is Ownable, UUPSImplementation, ERC721 {\n error TokenIsNotTransferable();\n\n function initialize(string memory tokenName, string memory tokenSymbol) public onlyOwner {\n _initialize(tokenName, tokenSymbol, \"\");\n }\n\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n\n function mint(address to, uint256 tokenId) public virtual onlyOwner {\n _mint(to, tokenId);\n }\n\n function burn(uint256 tokenId) public virtual onlyOwner {\n _burn(tokenId);\n }\n\n function transferFrom(\n address,\n address,\n uint256\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n\n function safeTransferFrom(\n address,\n address,\n uint256,\n bytes memory\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 6380, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6281, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:39" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 6282, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 757, + "src": "56:76:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 6283, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 415, + "src": "133:69:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "file": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "id": 6284, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 1642, + "src": "203:64:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6285, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "294:7:39" + }, + "id": 6286, + "nodeType": "InheritanceSpecifier", + "src": "294:7:39" + }, + { + "baseName": { + "id": 6287, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "303:18:39" + }, + "id": 6288, + "nodeType": "InheritanceSpecifier", + "src": "303:18:39" + }, + { + "baseName": { + "id": 6289, + "name": "ERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1641, + "src": "323:6:39" + }, + "id": 6290, + "nodeType": "InheritanceSpecifier", + "src": "323:6:39" + } + ], + "canonicalName": "CouncilToken", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6379, + "linearizedBaseContracts": [ + 6379, + 1641, + 1677, + 180, + 157, + 78, + 756, + 542, + 238, + 414, + 476, + 494, + 220 + ], + "name": "CouncilToken", + "nameLocation": "278:12:39", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6292, + "name": "TokenIsNotTransferable", + "nameLocation": "342:22:39", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6291, + "nodeType": "ParameterList", + "parameters": [], + "src": "364:2:39" + }, + "src": "336:31:39" + }, + { + "body": { + "id": 6307, + "nodeType": "Block", + "src": "462:56:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6302, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6294, + "src": "484:9:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6303, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6296, + "src": "495:11:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "", + "id": 6304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "508:2:39", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 6301, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "472:11:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory,string memory)" + } + }, + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "472:39:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6306, + "nodeType": "ExpressionStatement", + "src": "472:39:39" + } + ] + }, + "functionSelector": "4cd88b76", + "id": 6308, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6299, + "kind": "modifierInvocation", + "modifierName": { + "id": 6298, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "452:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "452:9:39" + } + ], + "name": "initialize", + "nameLocation": "382:10:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6294, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "407:9:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "393:23:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6293, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "393:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6296, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "432:11:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "418:25:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6295, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "418:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "392:52:39" + }, + "returnParameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "462:0:39" + }, + "scope": 6379, + "src": "373:145:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 6320, + "nodeType": "Block", + "src": "596:46:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6317, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6310, + "src": "617:17:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6316, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "606:10:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "606:29:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6319, + "nodeType": "ExpressionStatement", + "src": "606:29:39" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 6321, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6314, + "kind": "modifierInvocation", + "modifierName": { + "id": 6313, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "586:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "586:9:39" + } + ], + "name": "upgradeTo", + "nameLocation": "533:9:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6312, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "577:8:39" + }, + "parameters": { + "id": 6311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6310, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "551:17:39", + "nodeType": "VariableDeclaration", + "scope": 6321, + "src": "543:25:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "543:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "542:27:39" + }, + "returnParameters": { + "id": 6315, + "nodeType": "ParameterList", + "parameters": [], + "src": "596:0:39" + }, + "scope": 6379, + "src": "524:118:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 6335, + "nodeType": "Block", + "src": "716:35:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6331, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "732:2:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6332, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6325, + "src": "736:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6330, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1436, + "src": "726:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:18:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6334, + "nodeType": "ExpressionStatement", + "src": "726:18:39" + } + ] + }, + "functionSelector": "40c10f19", + "id": 6336, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6328, + "kind": "modifierInvocation", + "modifierName": { + "id": 6327, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "706:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "706:9:39" + } + ], + "name": "mint", + "nameLocation": "657:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6323, + "mutability": "mutable", + "name": "to", + "nameLocation": "670:2:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "662:10:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6322, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6325, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "682:7:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "674:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "674:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "661:29:39" + }, + "returnParameters": { + "id": 6329, + "nodeType": "ParameterList", + "parameters": [], + "src": "716:0:39" + }, + "scope": 6379, + "src": "648:103:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 6347, + "nodeType": "Block", + "src": "813:31:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6344, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6338, + "src": "829:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6343, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1486, + "src": "823:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:14:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6346, + "nodeType": "ExpressionStatement", + "src": "823:14:39" + } + ] + }, + "functionSelector": "42966c68", + "id": 6348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6341, + "kind": "modifierInvocation", + "modifierName": { + "id": 6340, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "803:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "803:9:39" + } + ], + "name": "burn", + "nameLocation": "766:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6338, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:39", + "nodeType": "VariableDeclaration", + "scope": 6348, + "src": "771:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "770:17:39" + }, + "returnParameters": { + "id": 6342, + "nodeType": "ParameterList", + "parameters": [], + "src": "813:0:39" + }, + "scope": 6379, + "src": "757:87:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1259 + ], + "body": { + "id": 6361, + "nodeType": "Block", + "src": "953:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6358, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "970:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6360, + "nodeType": "RevertStatement", + "src": "963:31:39" + } + ] + }, + "functionSelector": "23b872dd", + "id": 6362, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "859:12:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6356, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "944:8:39" + }, + "parameters": { + "id": 6355, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "881:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "881:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6352, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "898:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "898:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6354, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "915:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "915:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "871:57:39" + }, + "returnParameters": { + "id": 6357, + "nodeType": "ParameterList", + "parameters": [], + "src": "953:0:39" + }, + "scope": 6379, + "src": "850:151:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1324 + ], + "body": { + "id": 6377, + "nodeType": "Block", + "src": "1136:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6374, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "1153:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1153:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6376, + "nodeType": "RevertStatement", + "src": "1146:31:39" + } + ] + }, + "functionSelector": "b88d4fde", + "id": 6378, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "1016:16:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6372, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1127:8:39" + }, + "parameters": { + "id": 6371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6364, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1042:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6363, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1042:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6366, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1059:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1059:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6368, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1076:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6367, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1076:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6370, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1093:12:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6369, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1093:5:39", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1032:79:39" + }, + "returnParameters": { + "id": 6373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1136:0:39" + }, + "scope": 6379, + "src": "1007:177:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 6380, + "src": "269:917:39", + "usedErrors": [ + 5, + 10, + 14, + 24, + 29, + 262, + 561, + 563, + 861, + 865, + 869, + 873, + 6292 + ] + } + ], + "src": "31:1156:39" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/ElectionStorage.sol\";\n\n/// @dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule\ncontract ElectionBase is ElectionStorage {\n // ---------------------------------------\n // Enums\n // ---------------------------------------\n\n enum ElectionPeriod {\n // Council elected and active\n Administration,\n // Accepting nominations for next election\n Nomination,\n // Accepting votes for ongoing election\n Vote,\n // Votes being counted\n Evaluation\n }\n\n // ---------------------------------------\n // Errors\n // ---------------------------------------\n\n error ElectionNotEvaluated();\n error ElectionAlreadyEvaluated();\n error AlreadyNominated();\n error NotNominated();\n error NoCandidates();\n error NoVotePower();\n error VoteNotCasted();\n error DuplicateCandidates();\n error InvalidEpochConfiguration();\n error InvalidElectionSettings();\n error NotCallableInCurrentPeriod();\n error ChangesCurrentPeriod();\n error AlreadyACouncilMember();\n error NotACouncilMember();\n error InvalidMinimumActiveMembers();\n error CrossDomainMessengerNotSet();\n error OnlyCrossDomainMessengerCanInvoke();\n error OnlyCrossDomainUserCanInvoke();\n\n // ---------------------------------------\n // Events\n // ---------------------------------------\n\n event ElectionModuleInitialized();\n event EpochStarted(uint epochIndex);\n event CouncilTokenCreated(address proxy, address implementation);\n event CouncilTokenUpgraded(address newImplementation);\n event CouncilMemberAdded(address indexed member, uint indexed epochIndex);\n event CouncilMemberRemoved(address indexed member, uint indexed epochIndex);\n event CouncilMembersDismissed(address[] members, uint indexed epochIndex);\n event EpochScheduleUpdated(uint64 nominationPeriodStartDate, uint64 votingPeriodStartDate, uint64 epochEndDate);\n event MinimumEpochDurationsChanged(\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n event MaxDateAdjustmentToleranceChanged(uint64 tolerance);\n event DefaultBallotEvaluationBatchSizeChanged(uint size);\n event NextEpochSeatCountChanged(uint8 seatCount);\n event MinimumActiveMembersChanged(uint8 minimumActiveMembers);\n event CandidateNominated(address indexed candidate, uint indexed epochIndex);\n event NominationWithdrawn(address indexed candidate, uint indexed epochIndex);\n event VoteRecorded(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event VoteWithdrawn(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event ElectionEvaluated(uint indexed epochIndex, uint totalBallots);\n event ElectionBatchEvaluated(uint indexed epochIndex, uint evaluatedBallots, uint totalBallots);\n event EmergencyElectionStarted(uint indexed epochIndex);\n event CrossDomainMessengerSet(address messenger);\n\n // ---------------------------------------\n // Helpers\n // ---------------------------------------\n\n function _createNewEpoch() internal virtual {\n ElectionStore storage store = _electionStore();\n\n store.epochs.push();\n store.elections.push();\n }\n\n function _getCurrentEpochIndex() internal view returns (uint) {\n return _electionStore().epochs.length - 1;\n }\n\n function _getCurrentEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex());\n }\n\n function _getPreviousEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex() - 1);\n }\n\n function _getEpochAtIndex(uint epochIndex) internal view returns (EpochData storage) {\n return _electionStore().epochs[epochIndex];\n }\n\n function _getCurrentElection() internal view returns (ElectionData storage) {\n return _getElectionAtIndex(_getCurrentEpochIndex());\n }\n\n function _getElectionAtIndex(uint epochIndex) internal view returns (ElectionData storage) {\n return _electionStore().elections[epochIndex];\n }\n\n function _getBallot(bytes32 ballotId) internal view returns (BallotData storage) {\n return _getCurrentElection().ballotsById[ballotId];\n }\n\n function _getBallotInEpoch(bytes32 ballotId, uint epochIndex) internal view returns (BallotData storage) {\n return _getElectionAtIndex(epochIndex).ballotsById[ballotId];\n }\n\n function _calculateBallotId(address[] memory candidates) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(candidates));\n }\n\n function _ballotExists(BallotData storage ballot) internal view returns (bool) {\n return ballot.candidates.length != 0;\n }\n\n function _getBallotVoted(address user) internal view returns (bytes32) {\n return _getCurrentElection().ballotIdsByAddress[user];\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4684, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4333, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:34" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "file": "../../storage/ElectionStorage.sol", + "id": 4334, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4684, + "sourceUnit": 4332, + "src": "56:43:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4336, + "name": "ElectionStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4331, + "src": "228:15:34" + }, + "id": 4337, + "nodeType": "InheritanceSpecifier", + "src": "228:15:34" + } + ], + "canonicalName": "ElectionBase", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4335, + "nodeType": "StructuredDocumentation", + "src": "101:102:34", + "text": "@dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule" + }, + "fullyImplemented": true, + "id": 4683, + "linearizedBaseContracts": [ + 4683, + 4331 + ], + "name": "ElectionBase", + "nameLocation": "212:12:34", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionBase.ElectionPeriod", + "id": 4342, + "members": [ + { + "id": 4338, + "name": "Administration", + "nameLocation": "426:14:34", + "nodeType": "EnumValue", + "src": "426:14:34" + }, + { + "id": 4339, + "name": "Nomination", + "nameLocation": "501:10:34", + "nodeType": "EnumValue", + "src": "501:10:34" + }, + { + "id": 4340, + "name": "Vote", + "nameLocation": "569:4:34", + "nodeType": "EnumValue", + "src": "569:4:34" + }, + { + "id": 4341, + "name": "Evaluation", + "nameLocation": "614:10:34", + "nodeType": "EnumValue", + "src": "614:10:34" + } + ], + "name": "ElectionPeriod", + "nameLocation": "363:14:34", + "nodeType": "EnumDefinition", + "src": "358:272:34" + }, + { + "id": 4344, + "name": "ElectionNotEvaluated", + "nameLocation": "751:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4343, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:2:34" + }, + "src": "745:29:34" + }, + { + "id": 4346, + "name": "ElectionAlreadyEvaluated", + "nameLocation": "785:24:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4345, + "nodeType": "ParameterList", + "parameters": [], + "src": "809:2:34" + }, + "src": "779:33:34" + }, + { + "id": 4348, + "name": "AlreadyNominated", + "nameLocation": "823:16:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4347, + "nodeType": "ParameterList", + "parameters": [], + "src": "839:2:34" + }, + "src": "817:25:34" + }, + { + "id": 4350, + "name": "NotNominated", + "nameLocation": "853:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4349, + "nodeType": "ParameterList", + "parameters": [], + "src": "865:2:34" + }, + "src": "847:21:34" + }, + { + "id": 4352, + "name": "NoCandidates", + "nameLocation": "879:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4351, + "nodeType": "ParameterList", + "parameters": [], + "src": "891:2:34" + }, + "src": "873:21:34" + }, + { + "id": 4354, + "name": "NoVotePower", + "nameLocation": "905:11:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4353, + "nodeType": "ParameterList", + "parameters": [], + "src": "916:2:34" + }, + "src": "899:20:34" + }, + { + "id": 4356, + "name": "VoteNotCasted", + "nameLocation": "930:13:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4355, + "nodeType": "ParameterList", + "parameters": [], + "src": "943:2:34" + }, + "src": "924:22:34" + }, + { + "id": 4358, + "name": "DuplicateCandidates", + "nameLocation": "957:19:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4357, + "nodeType": "ParameterList", + "parameters": [], + "src": "976:2:34" + }, + "src": "951:28:34" + }, + { + "id": 4360, + "name": "InvalidEpochConfiguration", + "nameLocation": "990:25:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4359, + "nodeType": "ParameterList", + "parameters": [], + "src": "1015:2:34" + }, + "src": "984:34:34" + }, + { + "id": 4362, + "name": "InvalidElectionSettings", + "nameLocation": "1029:23:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4361, + "nodeType": "ParameterList", + "parameters": [], + "src": "1052:2:34" + }, + "src": "1023:32:34" + }, + { + "id": 4364, + "name": "NotCallableInCurrentPeriod", + "nameLocation": "1066:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4363, + "nodeType": "ParameterList", + "parameters": [], + "src": "1092:2:34" + }, + "src": "1060:35:34" + }, + { + "id": 4366, + "name": "ChangesCurrentPeriod", + "nameLocation": "1106:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4365, + "nodeType": "ParameterList", + "parameters": [], + "src": "1126:2:34" + }, + "src": "1100:29:34" + }, + { + "id": 4368, + "name": "AlreadyACouncilMember", + "nameLocation": "1140:21:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4367, + "nodeType": "ParameterList", + "parameters": [], + "src": "1161:2:34" + }, + "src": "1134:30:34" + }, + { + "id": 4370, + "name": "NotACouncilMember", + "nameLocation": "1175:17:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4369, + "nodeType": "ParameterList", + "parameters": [], + "src": "1192:2:34" + }, + "src": "1169:26:34" + }, + { + "id": 4372, + "name": "InvalidMinimumActiveMembers", + "nameLocation": "1206:27:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4371, + "nodeType": "ParameterList", + "parameters": [], + "src": "1233:2:34" + }, + "src": "1200:36:34" + }, + { + "id": 4374, + "name": "CrossDomainMessengerNotSet", + "nameLocation": "1247:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1273:2:34" + }, + "src": "1241:35:34" + }, + { + "id": 4376, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nameLocation": "1287:33:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4375, + "nodeType": "ParameterList", + "parameters": [], + "src": "1320:2:34" + }, + "src": "1281:42:34" + }, + { + "id": 4378, + "name": "OnlyCrossDomainUserCanInvoke", + "nameLocation": "1334:28:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4377, + "nodeType": "ParameterList", + "parameters": [], + "src": "1362:2:34" + }, + "src": "1328:37:34" + }, + { + "anonymous": false, + "id": 4380, + "name": "ElectionModuleInitialized", + "nameLocation": "1486:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4379, + "nodeType": "ParameterList", + "parameters": [], + "src": "1511:2:34" + }, + "src": "1480:34:34" + }, + { + "anonymous": false, + "id": 4384, + "name": "EpochStarted", + "nameLocation": "1525:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4383, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4382, + "indexed": false, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1543:10:34", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "1538:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4381, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1538:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:17:34" + }, + "src": "1519:36:34" + }, + { + "anonymous": false, + "id": 4390, + "name": "CouncilTokenCreated", + "nameLocation": "1566:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4386, + "indexed": false, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "1594:5:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1586:13:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1586:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4388, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1609:14:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1601:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1585:39:34" + }, + "src": "1560:65:34" + }, + { + "anonymous": false, + "id": 4394, + "name": "CouncilTokenUpgraded", + "nameLocation": "1636:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4392, + "indexed": false, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1665:17:34", + "nodeType": "VariableDeclaration", + "scope": 4394, + "src": "1657:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4391, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1657:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1656:27:34" + }, + "src": "1630:54:34" + }, + { + "anonymous": false, + "id": 4400, + "name": "CouncilMemberAdded", + "nameLocation": "1695:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4396, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1730:6:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1714:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1714:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4398, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1751:10:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1738:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4397, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1738:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1713:49:34" + }, + "src": "1689:74:34" + }, + { + "anonymous": false, + "id": 4406, + "name": "CouncilMemberRemoved", + "nameLocation": "1774:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4402, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1811:6:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1795:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1795:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4404, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1832:10:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1819:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4403, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1819:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1794:49:34" + }, + "src": "1768:76:34" + }, + { + "anonymous": false, + "id": 4413, + "name": "CouncilMembersDismissed", + "nameLocation": "1855:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4409, + "indexed": false, + "mutability": "mutable", + "name": "members", + "nameLocation": "1889:7:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1879:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1879:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4408, + "nodeType": "ArrayTypeName", + "src": "1879:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4411, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1911:10:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1898:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4410, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1898:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1878:44:34" + }, + "src": "1849:74:34" + }, + { + "anonymous": false, + "id": 4421, + "name": "EpochScheduleUpdated", + "nameLocation": "1934:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "indexed": false, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1962:25:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1955:32:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4414, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1955:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4417, + "indexed": false, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1996:21:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1989:28:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4416, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1989:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "indexed": false, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2026:12:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "2019:19:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4418, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2019:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1954:85:34" + }, + "src": "1928:112:34" + }, + { + "anonymous": false, + "id": 4429, + "name": "MinimumEpochDurationsChanged", + "nameLocation": "2051:28:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4423, + "indexed": false, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "2096:27:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2089:34:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4422, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2089:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4425, + "indexed": false, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "2140:23:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2133:30:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4424, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2133:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4427, + "indexed": false, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "2180:16:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2173:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4426, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2173:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2079:123:34" + }, + "src": "2045:158:34" + }, + { + "anonymous": false, + "id": 4433, + "name": "MaxDateAdjustmentToleranceChanged", + "nameLocation": "2214:33:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4431, + "indexed": false, + "mutability": "mutable", + "name": "tolerance", + "nameLocation": "2255:9:34", + "nodeType": "VariableDeclaration", + "scope": 4433, + "src": "2248:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4430, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2248:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2247:18:34" + }, + "src": "2208:58:34" + }, + { + "anonymous": false, + "id": 4437, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nameLocation": "2277:39:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4435, + "indexed": false, + "mutability": "mutable", + "name": "size", + "nameLocation": "2322:4:34", + "nodeType": "VariableDeclaration", + "scope": 4437, + "src": "2317:9:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4434, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2317:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2316:11:34" + }, + "src": "2271:57:34" + }, + { + "anonymous": false, + "id": 4441, + "name": "NextEpochSeatCountChanged", + "nameLocation": "2339:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4439, + "indexed": false, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "2371:9:34", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "2365:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4438, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2365:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2364:17:34" + }, + "src": "2333:49:34" + }, + { + "anonymous": false, + "id": 4445, + "name": "MinimumActiveMembersChanged", + "nameLocation": "2393:27:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4443, + "indexed": false, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2427:20:34", + "nodeType": "VariableDeclaration", + "scope": 4445, + "src": "2421:26:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4442, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2421:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2420:28:34" + }, + "src": "2387:62:34" + }, + { + "anonymous": false, + "id": 4451, + "name": "CandidateNominated", + "nameLocation": "2460:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4447, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2495:9:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2479:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4446, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2479:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4449, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2519:10:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2506:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4448, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2506:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2478:52:34" + }, + "src": "2454:77:34" + }, + { + "anonymous": false, + "id": 4457, + "name": "NominationWithdrawn", + "nameLocation": "2542:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4453, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2578:9:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2562:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2562:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4455, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2602:10:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2589:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4454, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2589:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2561:52:34" + }, + "src": "2536:78:34" + }, + { + "anonymous": false, + "id": 4467, + "name": "VoteRecorded", + "nameLocation": "2625:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4459, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2654:5:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2638:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4458, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2638:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4461, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2677:8:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2661:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4460, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2661:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4463, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2700:10:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2687:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4462, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2687:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4465, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2717:9:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2712:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4464, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2637:90:34" + }, + "src": "2619:109:34" + }, + { + "anonymous": false, + "id": 4477, + "name": "VoteWithdrawn", + "nameLocation": "2739:13:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4469, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2769:5:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2753:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2753:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4471, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2792:8:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2776:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4470, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2776:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4473, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2815:10:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2802:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4472, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2802:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4475, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2832:9:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2827:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4474, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2827:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2752:90:34" + }, + "src": "2733:110:34" + }, + { + "anonymous": false, + "id": 4483, + "name": "ElectionEvaluated", + "nameLocation": "2854:17:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4479, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2885:10:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2872:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4478, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2872:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4481, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "2902:12:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2897:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4480, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2897:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2871:44:34" + }, + "src": "2848:68:34" + }, + { + "anonymous": false, + "id": 4491, + "name": "ElectionBatchEvaluated", + "nameLocation": "2927:22:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4485, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2963:10:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2950:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2950:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4487, + "indexed": false, + "mutability": "mutable", + "name": "evaluatedBallots", + "nameLocation": "2980:16:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2975:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4486, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2975:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4489, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "3003:12:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2998:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4488, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2998:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2949:67:34" + }, + "src": "2921:96:34" + }, + { + "anonymous": false, + "id": 4495, + "name": "EmergencyElectionStarted", + "nameLocation": "3028:24:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4493, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3066:10:34", + "nodeType": "VariableDeclaration", + "scope": 4495, + "src": "3053:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3053:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3052:25:34" + }, + "src": "3022:56:34" + }, + { + "anonymous": false, + "id": 4499, + "name": "CrossDomainMessengerSet", + "nameLocation": "3089:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4498, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4497, + "indexed": false, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3121:9:34", + "nodeType": "VariableDeclaration", + "scope": 4499, + "src": "3113:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3113:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3112:19:34" + }, + "src": "3083:49:34" + }, + { + "body": { + "id": 4522, + "nodeType": "Block", + "src": "3292:125:34", + "statements": [ + { + "assignments": [ + 4504 + ], + "declarations": [ + { + "constant": false, + "id": 4504, + "mutability": "mutable", + "name": "store", + "nameLocation": "3324:5:34", + "nodeType": "VariableDeclaration", + "scope": 4522, + "src": "3302:27:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4503, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4502, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3302:13:34" + }, + "referencedDeclaration": 4246, + "src": "3302:13:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4507, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4505, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3332:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3332:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:46:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4508, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3359:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3359:12:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3359:17:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$returns$_t_struct$_EpochData_$4270_storage_$bound_to$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.EpochData storage ref[] storage pointer) returns (struct ElectionStorage.EpochData storage ref)" + } + }, + "id": 4513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:19:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "id": 4514, + "nodeType": "ExpressionStatement", + "src": "3359:19:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4515, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3388:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4518, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "3388:15:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3388:20:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$returns$_t_struct$_ElectionData_$4299_storage_$bound_to$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.ElectionData storage ref[] storage pointer) returns (struct ElectionStorage.ElectionData storage ref)" + } + }, + "id": 4520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3388:22:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "id": 4521, + "nodeType": "ExpressionStatement", + "src": "3388:22:34" + } + ] + }, + "id": 4523, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "3257:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4500, + "nodeType": "ParameterList", + "parameters": [], + "src": "3272:2:34" + }, + "returnParameters": { + "id": 4501, + "nodeType": "ParameterList", + "parameters": [], + "src": "3292:0:34" + }, + "scope": 4683, + "src": "3248:169:34", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 4535, + "nodeType": "Block", + "src": "3485:58:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4528, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3502:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3502:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3502:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3502:30:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3535:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3502:34:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4527, + "id": 4534, + "nodeType": "Return", + "src": "3495:41:34" + } + ] + }, + "id": 4536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpochIndex", + "nameLocation": "3432:21:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4524, + "nodeType": "ParameterList", + "parameters": [], + "src": "3453:2:34" + }, + "returnParameters": { + "id": 4527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4526, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4536, + "src": "3479:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4525, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3479:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3478:6:34" + }, + "scope": 4683, + "src": "3423:120:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4547, + "nodeType": "Block", + "src": "3619:65:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4543, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3653:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3653:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4542, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3636:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3636:41:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4541, + "id": 4546, + "nodeType": "Return", + "src": "3629:48:34" + } + ] + }, + "id": 4548, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpoch", + "nameLocation": "3558:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4537, + "nodeType": "ParameterList", + "parameters": [], + "src": "3574:2:34" + }, + "returnParameters": { + "id": 4541, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4540, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4548, + "src": "3600:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4539, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4538, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3600:9:34" + }, + "referencedDeclaration": 4270, + "src": "3600:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3599:19:34" + }, + "scope": 4683, + "src": "3549:135:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4561, + "nodeType": "Block", + "src": "3761:69:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4555, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3795:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3795:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3795:27:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4554, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3778:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3778:45:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4553, + "id": 4560, + "nodeType": "Return", + "src": "3771:52:34" + } + ] + }, + "id": 4562, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getPreviousEpoch", + "nameLocation": "3699:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4549, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:2:34" + }, + "returnParameters": { + "id": 4553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4552, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4562, + "src": "3742:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4551, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4550, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3742:9:34" + }, + "referencedDeclaration": 4270, + "src": "3742:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3741:19:34" + }, + "scope": 4683, + "src": "3690:140:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4576, + "nodeType": "Block", + "src": "3921:59:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4570, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3938:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3938:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3938:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4574, + "indexExpression": { + "id": 4573, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4564, + "src": "3962:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3938:35:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "functionReturnParameters": 4569, + "id": 4575, + "nodeType": "Return", + "src": "3931:42:34" + } + ] + }, + "id": 4577, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochAtIndex", + "nameLocation": "3845:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4564, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3867:10:34", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3862:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3862:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3861:17:34" + }, + "returnParameters": { + "id": 4569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4568, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3902:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4567, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4566, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3902:9:34" + }, + "referencedDeclaration": 4270, + "src": "3902:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3901:19:34" + }, + "scope": 4683, + "src": "3836:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4588, + "nodeType": "Block", + "src": "4062:68:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4584, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "4099:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4099:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4583, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4079:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4079:44:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "functionReturnParameters": 4582, + "id": 4587, + "nodeType": "Return", + "src": "4072:51:34" + } + ] + }, + "id": 4589, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentElection", + "nameLocation": "3995:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4578, + "nodeType": "ParameterList", + "parameters": [], + "src": "4014:2:34" + }, + "returnParameters": { + "id": 4582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4581, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4589, + "src": "4040:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4580, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4579, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4040:12:34" + }, + "referencedDeclaration": 4299, + "src": "4040:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4039:22:34" + }, + "scope": 4683, + "src": "3986:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4603, + "nodeType": "Block", + "src": "4227:62:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4597, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "4244:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4244:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "4244:26:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4601, + "indexExpression": { + "id": 4600, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4591, + "src": "4271:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4244:38:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "functionReturnParameters": 4596, + "id": 4602, + "nodeType": "Return", + "src": "4237:45:34" + } + ] + }, + "id": 4604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getElectionAtIndex", + "nameLocation": "4145:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4591, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4170:10:34", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4165:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4590, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4165:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4164:17:34" + }, + "returnParameters": { + "id": 4596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4205:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4594, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4593, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4205:12:34" + }, + "referencedDeclaration": 4299, + "src": "4205:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4204:22:34" + }, + "scope": 4683, + "src": "4136:153:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4618, + "nodeType": "Block", + "src": "4376:67:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4612, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "4393:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4393:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4393:33:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4616, + "indexExpression": { + "id": 4615, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "4427:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:43:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4611, + "id": 4617, + "nodeType": "Return", + "src": "4386:50:34" + } + ] + }, + "id": 4619, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallot", + "nameLocation": "4304:10:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4606, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4323:8:34", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4315:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4605, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4315:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4314:18:34" + }, + "returnParameters": { + "id": 4611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4610, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4356:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4609, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4608, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4356:10:34" + }, + "referencedDeclaration": 4309, + "src": "4356:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4355:20:34" + }, + "scope": 4683, + "src": "4295:148:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4636, + "nodeType": "Block", + "src": "4554:77:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 4630, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4623, + "src": "4591:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4629, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4571:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:31:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4571:43:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4634, + "indexExpression": { + "id": 4633, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "4615:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4571:53:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4628, + "id": 4635, + "nodeType": "Return", + "src": "4564:60:34" + } + ] + }, + "id": 4637, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotInEpoch", + "nameLocation": "4458:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4621, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4484:8:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4476:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4620, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4476:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4623, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4499:10:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4494:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4622, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4494:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4475:35:34" + }, + "returnParameters": { + "id": 4628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4627, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4534:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4626, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4625, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4534:10:34" + }, + "referencedDeclaration": 4309, + "src": "4534:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4533:20:34" + }, + "scope": 4683, + "src": "4449:182:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4652, + "nodeType": "Block", + "src": "4726:63:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4648, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4640, + "src": "4770:10:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 4646, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4753:3:34", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "4753:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4753:28:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4645, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "4743:9:34", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4743:39:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4644, + "id": 4651, + "nodeType": "Return", + "src": "4736:46:34" + } + ] + }, + "id": 4653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_calculateBallotId", + "nameLocation": "4646:18:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4640, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "4682:10:34", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4665:27:34", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4638, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4665:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4639, + "nodeType": "ArrayTypeName", + "src": "4665:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "4664:29:34" + }, + "returnParameters": { + "id": 4644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4643, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4717:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4642, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4717:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4716:9:34" + }, + "scope": 4683, + "src": "4637:152:34", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4667, + "nodeType": "Block", + "src": "4874:53:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4661, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4656, + "src": "4891:6:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4662, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "4891:17:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4891:24:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4919:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4891:29:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4660, + "id": 4666, + "nodeType": "Return", + "src": "4884:36:34" + } + ] + }, + "id": 4668, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ballotExists", + "nameLocation": "4804:13:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4656, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "4837:6:34", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4818:25:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4655, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4654, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4818:10:34" + }, + "referencedDeclaration": 4309, + "src": "4818:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4817:27:34" + }, + "returnParameters": { + "id": 4660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4659, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4868:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4658, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4868:4:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4867:6:34" + }, + "scope": 4683, + "src": "4795:132:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4681, + "nodeType": "Block", + "src": "5004:70:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4675, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "5021:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5021:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "5021:40:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 4679, + "indexExpression": { + "id": 4678, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "5062:4:34", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5021:46:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4674, + "id": 4680, + "nodeType": "Return", + "src": "5014:53:34" + } + ] + }, + "id": 4682, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotVoted", + "nameLocation": "4942:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "user", + "nameLocation": "4966:4:34", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4958:12:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4669, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4958:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4957:14:34" + }, + "returnParameters": { + "id": 4674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4673, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4995:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4672, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4995:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4994:9:34" + }, + "scope": 4683, + "src": "4933:141:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4684, + "src": "203:4873:34", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:5046:34" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IUUPSImplementation.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"./ProxyStorage.sol\";\n\nabstract contract UUPSImplementation is IUUPSImplementation, ProxyStorage {\n event Upgraded(address implementation);\n\n error ImplementationIsSterile(address implementation);\n error UpgradeSimulationFailed();\n\n function _upgradeTo(address newImplementation) internal virtual {\n if (newImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(newImplementation)) {\n revert AddressError.NotAContract(newImplementation);\n }\n\n ProxyStore storage store = _proxyStore();\n\n if (newImplementation == store.implementation) {\n revert ChangeError.NoChange();\n }\n\n if (!store.simulatingUpgrade && _implementationIsSterile(newImplementation)) {\n revert ImplementationIsSterile(newImplementation);\n }\n\n store.implementation = newImplementation;\n\n emit Upgraded(newImplementation);\n }\n\n function _implementationIsSterile(address candidateImplementation) internal virtual returns (bool) {\n (bool simulationReverted, bytes memory simulationResponse) = address(this).delegatecall(\n abi.encodeCall(this.simulateUpgradeTo, (candidateImplementation))\n );\n\n return\n !simulationReverted &&\n keccak256(abi.encodePacked(simulationResponse)) == keccak256(abi.encodePacked(UpgradeSimulationFailed.selector));\n }\n\n function simulateUpgradeTo(address newImplementation) public override {\n ProxyStore storage store = _proxyStore();\n\n store.simulatingUpgrade = true;\n\n address currentImplementation = store.implementation;\n store.implementation = newImplementation;\n\n (bool rollbackSuccessful, ) = newImplementation.delegatecall(\n abi.encodeCall(this.upgradeTo, (currentImplementation))\n );\n\n if (!rollbackSuccessful || _proxyStore().implementation != currentImplementation) {\n revert UpgradeSimulationFailed();\n }\n\n store.simulatingUpgrade = false;\n\n // solhint-disable-next-line reason-string\n revert();\n }\n\n function getImplementation() external view override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 757, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 544, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:17" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "file": "../interfaces/IUUPSImplementation.sol", + "id": 545, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 239, + "src": "56:47:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 546, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 16, + "src": "104:36:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 547, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 26, + "src": "141:35:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 548, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 1697, + "src": "177:34:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 549, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 543, + "src": "212:28:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 550, + "name": "IUUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 238, + "src": "282:19:17" + }, + "id": 551, + "nodeType": "InheritanceSpecifier", + "src": "282:19:17" + }, + { + "baseName": { + "id": 552, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "303:12:17" + }, + "id": 553, + "nodeType": "InheritanceSpecifier", + "src": "303:12:17" + } + ], + "canonicalName": "UUPSImplementation", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 756, + "linearizedBaseContracts": [ + 756, + 542, + 238 + ], + "name": "UUPSImplementation", + "nameLocation": "260:18:17", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 557, + "name": "Upgraded", + "nameLocation": "328:8:17", + "nodeType": "EventDefinition", + "parameters": { + "id": 556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 555, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "345:14:17", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "337:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "337:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "336:24:17" + }, + "src": "322:39:17" + }, + { + "id": 561, + "name": "ImplementationIsSterile", + "nameLocation": "373:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "405:14:17", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "397:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 558, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "397:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "396:24:17" + }, + "src": "367:54:17" + }, + { + "id": 563, + "name": "UpgradeSimulationFailed", + "nameLocation": "432:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 562, + "nodeType": "ParameterList", + "parameters": [], + "src": "455:2:17" + }, + "src": "426:32:17" + }, + { + "body": { + "id": 634, + "nodeType": "Block", + "src": "528:662:17", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 568, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "542:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:1:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 569, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "563:7:17", + "typeDescriptions": {} + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "542:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 580, + "nodeType": "IfStatement", + "src": "538:95:17", + "trueBody": { + "id": 579, + "nodeType": "Block", + "src": "575:58:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 574, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "596:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "596:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "596:26:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 578, + "nodeType": "RevertStatement", + "src": "589:33:17" + } + ] + } + }, + { + "condition": { + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "647:42:17", + "subExpression": { + "arguments": [ + { + "id": 583, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "671:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 581, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "648:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "648:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:41:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 593, + "nodeType": "IfStatement", + "src": "643:124:17", + "trueBody": { + "id": 592, + "nodeType": "Block", + "src": "691:76:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 589, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "738:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 586, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "712:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "712:25:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "712:44:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "RevertStatement", + "src": "705:51:17" + } + ] + } + }, + { + "assignments": [ + 596 + ], + "declarations": [ + { + "constant": false, + "id": 596, + "mutability": "mutable", + "name": "store", + "nameLocation": "796:5:17", + "nodeType": "VariableDeclaration", + "scope": 634, + "src": "777:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 595, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 594, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "777:10:17" + }, + "referencedDeclaration": 533, + "src": "777:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 599, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 597, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "804:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "804:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "777:40:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 600, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "832:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 601, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "853:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "853:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "832:41:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 610, + "nodeType": "IfStatement", + "src": "828:101:17", + "trueBody": { + "id": 609, + "nodeType": "Block", + "src": "875:54:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 604, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "896:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "896:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "896:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 608, + "nodeType": "RevertStatement", + "src": "889:29:17" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "943:24:17", + "subExpression": { + "expression": { + "id": 611, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "944:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "944:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "id": 615, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "996:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 614, + "name": "_implementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "971:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", + "typeString": "function (address) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "971:43:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "943:71:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 623, + "nodeType": "IfStatement", + "src": "939:151:17", + "trueBody": { + "id": 622, + "nodeType": "Block", + "src": "1016:74:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 619, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1061:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 618, + "name": "ImplementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "1037:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1037:42:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 621, + "nodeType": "RevertStatement", + "src": "1030:49:17" + } + ] + } + }, + { + "expression": { + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 624, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "1100:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 626, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1100:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 627, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1123:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1100:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 629, + "nodeType": "ExpressionStatement", + "src": "1100:40:17" + }, + { + "eventCall": { + "arguments": [ + { + "id": 631, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1165:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 630, + "name": "Upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "1156:8:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1156:27:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 633, + "nodeType": "EmitStatement", + "src": "1151:32:17" + } + ] + }, + "id": 635, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_upgradeTo", + "nameLocation": "473:10:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 565, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "492:17:17", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "484:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "484:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "483:27:17" + }, + "returnParameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [], + "src": "528:0:17" + }, + "scope": 756, + "src": "464:726:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 678, + "nodeType": "Block", + "src": "1295:370:17", + "statements": [ + { + "assignments": [ + 643, + 645 + ], + "declarations": [ + { + "constant": false, + "id": 643, + "mutability": "mutable", + "name": "simulationReverted", + "nameLocation": "1311:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1306:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1306:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 645, + "mutability": "mutable", + "name": "simulationResponse", + "nameLocation": "1344:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1331:31:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 644, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1331:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 659, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 653, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1421:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "simulateUpgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "1421:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 655, + "name": "candidateImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "1446:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 656, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1445:25:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 651, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1406:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "1406:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1406:65:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 648, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1374:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + ], + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1366:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1366:7:17", + "typeDescriptions": {} + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1366:26:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:115:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1305:176:17" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1511:19:17", + "subExpression": { + "id": 660, + "name": "simulationReverted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "1512:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 665, + "name": "simulationResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "1573:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 663, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1556:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1556:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1556:36:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 662, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1546:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:47:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 671, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "1624:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1624:32:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "id": 669, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1607:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1607:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1607:50:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1597:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:61:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1546:112:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1511:147:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 641, + "id": 677, + "nodeType": "Return", + "src": "1492:166:17" + } + ] + }, + "id": 679, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_implementationIsSterile", + "nameLocation": "1205:24:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 637, + "mutability": "mutable", + "name": "candidateImplementation", + "nameLocation": "1238:23:17", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1230:31:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 636, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1230:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1229:33:17" + }, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1289:4:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 639, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1289:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1288:6:17" + }, + "scope": 756, + "src": "1196:469:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 232 + ], + "body": { + "id": 743, + "nodeType": "Block", + "src": "1741:622:17", + "statements": [ + { + "assignments": [ + 687 + ], + "declarations": [ + { + "constant": false, + "id": 687, + "mutability": "mutable", + "name": "store", + "nameLocation": "1770:5:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1751:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 686, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 685, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "1751:10:17" + }, + "referencedDeclaration": 533, + "src": "1751:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 690, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 688, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "1778:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1778:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1751:40:17" + }, + { + "expression": { + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 691, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1802:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1802:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1828:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1802:30:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 696, + "nodeType": "ExpressionStatement", + "src": "1802:30:17" + }, + { + "assignments": [ + 698 + ], + "declarations": [ + { + "constant": false, + "id": 698, + "mutability": "mutable", + "name": "currentImplementation", + "nameLocation": "1851:21:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1843:29:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1843:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 701, + "initialValue": { + "expression": { + "id": 699, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1875:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 700, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1875:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1843:52:17" + }, + { + "expression": { + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 702, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1905:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1905:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 705, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1928:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1905:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 707, + "nodeType": "ExpressionStatement", + "src": "1905:40:17" + }, + { + "assignments": [ + 709, + null + ], + "declarations": [ + { + "constant": false, + "id": 709, + "mutability": "mutable", + "name": "rollbackSuccessful", + "nameLocation": "1962:18:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1957:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 708, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1957:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 720, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 714, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2045:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 227, + "src": "2045:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 716, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2062:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 717, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2061:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 712, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2030:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "2030:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2030:55:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 710, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1986:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1986:30:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:109:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1956:139:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2110:19:17", + "subExpression": { + "id": 721, + "name": "rollbackSuccessful", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "2111:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 723, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2133:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2133:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 726, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2165:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2133:53:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2110:76:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 733, + "nodeType": "IfStatement", + "src": "2106:139:17", + "trueBody": { + "id": 732, + "nodeType": "Block", + "src": "2188:57:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 729, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "2209:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2209:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "RevertStatement", + "src": "2202:32:17" + } + ] + } + }, + { + "expression": { + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 734, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "2255:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "2255:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2281:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2255:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "2255:31:17" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 740, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "2348:6:17", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2348:8:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 742, + "nodeType": "ExpressionStatement", + "src": "2348:8:17" + } + ] + }, + "functionSelector": "c7f62cda", + "id": 744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "1680:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 683, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1732:8:17" + }, + "parameters": { + "id": 682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 681, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1706:17:17", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "1698:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1698:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1697:27:17" + }, + "returnParameters": { + "id": 684, + "nodeType": "ParameterList", + "parameters": [], + "src": "1741:0:17" + }, + "scope": 756, + "src": "1671:692:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 237 + ], + "body": { + "id": 754, + "nodeType": "Block", + "src": "2439:52:17", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 750, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2456:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2456:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2456:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 749, + "id": 753, + "nodeType": "Return", + "src": "2449:35:17" + } + ] + }, + "functionSelector": "aaf10f42", + "id": 755, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "2378:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 746, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2412:8:17" + }, + "parameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [], + "src": "2395:2:17" + }, + "returnParameters": { + "id": 749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 748, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 755, + "src": "2430:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2430:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2429:9:17" + }, + "scope": 756, + "src": "2369:122:17", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 757, + "src": "242:2251:17", + "usedErrors": [ + 561, + 563 + ] + } + ], + "src": "31:2463:17" + } + }, + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableMixin.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\n\ncontract Ownable is IOwnable, OwnableMixin {\n event OwnerNominated(address newOwner);\n event OwnerChanged(address oldOwner, address newOwner);\n\n error NotNominated(address addr);\n\n function acceptOwnership() public override {\n OwnableStore storage store = _ownableStore();\n\n address currentNominatedOwner = store.nominatedOwner;\n if (msg.sender != currentNominatedOwner) {\n revert NotNominated(msg.sender);\n }\n\n emit OwnerChanged(store.owner, currentNominatedOwner);\n store.owner = currentNominatedOwner;\n\n store.nominatedOwner = address(0);\n }\n\n function nominateNewOwner(address newNominatedOwner) public override onlyOwnerIfSet {\n OwnableStore storage store = _ownableStore();\n\n if (newNominatedOwner == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newNominatedOwner == store.nominatedOwner) {\n revert ChangeError.NoChange();\n }\n\n store.nominatedOwner = newNominatedOwner;\n emit OwnerNominated(newNominatedOwner);\n }\n\n function renounceNomination() external override {\n OwnableStore storage store = _ownableStore();\n\n if (store.nominatedOwner != msg.sender) {\n revert NotNominated(msg.sender);\n }\n\n store.nominatedOwner = address(0);\n }\n\n function owner() external view override returns (address) {\n return _ownableStore().owner;\n }\n\n function nominatedOwner() external view override returns (address) {\n return _ownableStore().nominatedOwner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 415, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 240, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:12" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "./OwnableMixin.sol", + "id": 241, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 477, + "src": "56:28:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "file": "../interfaces/IOwnable.sol", + "id": 242, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 221, + "src": "85:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 243, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 16, + "src": "122:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 244, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 26, + "src": "159:35:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 245, + "name": "IOwnable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 220, + "src": "216:8:12" + }, + "id": 246, + "nodeType": "InheritanceSpecifier", + "src": "216:8:12" + }, + { + "baseName": { + "id": 247, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "226:12:12" + }, + "id": 248, + "nodeType": "InheritanceSpecifier", + "src": "226:12:12" + } + ], + "canonicalName": "Ownable", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 414, + "linearizedBaseContracts": [ + 414, + 476, + 494, + 220 + ], + "name": "Ownable", + "nameLocation": "205:7:12", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 252, + "name": "OwnerNominated", + "nameLocation": "251:14:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "274:8:12", + "nodeType": "VariableDeclaration", + "scope": 252, + "src": "266:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "266:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:18:12" + }, + "src": "245:39:12" + }, + { + "anonymous": false, + "id": 258, + "name": "OwnerChanged", + "nameLocation": "295:12:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 254, + "indexed": false, + "mutability": "mutable", + "name": "oldOwner", + "nameLocation": "316:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "308:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 256, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "334:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "326:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "326:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "307:36:12" + }, + "src": "289:55:12" + }, + { + "id": 262, + "name": "NotNominated", + "nameLocation": "356:12:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 260, + "mutability": "mutable", + "name": "addr", + "nameLocation": "377:4:12", + "nodeType": "VariableDeclaration", + "scope": 262, + "src": "369:12:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "369:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "368:14:12" + }, + "src": "350:33:12" + }, + { + "baseFunctions": [ + 201 + ], + "body": { + "id": 309, + "nodeType": "Block", + "src": "432:383:12", + "statements": [ + { + "assignments": [ + 268 + ], + "declarations": [ + { + "constant": false, + "id": 268, + "mutability": "mutable", + "name": "store", + "nameLocation": "463:5:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "442:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 267, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 266, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "442:12:12" + }, + "referencedDeclaration": 485, + "src": "442:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 271, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 269, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "471:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "471:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "442:44:12" + }, + { + "assignments": [ + 273 + ], + "declarations": [ + { + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "currentNominatedOwner", + "nameLocation": "505:21:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "497:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "497:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 276, + "initialValue": { + "expression": { + "id": 274, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "529:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 275, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "529:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "497:52:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 277, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "563:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "563:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 279, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "577:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "563:35:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 287, + "nodeType": "IfStatement", + "src": "559:97:12", + "trueBody": { + "id": 286, + "nodeType": "Block", + "src": "600:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 282, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "634:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "634:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 281, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "621:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "621:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 285, + "nodeType": "RevertStatement", + "src": "614:31:12" + } + ] + } + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 289, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "684:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 290, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "684:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 291, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "697:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 288, + "name": "OwnerChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "671:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "671:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 293, + "nodeType": "EmitStatement", + "src": "666:53:12" + }, + { + "expression": { + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 294, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "729:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "729:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 297, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "743:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "729:35:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "729:35:12" + }, + { + "expression": { + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 300, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "775:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "775:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "806:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "798:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 303, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "798:7:12", + "typeDescriptions": {} + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "798:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "775:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "775:33:12" + } + ] + }, + "functionSelector": "79ba5097", + "id": 310, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "398:15:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 264, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "423:8:12" + }, + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [], + "src": "413:2:12" + }, + "returnParameters": { + "id": 265, + "nodeType": "ParameterList", + "parameters": [], + "src": "432:0:12" + }, + "scope": 414, + "src": "389:426:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 206 + ], + "body": { + "id": 358, + "nodeType": "Block", + "src": "905:376:12", + "statements": [ + { + "assignments": [ + 320 + ], + "declarations": [ + { + "constant": false, + "id": 320, + "mutability": "mutable", + "name": "store", + "nameLocation": "936:5:12", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "915:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 319, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 318, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "915:12:12" + }, + "referencedDeclaration": 485, + "src": "915:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 323, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 321, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "944:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "944:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "915:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 324, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "974:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1003:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "995:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 325, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "995:7:12", + "typeDescriptions": {} + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "974:31:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 336, + "nodeType": "IfStatement", + "src": "970:95:12", + "trueBody": { + "id": 335, + "nodeType": "Block", + "src": "1007:58:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 330, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1028:12:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1028:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1028:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 334, + "nodeType": "RevertStatement", + "src": "1021:33:12" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 337, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1079:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 338, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1100:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 339, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1100:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1079:41:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 347, + "nodeType": "IfStatement", + "src": "1075:101:12", + "trueBody": { + "id": 346, + "nodeType": "Block", + "src": "1122:54:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 341, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1143:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1143:20:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1143:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "RevertStatement", + "src": "1136:29:12" + } + ] + } + }, + { + "expression": { + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 348, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1186:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1186:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 351, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1209:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1186:40:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 353, + "nodeType": "ExpressionStatement", + "src": "1186:40:12" + }, + { + "eventCall": { + "arguments": [ + { + "id": 355, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1256:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 354, + "name": "OwnerNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 252, + "src": "1241:14:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1241:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 357, + "nodeType": "EmitStatement", + "src": "1236:38:12" + } + ] + }, + "functionSelector": "1627540c", + "id": 359, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 316, + "kind": "modifierInvocation", + "modifierName": { + "id": 315, + "name": "onlyOwnerIfSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 447, + "src": "890:14:12" + }, + "nodeType": "ModifierInvocation", + "src": "890:14:12" + } + ], + "name": "nominateNewOwner", + "nameLocation": "830:16:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 314, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "881:8:12" + }, + "parameters": { + "id": 313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 312, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "855:17:12", + "nodeType": "VariableDeclaration", + "scope": 359, + "src": "847:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "847:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "846:27:12" + }, + "returnParameters": { + "id": 317, + "nodeType": "ParameterList", + "parameters": [], + "src": "905:0:12" + }, + "scope": 414, + "src": "821:460:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 209 + ], + "body": { + "id": 390, + "nodeType": "Block", + "src": "1335:211:12", + "statements": [ + { + "assignments": [ + 365 + ], + "declarations": [ + { + "constant": false, + "id": 365, + "mutability": "mutable", + "name": "store", + "nameLocation": "1366:5:12", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "1345:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 364, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 363, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "1345:12:12" + }, + "referencedDeclaration": 485, + "src": "1345:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 368, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 366, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1374:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1374:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 369, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1404:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1404:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 371, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1428:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1428:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1404:34:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 380, + "nodeType": "IfStatement", + "src": "1400:96:12", + "trueBody": { + "id": 379, + "nodeType": "Block", + "src": "1440:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 375, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1474:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1474:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 374, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "1461:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1461:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "RevertStatement", + "src": "1454:31:12" + } + ] + } + }, + { + "expression": { + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 381, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1506:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 383, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1506:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1537:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1529:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1529:7:12", + "typeDescriptions": {} + } + }, + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1529:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1506:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 389, + "nodeType": "ExpressionStatement", + "src": "1506:33:12" + } + ] + }, + "functionSelector": "718fe928", + "id": 391, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "1296:18:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 361, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1326:8:12" + }, + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "1314:2:12" + }, + "returnParameters": { + "id": 362, + "nodeType": "ParameterList", + "parameters": [], + "src": "1335:0:12" + }, + "scope": 414, + "src": "1287:259:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 214 + ], + "body": { + "id": 401, + "nodeType": "Block", + "src": "1610:45:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 397, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1627:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1627:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 399, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "1627:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 396, + "id": 400, + "nodeType": "Return", + "src": "1620:28:12" + } + ] + }, + "functionSelector": "8da5cb5b", + "id": 402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "1561:5:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 393, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:12" + }, + "parameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [], + "src": "1566:2:12" + }, + "returnParameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 395, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "1601:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1600:9:12" + }, + "scope": 414, + "src": "1552:103:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 219 + ], + "body": { + "id": 412, + "nodeType": "Block", + "src": "1728:54:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 408, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1745:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1745:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1745:30:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 407, + "id": 411, + "nodeType": "Return", + "src": "1738:37:12" + } + ] + }, + "functionSelector": "53a47bb7", + "id": 413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "1670:14:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 404, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1701:8:12" + }, + "parameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "1684:2:12" + }, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "1719:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 405, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1719:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1718:9:12" + }, + "scope": 414, + "src": "1661:121:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 415, + "src": "196:1588:12", + "usedErrors": [ + 5, + 10, + 24, + 262 + ] + } + ], + "src": "31:1754:12" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IERC721.sol\";\nimport \"../interfaces/IERC721Metadata.sol\";\nimport \"../interfaces/IERC721Receiver.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/AccessError.sol\";\nimport \"../errors/InitError.sol\";\nimport \"./ERC721Storage.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"../utils/StringUtil.sol\";\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol\n*/\n\ncontract ERC721 is IERC721, IERC721Metadata, ERC721Storage {\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n error CannotSelfApprove(address);\n error InvalidTransferRecipient(address);\n error TokenDoesNotExist(uint256);\n error TokenAlreadyMinted(uint256);\n\n function _initialize(\n string memory tokenName,\n string memory tokenSymbol,\n string memory baseTokenURI\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (bytes(store.name).length > 0 || bytes(store.symbol).length > 0 || bytes(store.baseTokenURI).length > 0) {\n revert InitError.AlreadyInitialized();\n }\n\n store.name = tokenName;\n store.symbol = tokenSymbol;\n store.baseTokenURI = baseTokenURI;\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return\n interfaceId == this.supportsInterface.selector || // ERC165\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId;\n }\n\n function balanceOf(address holder) public view virtual override returns (uint) {\n if (holder == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n return _erc721Store().balanceOf[holder];\n }\n\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().ownerOf[tokenId];\n }\n\n function name() external view virtual override returns (string memory) {\n return _erc721Store().name;\n }\n\n function symbol() external view virtual override returns (string memory) {\n return _erc721Store().symbol;\n }\n\n function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n string memory baseURI = _erc721Store().baseTokenURI;\n\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, StringUtil.uintToString(tokenId))) : \"\";\n }\n\n function approve(address to, uint256 tokenId) public virtual override {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n if (to == holder) {\n revert CannotSelfApprove(to);\n }\n\n if (msg.sender != holder && !isApprovedForAll(holder, msg.sender)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _approve(to, tokenId);\n }\n\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().tokenApprovals[tokenId];\n }\n\n function setApprovalForAll(address operator, bool approved) public virtual override {\n if (msg.sender == operator) {\n revert CannotSelfApprove(operator);\n }\n\n _erc721Store().operatorApprovals[msg.sender][operator] = approved;\n\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n function isApprovedForAll(address holder, address operator) public view virtual override returns (bool) {\n return _erc721Store().operatorApprovals[holder][operator];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n if (!_checkOnERC721Received(from, to, tokenId, data)) {\n revert InvalidTransferRecipient(to);\n }\n }\n\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _erc721Store().ownerOf[tokenId] != address(0);\n }\n\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address holder = ownerOf(tokenId);\n\n // Not checking tokenId existence since it is checked in ownerOf() and getApproved()\n\n return (spender == holder || getApproved(tokenId) == spender || isApprovedForAll(holder, spender));\n }\n\n function _mint(address to, uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (_exists(tokenId)) {\n revert TokenAlreadyMinted(tokenId);\n }\n\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n function _burn(uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n _approve(address(0), tokenId);\n\n store.balanceOf[holder] -= 1;\n delete store.ownerOf[tokenId];\n\n emit Transfer(holder, address(0), tokenId);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n\n if (ownerOf(tokenId) != from) {\n revert AccessError.Unauthorized(from);\n }\n\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n // Clear approvals from the previous holder\n _approve(address(0), tokenId);\n\n store.balanceOf[from] -= 1;\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n function _approve(address to, uint256 tokenId) internal virtual {\n _erc721Store().tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (AddressUtil.isContract(to)) {\n try IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch {\n return false;\n }\n } else {\n return true;\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "InitError": [ + 32 + ], + "StringUtil": [ + 2369 + ] + }, + "id": 1642, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 818, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:19" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "file": "../interfaces/IERC721.sol", + "id": 819, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 158, + "src": "56:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "file": "../interfaces/IERC721Metadata.sol", + "id": 820, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 181, + "src": "92:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "file": "../interfaces/IERC721Receiver.sol", + "id": 821, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 197, + "src": "136:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 822, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 16, + "src": "180:36:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 823, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 7, + "src": "217:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 824, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 33, + "src": "253:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "file": "./ERC721Storage.sol", + "id": 825, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1678, + "src": "287:29:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 826, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1697, + "src": "317:34:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "file": "../utils/StringUtil.sol", + "id": 827, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 2370, + "src": "352:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 828, + "name": "IERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 157, + "src": "566:7:19" + }, + "id": 829, + "nodeType": "InheritanceSpecifier", + "src": "566:7:19" + }, + { + "baseName": { + "id": 830, + "name": "IERC721Metadata", + "nodeType": "IdentifierPath", + "referencedDeclaration": 180, + "src": "575:15:19" + }, + "id": 831, + "nodeType": "InheritanceSpecifier", + "src": "575:15:19" + }, + { + "baseName": { + "id": 832, + "name": "ERC721Storage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1677, + "src": "592:13:19" + }, + "id": 833, + "nodeType": "InheritanceSpecifier", + "src": "592:13:19" + } + ], + "canonicalName": "ERC721", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1641, + "linearizedBaseContracts": [ + 1641, + 1677, + 180, + 157, + 78 + ], + "name": "ERC721", + "nameLocation": "556:6:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 841, + "name": "Transfer", + "nameLocation": "618:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 835, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "643:4:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "627:20:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 834, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "627:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 837, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "665:2:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "649:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 839, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "685:7:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "669:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "626:67:19" + }, + "src": "612:82:19" + }, + { + "anonymous": false, + "id": 849, + "name": "Approval", + "nameLocation": "705:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 843, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "730:5:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "714:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 845, + "indexed": true, + "mutability": "mutable", + "name": "approved", + "nameLocation": "753:8:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "737:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 844, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "737:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 847, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "763:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "763:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "713:74:19" + }, + "src": "699:89:19" + }, + { + "anonymous": false, + "id": 857, + "name": "ApprovalForAll", + "nameLocation": "799:14:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 851, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "830:5:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "814:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "814:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 853, + "indexed": true, + "mutability": "mutable", + "name": "operator", + "nameLocation": "853:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "837:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 852, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 855, + "indexed": false, + "mutability": "mutable", + "name": "approved", + "nameLocation": "868:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "863:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 854, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "863:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "813:64:19" + }, + "src": "793:85:19" + }, + { + "id": 861, + "name": "CannotSelfApprove", + "nameLocation": "890:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 859, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 861, + "src": "908:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "908:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "907:9:19" + }, + "src": "884:33:19" + }, + { + "id": 865, + "name": "InvalidTransferRecipient", + "nameLocation": "928:24:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 865, + "src": "953:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "953:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "952:9:19" + }, + "src": "922:40:19" + }, + { + "id": 869, + "name": "TokenDoesNotExist", + "nameLocation": "973:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "991:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "991:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "990:9:19" + }, + "src": "967:33:19" + }, + { + "id": 873, + "name": "TokenAlreadyMinted", + "nameLocation": "1011:18:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1030:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1030:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1029:9:19" + }, + "src": "1005:34:19" + }, + { + "body": { + "id": 939, + "nodeType": "Block", + "src": "1193:350:19", + "statements": [ + { + "assignments": [ + 884 + ], + "declarations": [ + { + "constant": false, + "id": 884, + "mutability": "mutable", + "name": "store", + "nameLocation": "1223:5:19", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "1203:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 883, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 882, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "1203:11:19" + }, + "referencedDeclaration": 1668, + "src": "1203:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 887, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 885, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "1231:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1203:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 890, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1265:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1265:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1259:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 888, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1259:5:19", + "typeDescriptions": {} + } + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1259:17:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1259:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1286:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1259:28:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 898, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1297:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 899, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1297:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1291:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 896, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1291:5:19", + "typeDescriptions": {} + } + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1291:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1291:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1320:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1291:30:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:62:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 907, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1331:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1331:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1325:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 905, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1325:5:19", + "typeDescriptions": {} + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1325:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1325:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1360:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1325:36:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:102:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 920, + "nodeType": "IfStatement", + "src": "1255:170:19", + "trueBody": { + "id": 919, + "nodeType": "Block", + "src": "1363:62:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 914, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1384:9:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "1384:28:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1384:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 918, + "nodeType": "RevertStatement", + "src": "1377:37:19" + } + ] + } + }, + { + "expression": { + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 921, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1435:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1435:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 924, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 875, + "src": "1448:9:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1435:22:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 926, + "nodeType": "ExpressionStatement", + "src": "1435:22:19" + }, + { + "expression": { + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 927, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1467:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1467:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 930, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "1482:11:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1467:26:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 932, + "nodeType": "ExpressionStatement", + "src": "1467:26:19" + }, + { + "expression": { + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 933, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1503:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1503:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 936, + "name": "baseTokenURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "1524:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1503:33:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "1503:33:19" + } + ] + }, + "id": 940, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initialize", + "nameLocation": "1054:11:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 875, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "1089:9:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1075:23:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 874, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1075:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "1122:11:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1108:25:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 876, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1108:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 879, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "1157:12:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1143:26:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 878, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1143:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1065:110:19" + }, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [], + "src": "1193:0:19" + }, + "scope": 1641, + "src": "1045:498:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 77 + ], + "body": { + "id": 968, + "nodeType": "Block", + "src": "1640:212:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 948, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1669:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 949, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1684:4:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721_$1641", + "typeString": "contract ERC721" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 969, + "src": "1684:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1684:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1669:46:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 953, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1741:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 955, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "1761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + ], + "id": 954, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1756:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1756:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721_$157", + "typeString": "type(contract IERC721)" + } + }, + "id": 957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1756:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1741:40:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:112:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 960, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1797:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 962, + "name": "IERC721Metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 180, + "src": "1817:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + ], + "id": 961, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1812:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1812:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721Metadata_$180", + "typeString": "type(contract IERC721Metadata)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1812:33:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1797:48:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:176:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 947, + "id": 967, + "nodeType": "Return", + "src": "1650:195:19" + } + ] + }, + "functionSelector": "01ffc9a7", + "id": 969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "1558:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 944, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1616:8:19" + }, + "parameters": { + "id": 943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 942, + "mutability": "mutable", + "name": "interfaceId", + "nameLocation": "1583:11:19", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1576:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 941, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1576:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "1575:20:19" + }, + "returnParameters": { + "id": 947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1634:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 945, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1634:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1633:6:19" + }, + "scope": 1641, + "src": "1549:303:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 90 + ], + "body": { + "id": 996, + "nodeType": "Block", + "src": "1937:150:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 977, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "1951:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1969:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1961:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1961:7:19", + "typeDescriptions": {} + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1961:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1951:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 989, + "nodeType": "IfStatement", + "src": "1947:84:19", + "trueBody": { + "id": 988, + "nodeType": "Block", + "src": "1973:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 983, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1994:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1994:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 987, + "nodeType": "RevertStatement", + "src": "1987:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 990, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2048:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2048:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "2048:24:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 994, + "indexExpression": { + "id": 993, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2073:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2048:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 976, + "id": 995, + "nodeType": "Return", + "src": "2041:39:19" + } + ] + }, + "functionSelector": "70a08231", + "id": 997, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "1867:9:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 973, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1913:8:19" + }, + "parameters": { + "id": 972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 971, + "mutability": "mutable", + "name": "holder", + "nameLocation": "1885:6:19", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1877:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1877:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1876:16:19" + }, + "returnParameters": { + "id": 976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 975, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1931:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 974, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1931:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1930:6:19" + }, + "scope": 1641, + "src": "1858:229:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 97 + ], + "body": { + "id": 1021, + "nodeType": "Block", + "src": "2174:146:19", + "statements": [ + { + "condition": { + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2188:17:19", + "subExpression": { + "arguments": [ + { + "id": 1006, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2197:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1005, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2189:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1014, + "nodeType": "IfStatement", + "src": "2184:81:19", + "trueBody": { + "id": 1013, + "nodeType": "Block", + "src": "2207:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1010, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2246:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1009, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2228:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2228:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1012, + "nodeType": "RevertStatement", + "src": "2221:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1015, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2282:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2282:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "2282:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1019, + "indexExpression": { + "id": 1018, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2305:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2282:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1004, + "id": 1020, + "nodeType": "Return", + "src": "2275:38:19" + } + ] + }, + "functionSelector": "6352211e", + "id": 1022, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "2102:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1001, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2147:8:19" + }, + "parameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 999, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2118:7:19", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2110:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2110:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2109:17:19" + }, + "returnParameters": { + "id": 1004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2165:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1002, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2165:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2164:9:19" + }, + "scope": 1641, + "src": "2093:227:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 167 + ], + "body": { + "id": 1032, + "nodeType": "Block", + "src": "2397:43:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1028, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2414:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2414:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "2414:19:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1027, + "id": 1031, + "nodeType": "Return", + "src": "2407:26:19" + } + ] + }, + "functionSelector": "06fdde03", + "id": 1033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "2335:4:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1024, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2364:8:19" + }, + "parameters": { + "id": 1023, + "nodeType": "ParameterList", + "parameters": [], + "src": "2339:2:19" + }, + "returnParameters": { + "id": 1027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1026, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1033, + "src": "2382:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1025, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2382:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2381:15:19" + }, + "scope": 1641, + "src": "2326:114:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 172 + ], + "body": { + "id": 1043, + "nodeType": "Block", + "src": "2519:45:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1039, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2536:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1041, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "2536:21:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1038, + "id": 1042, + "nodeType": "Return", + "src": "2529:28:19" + } + ] + }, + "functionSelector": "95d89b41", + "id": 1044, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "2455:6:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1035, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2486:8:19" + }, + "parameters": { + "id": 1034, + "nodeType": "ParameterList", + "parameters": [], + "src": "2461:2:19" + }, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1037, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1044, + "src": "2504:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2504:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2503:15:19" + }, + "scope": 1641, + "src": "2446:118:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 179 + ], + "body": { + "id": 1089, + "nodeType": "Block", + "src": "2660:277:19", + "statements": [ + { + "condition": { + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2674:17:19", + "subExpression": { + "arguments": [ + { + "id": 1053, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2683:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1052, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2675:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2675:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1061, + "nodeType": "IfStatement", + "src": "2670:81:19", + "trueBody": { + "id": 1060, + "nodeType": "Block", + "src": "2693:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1057, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2732:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1056, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2714:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2714:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1059, + "nodeType": "RevertStatement", + "src": "2707:33:19" + } + ] + } + }, + { + "assignments": [ + 1063 + ], + "declarations": [ + { + "constant": false, + "id": 1063, + "mutability": "mutable", + "name": "baseURI", + "nameLocation": "2775:7:19", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "2761:21:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1062, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2761:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 1067, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1064, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2785:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2785:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "2785:27:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2761:51:19" + }, + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 1070, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2836:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2830:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1068, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2830:5:19", + "typeDescriptions": {} + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2830:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2830:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2854:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2830:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "", + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "id": 1087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2830:100:19", + "trueExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1079, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2882:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "id": 1082, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2915:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1080, + "name": "StringUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "2891:10:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_StringUtil_$2369_$", + "typeString": "type(library StringUtil)" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uintToString", + "nodeType": "MemberAccess", + "referencedDeclaration": 2368, + "src": "2891:23:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2891:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1077, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2865:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2865:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2865:59:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2858:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 1075, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2858:6:19", + "typeDescriptions": {} + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2858:67:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1051, + "id": 1088, + "nodeType": "Return", + "src": "2823:107:19" + } + ] + }, + "functionSelector": "c87b56dd", + "id": 1090, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "2579:8:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1048, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2627:8:19" + }, + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1046, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2596:7:19", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2588:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2588:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2587:17:19" + }, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2645:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2645:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2644:15:19" + }, + "scope": 1641, + "src": "2570:367:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 133 + ], + "body": { + "id": 1145, + "nodeType": "Block", + "src": "3013:366:19", + "statements": [ + { + "assignments": [ + 1100 + ], + "declarations": [ + { + "constant": false, + "id": 1100, + "mutability": "mutable", + "name": "store", + "nameLocation": "3043:5:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3023:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1098, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "3023:11:19" + }, + "referencedDeclaration": 1668, + "src": "3023:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1103, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1101, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3051:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3023:42:19" + }, + { + "assignments": [ + 1105 + ], + "declarations": [ + { + "constant": false, + "id": 1105, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3083:6:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3075:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3075:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1110, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1106, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1100, + "src": "3092:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "3092:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1109, + "indexExpression": { + "id": 1108, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3106:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3092:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3075:39:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1111, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3129:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1112, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3135:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3129:12:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1119, + "nodeType": "IfStatement", + "src": "3125:71:19", + "trueBody": { + "id": 1118, + "nodeType": "Block", + "src": "3143:53:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1115, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3182:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1114, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3164:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1117, + "nodeType": "RevertStatement", + "src": "3157:28:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3210:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3210:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1122, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3224:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3210:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3234:37:19", + "subExpression": { + "arguments": [ + { + "id": 1125, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3252:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1126, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3260:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3260:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "3235:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3210:61:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1139, + "nodeType": "IfStatement", + "src": "3206:135:19", + "trueBody": { + "id": 1138, + "nodeType": "Block", + "src": "3273:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1134, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3319:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3319:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1131, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "3294:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "3294:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3294:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1137, + "nodeType": "RevertStatement", + "src": "3287:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1141, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3360:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1142, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3364:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1140, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "3351:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3351:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1144, + "nodeType": "ExpressionStatement", + "src": "3351:21:19" + } + ] + }, + "functionSelector": "095ea7b3", + "id": 1146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2952:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3004:8:19" + }, + "parameters": { + "id": 1095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "mutability": "mutable", + "name": "to", + "nameLocation": "2968:2:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2960:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2960:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1094, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2980:7:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2972:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2972:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2959:29:19" + }, + "returnParameters": { + "id": 1097, + "nodeType": "ParameterList", + "parameters": [], + "src": "3013:0:19" + }, + "scope": 1641, + "src": "2943:436:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 147 + ], + "body": { + "id": 1170, + "nodeType": "Block", + "src": "3470:153:19", + "statements": [ + { + "condition": { + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3484:17:19", + "subExpression": { + "arguments": [ + { + "id": 1155, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3493:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1154, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "3485:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3485:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1163, + "nodeType": "IfStatement", + "src": "3480:81:19", + "trueBody": { + "id": 1162, + "nodeType": "Block", + "src": "3503:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1159, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3542:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1158, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "3524:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3524:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1161, + "nodeType": "RevertStatement", + "src": "3517:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1164, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3578:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3578:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "3578:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1168, + "indexExpression": { + "id": 1167, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3608:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3578:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1153, + "id": 1169, + "nodeType": "Return", + "src": "3571:45:19" + } + ] + }, + "functionSelector": "081812fc", + "id": 1171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "3394:11:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1150, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3443:8:19" + }, + "parameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1148, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3405:17:19" + }, + "returnParameters": { + "id": 1153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1152, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3461:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3461:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3460:9:19" + }, + "scope": 1641, + "src": "3385:238:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 140 + ], + "body": { + "id": 1207, + "nodeType": "Block", + "src": "3713:241:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1179, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3727:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3727:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1181, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3741:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3727:22:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1188, + "nodeType": "IfStatement", + "src": "3723:87:19", + "trueBody": { + "id": 1187, + "nodeType": "Block", + "src": "3751:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1184, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3790:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1183, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3772:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3772:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1186, + "nodeType": "RevertStatement", + "src": "3765:34:19" + } + ] + } + }, + { + "expression": { + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1189, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3820:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3820:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "3820:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1194, + "indexExpression": { + "expression": { + "id": 1192, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3853:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3853:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3820:44:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1196, + "indexExpression": { + "id": 1195, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3865:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3820:54:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1197, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3877:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3820:65:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1199, + "nodeType": "ExpressionStatement", + "src": "3820:65:19" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 1201, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3916:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3916:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1203, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3928:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1204, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3938:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1200, + "name": "ApprovalForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 857, + "src": "3901:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,address,bool)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3901:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1206, + "nodeType": "EmitStatement", + "src": "3896:51:19" + } + ] + }, + "functionSelector": "a22cb465", + "id": 1208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "3638:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3704:8:19" + }, + "parameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1173, + "mutability": "mutable", + "name": "operator", + "nameLocation": "3664:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3656:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3656:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "mutability": "mutable", + "name": "approved", + "nameLocation": "3679:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3674:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1174, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3674:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3655:33:19" + }, + "returnParameters": { + "id": 1178, + "nodeType": "ParameterList", + "parameters": [], + "src": "3713:0:19" + }, + "scope": 1641, + "src": "3629:325:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 156 + ], + "body": { + "id": 1226, + "nodeType": "Block", + "src": "4064:74:19", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1218, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "4081:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4081:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "4081:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1222, + "indexExpression": { + "id": 1221, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "4114:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:40:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1224, + "indexExpression": { + "id": 1223, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "4122:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:50:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1217, + "id": 1225, + "nodeType": "Return", + "src": "4074:57:19" + } + ] + }, + "functionSelector": "e985e9c5", + "id": 1227, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "3969:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1214, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4040:8:19" + }, + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3994:6:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "3986:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1209, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3986:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "mutability": "mutable", + "name": "operator", + "nameLocation": "4010:8:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4002:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4002:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3985:34:19" + }, + "returnParameters": { + "id": 1217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1216, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4058:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1215, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4058:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4057:6:19" + }, + "scope": 1641, + "src": "3960:178:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 126 + ], + "body": { + "id": 1258, + "nodeType": "Block", + "src": "4263:169:19", + "statements": [ + { + "condition": { + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4277:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1238, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4297:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4297:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1240, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4309:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1237, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4278:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4278:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1251, + "nodeType": "IfStatement", + "src": "4273:114:19", + "trueBody": { + "id": 1250, + "nodeType": "Block", + "src": "4319:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1246, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4365:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4365:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1243, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4340:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4340:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4340:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1249, + "nodeType": "RevertStatement", + "src": "4333:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1253, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1229, + "src": "4407:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1254, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "4413:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1255, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4417:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1252, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4397:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4397:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1257, + "nodeType": "ExpressionStatement", + "src": "4397:28:19" + } + ] + }, + "functionSelector": "23b872dd", + "id": 1259, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "4153:12:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1235, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4254:8:19" + }, + "parameters": { + "id": 1234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1229, + "mutability": "mutable", + "name": "from", + "nameLocation": "4183:4:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4175:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4175:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "to", + "nameLocation": "4205:2:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4197:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1230, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4197:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1233, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4225:7:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4217:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1232, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4217:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4165:73:19" + }, + "returnParameters": { + "id": 1236, + "nodeType": "ParameterList", + "parameters": [], + "src": "4263:0:19" + }, + "scope": 1641, + "src": "4144:288:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 117 + ], + "body": { + "id": 1276, + "nodeType": "Block", + "src": "4561:56:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1270, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "4588:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1271, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "4594:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1272, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4598:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4607:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 1269, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1277, + 1324 + ], + "referencedDeclaration": 1324, + "src": "4571:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1275, + "nodeType": "ExpressionStatement", + "src": "4571:39:19" + } + ] + }, + "functionSelector": "42842e0e", + "id": 1277, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4447:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1267, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4552:8:19" + }, + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1261, + "mutability": "mutable", + "name": "from", + "nameLocation": "4481:4:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4473:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1260, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4473:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "mutability": "mutable", + "name": "to", + "nameLocation": "4503:2:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4495:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4495:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4523:7:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4515:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4515:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4463:73:19" + }, + "returnParameters": { + "id": 1268, + "nodeType": "ParameterList", + "parameters": [], + "src": "4561:0:19" + }, + "scope": 1641, + "src": "4438:179:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 108 + ], + "body": { + "id": 1323, + "nodeType": "Block", + "src": "4773:292:19", + "statements": [ + { + "condition": { + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4787:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1290, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4807:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4807:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1292, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4819:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1289, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4788:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4788:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1303, + "nodeType": "IfStatement", + "src": "4783:114:19", + "trueBody": { + "id": 1302, + "nodeType": "Block", + "src": "4829:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1298, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4875:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4875:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1295, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4850:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4850:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4850:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1301, + "nodeType": "RevertStatement", + "src": "4843:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1305, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4917:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1306, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4923:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1307, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1304, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4907:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4907:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1309, + "nodeType": "ExpressionStatement", + "src": "4907:28:19" + }, + { + "condition": { + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4949:48:19", + "subExpression": { + "arguments": [ + { + "id": 1311, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4973:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1312, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4979:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1313, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4983:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1314, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "4992:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1310, + "name": "_checkOnERC721Received", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1640, + "src": "4950:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4950:47:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1322, + "nodeType": "IfStatement", + "src": "4945:114:19", + "trueBody": { + "id": 1321, + "nodeType": "Block", + "src": "4999:60:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1318, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "5045:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1317, + "name": "InvalidTransferRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 865, + "src": "5020:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5020:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1320, + "nodeType": "RevertStatement", + "src": "5013:35:19" + } + ] + } + } + ] + }, + "functionSelector": "b88d4fde", + "id": 1324, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4632:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1287, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4764:8:19" + }, + "parameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1279, + "mutability": "mutable", + "name": "from", + "nameLocation": "4666:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4658:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1281, + "mutability": "mutable", + "name": "to", + "nameLocation": "4688:2:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4680:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1280, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4680:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1283, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4708:7:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4700:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4700:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1285, + "mutability": "mutable", + "name": "data", + "nameLocation": "4738:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4725:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1284, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4725:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4648:100:19" + }, + "returnParameters": { + "id": 1288, + "nodeType": "ParameterList", + "parameters": [], + "src": "4773:0:19" + }, + "scope": 1641, + "src": "4623:442:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 1342, + "nodeType": "Block", + "src": "5142:69:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1331, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5159:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5159:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5159:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1335, + "indexExpression": { + "id": 1334, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "5182:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5159:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5202:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5194:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5194:7:19", + "typeDescriptions": {} + } + }, + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5194:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5159:45:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1330, + "id": 1341, + "nodeType": "Return", + "src": "5152:52:19" + } + ] + }, + "id": 1343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_exists", + "nameLocation": "5080:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1326, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5096:7:19", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5088:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5088:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5087:17:19" + }, + "returnParameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5136:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1328, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5135:6:19" + }, + "scope": 1641, + "src": "5071:140:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1374, + "nodeType": "Block", + "src": "5316:253:19", + "statements": [ + { + "assignments": [ + 1353 + ], + "declarations": [ + { + "constant": false, + "id": 1353, + "mutability": "mutable", + "name": "holder", + "nameLocation": "5334:6:19", + "nodeType": "VariableDeclaration", + "scope": 1374, + "src": "5326:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1352, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5326:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1357, + "initialValue": { + "arguments": [ + { + "id": 1355, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5351:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1354, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "5343:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5343:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5326:33:19" + }, + { + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1358, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5472:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1359, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5483:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5472:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1362, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5505:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1361, + "name": "getApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5493:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5493:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1364, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5517:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5493:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:52:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 1368, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5545:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1369, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5553:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1367, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "5528:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5528:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:89:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5471:91:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1351, + "id": 1373, + "nodeType": "Return", + "src": "5464:98:19" + } + ] + }, + "id": 1375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isApprovedOrOwner", + "nameLocation": "5226:18:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "mutability": "mutable", + "name": "spender", + "nameLocation": "5253:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5245:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5245:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1347, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5270:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5262:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5244:34:19" + }, + "returnParameters": { + "id": 1351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5310:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5310:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5309:6:19" + }, + "scope": 1641, + "src": "5217:352:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1435, + "nodeType": "Block", + "src": "5636:360:19", + "statements": [ + { + "assignments": [ + 1384 + ], + "declarations": [ + { + "constant": false, + "id": 1384, + "mutability": "mutable", + "name": "store", + "nameLocation": "5666:5:19", + "nodeType": "VariableDeclaration", + "scope": 1435, + "src": "5646:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1383, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1382, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "5646:11:19" + }, + "referencedDeclaration": 1668, + "src": "5646:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1385, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5674:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5674:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5646:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1388, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5702:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5716:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5708:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5708:7:19", + "typeDescriptions": {} + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5708:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5702:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1400, + "nodeType": "IfStatement", + "src": "5698:80:19", + "trueBody": { + "id": 1399, + "nodeType": "Block", + "src": "5720:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1394, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "5741:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "5741:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1398, + "nodeType": "RevertStatement", + "src": "5734:33:19" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 1402, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5800:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1401, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "5792:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1409, + "nodeType": "IfStatement", + "src": "5788:81:19", + "trueBody": { + "id": 1408, + "nodeType": "Block", + "src": "5810:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1405, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5850:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1404, + "name": "TokenAlreadyMinted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "5831:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5831:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1407, + "nodeType": "RevertStatement", + "src": "5824:34:19" + } + ] + } + }, + { + "expression": { + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1410, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5879:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1413, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "5879:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1414, + "indexExpression": { + "id": 1412, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5895:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5879:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5902:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5879:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1417, + "nodeType": "ExpressionStatement", + "src": "5879:24:19" + }, + { + "expression": { + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1418, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5913:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5913:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1422, + "indexExpression": { + "id": 1420, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5913:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1423, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5938:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5913:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1425, + "nodeType": "ExpressionStatement", + "src": "5913:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5973:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5965:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5965:7:19", + "typeDescriptions": {} + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5965:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1431, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5977:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1432, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5981:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1426, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "5956:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5956:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1434, + "nodeType": "EmitStatement", + "src": "5951:38:19" + } + ] + }, + "id": 1436, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nameLocation": "5584:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "mutability": "mutable", + "name": "to", + "nameLocation": "5598:2:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5590:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5590:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1379, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5610:7:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5602:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1378, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5602:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5589:29:19" + }, + "returnParameters": { + "id": 1381, + "nodeType": "ParameterList", + "parameters": [], + "src": "5636:0:19" + }, + "scope": 1641, + "src": "5575:421:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1485, + "nodeType": "Block", + "src": "6051:279:19", + "statements": [ + { + "assignments": [ + 1443 + ], + "declarations": [ + { + "constant": false, + "id": 1443, + "mutability": "mutable", + "name": "store", + "nameLocation": "6081:5:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6061:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1442, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1441, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6061:11:19" + }, + "referencedDeclaration": 1668, + "src": "6061:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1446, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1444, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6089:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6089:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6061:42:19" + }, + { + "assignments": [ + 1448 + ], + "declarations": [ + { + "constant": false, + "id": 1448, + "mutability": "mutable", + "name": "holder", + "nameLocation": "6121:6:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6113:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6113:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1453, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1449, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6130:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6130:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1452, + "indexExpression": { + "id": 1451, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6144:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6130:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6113:39:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6180:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6172:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1455, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6172:7:19", + "typeDescriptions": {} + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6172:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1459, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6184:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1454, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6163:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1461, + "nodeType": "ExpressionStatement", + "src": "6163:29:19" + }, + { + "expression": { + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1462, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6203:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6203:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1466, + "indexExpression": { + "id": 1464, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6219:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6203:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6230:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6203:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1469, + "nodeType": "ExpressionStatement", + "src": "6203:28:19" + }, + { + "expression": { + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6241:29:19", + "subExpression": { + "baseExpression": { + "expression": { + "id": 1470, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6248:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6248:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1473, + "indexExpression": { + "id": 1472, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6248:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1475, + "nodeType": "ExpressionStatement", + "src": "6241:29:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1477, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6295:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6311:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6303:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6303:7:19", + "typeDescriptions": {} + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6303:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1482, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6315:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1476, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6286:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6286:37:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "EmitStatement", + "src": "6281:42:19" + } + ] + }, + "id": 1486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nameLocation": "6011:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1438, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6025:7:19", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "6017:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1437, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6017:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6016:17:19" + }, + "returnParameters": { + "id": 1440, + "nodeType": "ParameterList", + "parameters": [], + "src": "6051:0:19" + }, + "scope": 1641, + "src": "6002:328:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1565, + "nodeType": "Block", + "src": "6445:494:19", + "statements": [ + { + "assignments": [ + 1497 + ], + "declarations": [ + { + "constant": false, + "id": 1497, + "mutability": "mutable", + "name": "store", + "nameLocation": "6475:5:19", + "nodeType": "VariableDeclaration", + "scope": 1565, + "src": "6455:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1496, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1495, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6455:11:19" + }, + "referencedDeclaration": 1668, + "src": "6455:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1500, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1498, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6483:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6483:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6455:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1502, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6520:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1501, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "6512:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1504, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6532:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6512:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1513, + "nodeType": "IfStatement", + "src": "6508:92:19", + "trueBody": { + "id": 1512, + "nodeType": "Block", + "src": "6538:62:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1509, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6584:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1506, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "6559:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "6559:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6559:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1511, + "nodeType": "RevertStatement", + "src": "6552:37:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1514, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6614:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6628:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6620:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6620:7:19", + "typeDescriptions": {} + } + }, + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6620:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1526, + "nodeType": "IfStatement", + "src": "6610:80:19", + "trueBody": { + "id": 1525, + "nodeType": "Block", + "src": "6632:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1520, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "6653:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "6653:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1524, + "nodeType": "RevertStatement", + "src": "6646:33:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6769:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1528, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6761:7:19", + "typeDescriptions": {} + } + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6761:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1532, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6773:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1527, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6752:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6752:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1534, + "nodeType": "ExpressionStatement", + "src": "6752:29:19" + }, + { + "expression": { + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1535, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6792:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6792:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1539, + "indexExpression": { + "id": 1537, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6808:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6792:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6792:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1542, + "nodeType": "ExpressionStatement", + "src": "6792:26:19" + }, + { + "expression": { + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1543, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6828:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6828:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1547, + "indexExpression": { + "id": 1545, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6844:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6828:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6851:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6828:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1550, + "nodeType": "ExpressionStatement", + "src": "6828:24:19" + }, + { + "expression": { + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1551, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6862:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6862:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1555, + "indexExpression": { + "id": 1553, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6876:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6862:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1556, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6887:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6862:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1558, + "nodeType": "ExpressionStatement", + "src": "6862:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1560, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6914:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1561, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6920:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1562, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6924:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1559, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6905:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6905:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1564, + "nodeType": "EmitStatement", + "src": "6900:32:19" + } + ] + }, + "id": 1566, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nameLocation": "6345:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1488, + "mutability": "mutable", + "name": "from", + "nameLocation": "6372:4:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6364:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6364:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1490, + "mutability": "mutable", + "name": "to", + "nameLocation": "6394:2:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6386:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6386:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1492, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6354:73:19" + }, + "returnParameters": { + "id": 1494, + "nodeType": "ParameterList", + "parameters": [], + "src": "6445:0:19" + }, + "scope": 1641, + "src": "6336:603:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1590, + "nodeType": "Block", + "src": "7009:121:19", + "statements": [ + { + "expression": { + "id": 1579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1573, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "7019:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7019:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1575, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "7019:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1577, + "indexExpression": { + "id": 1576, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7049:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7019:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1578, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7060:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7019:43:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1580, + "nodeType": "ExpressionStatement", + "src": "7019:43:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 1584, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7101:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1582, + "name": "ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1641, + "src": "7086:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721_$1641_$", + "typeString": "type(contract ERC721)" + } + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1022, + "src": "7086:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7086:23:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1586, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7111:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1587, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7115:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1581, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "7077:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7077:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "EmitStatement", + "src": "7072:51:19" + } + ] + }, + "id": 1591, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nameLocation": "6954:8:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1568, + "mutability": "mutable", + "name": "to", + "nameLocation": "6971:2:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6963:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6963:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1570, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6983:7:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6975:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6975:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6962:29:19" + }, + "returnParameters": { + "id": 1572, + "nodeType": "ParameterList", + "parameters": [], + "src": "7009:0:19" + }, + "scope": 1641, + "src": "6945:185:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1639, + "nodeType": "Block", + "src": "7291:355:19", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 1606, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7328:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1604, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "7305:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "7305:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7305:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1637, + "nodeType": "Block", + "src": "7604:36:19", + "statements": [ + { + "expression": { + "hexValue": "74727565", + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7625:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1603, + "id": 1636, + "nodeType": "Return", + "src": "7618:11:19" + } + ] + }, + "id": 1638, + "nodeType": "IfStatement", + "src": "7301:339:19", + "trueBody": { + "id": 1634, + "nodeType": "Block", + "src": "7333:265:19", + "statements": [ + { + "clauses": [ + { + "block": { + "id": 1627, + "nodeType": "Block", + "src": "7445:91:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1621, + "name": "retval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1619, + "src": "7470:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 1622, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7480:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7480:32:19", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function IERC721Receiver.onERC721Received(address,address,uint256,bytes memory) returns (bytes4)" + } + }, + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7480:41:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "7470:51:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1603, + "id": 1626, + "nodeType": "Return", + "src": "7463:58:19" + } + ] + }, + "errorName": "", + "id": 1628, + "nodeType": "TryCatchClause", + "parameters": { + "id": 1620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1619, + "mutability": "mutable", + "name": "retval", + "nameLocation": "7437:6:19", + "nodeType": "VariableDeclaration", + "scope": 1628, + "src": "7430:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1618, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "7430:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "7429:15:19" + }, + "src": "7421:115:19" + }, + { + "block": { + "id": 1631, + "nodeType": "Block", + "src": "7543:45:19", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7568:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1603, + "id": 1630, + "nodeType": "Return", + "src": "7561:12:19" + } + ] + }, + "errorName": "", + "id": 1632, + "nodeType": "TryCatchClause", + "src": "7537:51:19" + } + ], + "externalCall": { + "arguments": [ + { + "expression": { + "id": 1612, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7388:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7388:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1614, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "7400:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1615, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1597, + "src": "7406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1616, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1599, + "src": "7415:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 1609, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7367:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1608, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7351:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721Receiver_$196", + "typeString": "contract IERC721Receiver" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7351:36:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:69:19", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "id": 1633, + "nodeType": "TryStatement", + "src": "7347:241:19" + } + ] + } + } + ] + }, + "id": 1640, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOnERC721Received", + "nameLocation": "7145:22:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "from", + "nameLocation": "7185:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7177:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1592, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7177:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "to", + "nameLocation": "7207:2:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7199:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1594, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7199:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1597, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "7227:7:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7219:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7219:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1599, + "mutability": "mutable", + "name": "data", + "nameLocation": "7257:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7244:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1598, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7244:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7167:100:19" + }, + "returnParameters": { + "id": 1603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1602, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7285:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1601, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7285:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7284:6:19" + }, + "scope": 1641, + "src": "7136:510:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1642, + "src": "547:7101:19", + "usedErrors": [ + 5, + 10, + 861, + 865, + 869, + 873 + ] + } + ], + "src": "31:7618:19" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUUPSImplementation {\n function upgradeTo(address newImplementation) external;\n\n function simulateUpgradeTo(address newImplementation) external;\n\n function getImplementation() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "exportedSymbols": { + "IUUPSImplementation": [ + 238 + ] + }, + "id": 239, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 222, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:11" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUUPSImplementation", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 238, + "linearizedBaseContracts": [ + 238 + ], + "name": "IUUPSImplementation", + "nameLocation": "66:19:11", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "3659cfe6", + "id": 227, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeTo", + "nameLocation": "101:9:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 224, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "119:17:11", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "111:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 223, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "111:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "110:27:11" + }, + "returnParameters": { + "id": 226, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:11" + }, + "scope": 238, + "src": "92:55:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c7f62cda", + "id": 232, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "162:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "188:17:11", + "nodeType": "VariableDeclaration", + "scope": 232, + "src": "180:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "180:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "179:27:11" + }, + "returnParameters": { + "id": 231, + "nodeType": "ParameterList", + "parameters": [], + "src": "215:0:11" + }, + "scope": 238, + "src": "153:63:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "aaf10f42", + "id": 237, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "231:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 233, + "nodeType": "ParameterList", + "parameters": [], + "src": "248:2:11" + }, + "returnParameters": { + "id": 236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 235, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 237, + "src": "274:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "273:9:11" + }, + "scope": 238, + "src": "222:61:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 239, + "src": "56:229:11", + "usedErrors": [] + } + ], + "src": "31:255:11" + } + }, + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ChangeError {\n error NoChange();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "exportedSymbols": { + "ChangeError": [ + 25 + ] + }, + "id": 26, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:3" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ChangeError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 25, + "linearizedBaseContracts": [ + 25 + ], + "name": "ChangeError", + "nameLocation": "64:11:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 24, + "name": "NoChange", + "nameLocation": "88:8:3", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [], + "src": "96:2:3" + }, + "src": "82:17:3" + } + ], + "scope": 26, + "src": "56:45:3", + "usedErrors": [ + 24 + ] + } + ], + "src": "31:71:3" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableStorage.sol\";\nimport \"../errors/AccessError.sol\";\n\ncontract OwnableMixin is OwnableStorage {\n modifier onlyOwner() {\n _onlyOwner();\n\n _;\n }\n\n modifier onlyOwnerIfSet() {\n address owner = _getOwner();\n\n // if owner is set then check if msg.sender is the owner\n if (owner != address(0)) {\n _onlyOwner();\n }\n\n _;\n }\n\n function _onlyOwner() internal view {\n if (msg.sender != _getOwner()) {\n revert AccessError.Unauthorized(msg.sender);\n }\n }\n\n function _getOwner() internal view returns (address) {\n return _ownableStore().owner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 477, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 416, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:13" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "file": "./OwnableStorage.sol", + "id": 417, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 495, + "src": "56:30:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 418, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 7, + "src": "87:35:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 419, + "name": "OwnableStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 494, + "src": "149:14:13" + }, + "id": 420, + "nodeType": "InheritanceSpecifier", + "src": "149:14:13" + } + ], + "canonicalName": "OwnableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 476, + "linearizedBaseContracts": [ + 476, + 494 + ], + "name": "OwnableMixin", + "nameLocation": "133:12:13", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 426, + "nodeType": "Block", + "src": "191:41:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 422, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "201:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "201:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "201:12:13" + }, + { + "id": 425, + "nodeType": "PlaceholderStatement", + "src": "224:1:13" + } + ] + }, + "id": 427, + "name": "onlyOwner", + "nameLocation": "179:9:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:13" + }, + "src": "170:62:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 446, + "nodeType": "Block", + "src": "264:193:13", + "statements": [ + { + "assignments": [ + 430 + ], + "declarations": [ + { + "constant": false, + "id": 430, + "mutability": "mutable", + "name": "owner", + "nameLocation": "282:5:13", + "nodeType": "VariableDeclaration", + "scope": 446, + "src": "274:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 433, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 431, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "290:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "290:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "274:27:13" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 434, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "381:5:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "398:1:13", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "390:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "390:7:13", + "typeDescriptions": {} + } + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "390:10:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "381:19:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 444, + "nodeType": "IfStatement", + "src": "377:62:13", + "trueBody": { + "id": 443, + "nodeType": "Block", + "src": "402:37:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 440, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "416:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "416:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 442, + "nodeType": "ExpressionStatement", + "src": "416:12:13" + } + ] + } + }, + { + "id": 445, + "nodeType": "PlaceholderStatement", + "src": "449:1:13" + } + ] + }, + "id": 447, + "name": "onlyOwnerIfSet", + "nameLocation": "247:14:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 428, + "nodeType": "ParameterList", + "parameters": [], + "src": "261:2:13" + }, + "src": "238:219:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 464, + "nodeType": "Block", + "src": "499:115:13", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 450, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "513:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "513:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 452, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "527:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "527:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "513:25:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 463, + "nodeType": "IfStatement", + "src": "509:99:13", + "trueBody": { + "id": 462, + "nodeType": "Block", + "src": "540:68:13", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 458, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "586:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "586:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 455, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "561:11:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "561:24:13", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "561:36:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 461, + "nodeType": "RevertStatement", + "src": "554:43:13" + } + ] + } + } + ] + }, + "id": 465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyOwner", + "nameLocation": "472:10:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [], + "src": "482:2:13" + }, + "returnParameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [], + "src": "499:0:13" + }, + "scope": 476, + "src": "463:151:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 474, + "nodeType": "Block", + "src": "673:45:13", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 470, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "690:13:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "690:15:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "690:21:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 469, + "id": 473, + "nodeType": "Return", + "src": "683:28:13" + } + ] + }, + "id": 475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getOwner", + "nameLocation": "629:9:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 466, + "nodeType": "ParameterList", + "parameters": [], + "src": "638:2:13" + }, + "returnParameters": { + "id": 469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 475, + "src": "664:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 467, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "664:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "663:9:13" + }, + "scope": 476, + "src": "620:98:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 477, + "src": "124:596:13", + "usedErrors": [] + } + ], + "src": "31:690:13" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnable {\n function acceptOwnership() external;\n\n function nominateNewOwner(address newNominatedOwner) external;\n\n function renounceNomination() external;\n\n function owner() external view returns (address);\n\n function nominatedOwner() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "exportedSymbols": { + "IOwnable": [ + 220 + ] + }, + "id": 221, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:10" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnable", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 220, + "linearizedBaseContracts": [ + 220 + ], + "name": "IOwnable", + "nameLocation": "66:8:10", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "79ba5097", + "id": 201, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "90:15:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 199, + "nodeType": "ParameterList", + "parameters": [], + "src": "105:2:10" + }, + "returnParameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [], + "src": "116:0:10" + }, + "scope": 220, + "src": "81:36:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1627540c", + "id": 206, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominateNewOwner", + "nameLocation": "132:16:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "157:17:10", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "149:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 202, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "148:27:10" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [], + "src": "184:0:10" + }, + "scope": 220, + "src": "123:62:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "718fe928", + "id": 209, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "200:18:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 207, + "nodeType": "ParameterList", + "parameters": [], + "src": "218:2:10" + }, + "returnParameters": { + "id": 208, + "nodeType": "ParameterList", + "parameters": [], + "src": "229:0:10" + }, + "scope": 220, + "src": "191:39:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "8da5cb5b", + "id": 214, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "245:5:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 210, + "nodeType": "ParameterList", + "parameters": [], + "src": "250:2:10" + }, + "returnParameters": { + "id": 213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 212, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 214, + "src": "276:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "275:9:10" + }, + "scope": 220, + "src": "236:49:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "53a47bb7", + "id": 219, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "300:14:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:2:10" + }, + "returnParameters": { + "id": 218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 219, + "src": "340:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 216, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "340:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "339:9:10" + }, + "scope": 220, + "src": "291:58:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 221, + "src": "56:295:10", + "usedErrors": [] + } + ], + "src": "31:321:10" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract OwnableStorage {\n struct OwnableStore {\n bool initialized;\n address owner;\n address nominatedOwner;\n }\n\n function _ownableStore() internal pure returns (OwnableStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ownable\")) - 1)\n store.slot := 0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "exportedSymbols": { + "OwnableStorage": [ + 494 + ] + }, + "id": 495, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 478, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "OwnableStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 494, + "linearizedBaseContracts": [ + 494 + ], + "name": "OwnableStorage", + "nameLocation": "65:14:14", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "OwnableStorage.OwnableStore", + "id": 485, + "members": [ + { + "constant": false, + "id": 480, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "121:11:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "116:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 479, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "116:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 482, + "mutability": "mutable", + "name": "owner", + "nameLocation": "150:5:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "142:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "142:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "nominatedOwner", + "nameLocation": "173:14:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "165:22:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "165:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "OwnableStore", + "nameLocation": "93:12:14", + "nodeType": "StructDefinition", + "scope": 494, + "src": "86:108:14", + "visibility": "public" + }, + { + "body": { + "id": 492, + "nodeType": "Block", + "src": "276:197:14", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "295:172:14", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "377:80:14", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "391:66:14", + "type": "", + "value": "0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "377:10:14" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 489, + "isOffset": false, + "isSlot": true, + "src": "377:10:14", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 491, + "nodeType": "InlineAssembly", + "src": "286:181:14" + } + ] + }, + "id": 493, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ownableStore", + "nameLocation": "209:13:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "222:2:14" + }, + "returnParameters": { + "id": 490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 489, + "mutability": "mutable", + "name": "store", + "nameLocation": "269:5:14", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "248:26:14", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 488, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 487, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "248:12:14" + }, + "referencedDeclaration": 485, + "src": "248:12:14", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "src": "247:28:14" + }, + "scope": 494, + "src": "200:273:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 495, + "src": "56:419:14", + "usedErrors": [] + } + ], + "src": "31:445:14" + } + }, + "@synthetixio/core-contracts/contracts/errors/AccessError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AccessError {\n error Unauthorized(address addr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ] + }, + "id": 7, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 6, + "linearizedBaseContracts": [ + 6 + ], + "name": "AccessError", + "nameLocation": "64:11:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "Unauthorized", + "nameLocation": "88:12:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "addr", + "nameLocation": "109:4:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "101:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "101:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "100:14:0" + }, + "src": "82:33:0" + } + ], + "scope": 7, + "src": "56:61:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "31:87:0" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721 is IERC165 {\n function balanceOf(address owner) external view returns (uint256);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function approve(address approved, uint256 tokenId) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ] + }, + "id": 158, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 80, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:7" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 81, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 158, + "sourceUnit": 79, + "src": "56:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 82, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "102:7:7" + }, + "id": 83, + "nodeType": "InheritanceSpecifier", + "src": "102:7:7" + } + ], + "canonicalName": "IERC721", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 157, + "linearizedBaseContracts": [ + 157, + 78 + ], + "name": "IERC721", + "nameLocation": "91:7:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "70a08231", + "id": 90, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "125:9:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "owner", + "nameLocation": "143:5:7", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "135:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 84, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "135:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "134:15:7" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 88, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "173:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 87, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "173:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "172:9:7" + }, + "scope": 157, + "src": "116:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6352211e", + "id": 97, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "197:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 93, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 92, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "213:7:7", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "205:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "205:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "204:17:7" + }, + "returnParameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "245:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "245:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "244:9:7" + }, + "scope": 157, + "src": "188:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "b88d4fde", + "id": 108, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "269:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 99, + "mutability": "mutable", + "name": "from", + "nameLocation": "303:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "295:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 98, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "295:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 101, + "mutability": "mutable", + "name": "to", + "nameLocation": "325:2:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "317:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "317:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "345:7:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "337:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "337:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 105, + "mutability": "mutable", + "name": "data", + "nameLocation": "377:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "362:19:7", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 104, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "362:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "285:102:7" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "396:0:7" + }, + "scope": 157, + "src": "260:137:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "42842e0e", + "id": 117, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "412:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 110, + "mutability": "mutable", + "name": "from", + "nameLocation": "446:4:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "438:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 109, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "438:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "mutability": "mutable", + "name": "to", + "nameLocation": "468:2:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "460:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 111, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 114, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "488:7:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "480:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "428:73:7" + }, + "returnParameters": { + "id": 116, + "nodeType": "ParameterList", + "parameters": [], + "src": "510:0:7" + }, + "scope": 157, + "src": "403:108:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 126, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "526:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 124, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 119, + "mutability": "mutable", + "name": "from", + "nameLocation": "556:4:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "548:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "548:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 121, + "mutability": "mutable", + "name": "to", + "nameLocation": "578:2:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "570:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 120, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "570:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "598:7:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "590:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "590:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "538:73:7" + }, + "returnParameters": { + "id": 125, + "nodeType": "ParameterList", + "parameters": [], + "src": "620:0:7" + }, + "scope": 157, + "src": "517:104:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 133, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "636:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 128, + "mutability": "mutable", + "name": "approved", + "nameLocation": "652:8:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "644:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "644:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 130, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "670:7:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "662:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "662:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "643:35:7" + }, + "returnParameters": { + "id": 132, + "nodeType": "ParameterList", + "parameters": [], + "src": "687:0:7" + }, + "scope": 157, + "src": "627:61:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a22cb465", + "id": 140, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "703:17:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 135, + "mutability": "mutable", + "name": "operator", + "nameLocation": "729:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "721:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "721:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 137, + "mutability": "mutable", + "name": "approved", + "nameLocation": "744:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "739:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 136, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "739:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "720:33:7" + }, + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:7" + }, + "scope": 157, + "src": "694:69:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "081812fc", + "id": 147, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "778:11:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 142, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "798:7:7", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "790:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 141, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "789:17:7" + }, + "returnParameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 145, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "830:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "830:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "829:9:7" + }, + "scope": 157, + "src": "769:70:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e985e9c5", + "id": 156, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "854:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "owner", + "nameLocation": "879:5:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "871:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 148, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "871:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "operator", + "nameLocation": "894:8:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "886:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "886:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "870:33:7" + }, + "returnParameters": { + "id": 155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 154, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "927:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 153, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "926:6:7" + }, + "scope": 157, + "src": "845:88:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 158, + "src": "81:854:7", + "usedErrors": [] + } + ], + "src": "31:905:7" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721Metadata is IERC165 {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721Metadata": [ + 180 + ] + }, + "id": 181, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 159, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:8" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 181, + "sourceUnit": 79, + "src": "56:23:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 161, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "110:7:8" + }, + "id": 162, + "nodeType": "InheritanceSpecifier", + "src": "110:7:8" + } + ], + "canonicalName": "IERC721Metadata", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 180, + "linearizedBaseContracts": [ + 180, + 78 + ], + "name": "IERC721Metadata", + "nameLocation": "91:15:8", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "06fdde03", + "id": 167, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "133:4:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "137:2:8" + }, + "returnParameters": { + "id": 166, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 165, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "163:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 164, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "163:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "162:15:8" + }, + "scope": 180, + "src": "124:54:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "95d89b41", + "id": 172, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "193:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:8" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 172, + "src": "225:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 169, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "225:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "224:15:8" + }, + "scope": 180, + "src": "184:56:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c87b56dd", + "id": 179, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "255:8:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 174, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "272:7:8", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "264:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "263:17:8" + }, + "returnParameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "304:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "304:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "303:15:8" + }, + "scope": 180, + "src": "246:73:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 181, + "src": "81:240:8", + "usedErrors": [] + } + ], + "src": "31:291:8" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC721Receiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes memory data\n ) external returns (bytes4);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "exportedSymbols": { + "IERC721Receiver": [ + 196 + ] + }, + "id": 197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 182, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:9" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC721Receiver", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 196, + "linearizedBaseContracts": [ + 196 + ], + "name": "IERC721Receiver", + "nameLocation": "66:15:9", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "150b7a02", + "id": 195, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "onERC721Received", + "nameLocation": "97:16:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "operator", + "nameLocation": "131:8:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "123:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "123:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 186, + "mutability": "mutable", + "name": "from", + "nameLocation": "157:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "149:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 188, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "179:7:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "171:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "171:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "data", + "nameLocation": "209:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "196:17:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 189, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "196:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "113:106:9" + }, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "238:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 192, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "238:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "237:8:9" + }, + "scope": 196, + "src": "88:158:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 197, + "src": "56:192:9", + "usedErrors": [] + } + ], + "src": "31:218:9" + } + }, + "@synthetixio/core-contracts/contracts/errors/InitError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary InitError {\n error AlreadyInitialized();\n error NotInitialized();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "exportedSymbols": { + "InitError": [ + 32 + ] + }, + "id": 33, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 27, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "InitError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 32, + "linearizedBaseContracts": [ + 32 + ], + "name": "InitError", + "nameLocation": "64:9:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 29, + "name": "AlreadyInitialized", + "nameLocation": "86:18:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [], + "src": "104:2:4" + }, + "src": "80:27:4" + }, + { + "id": 31, + "name": "NotInitialized", + "nameLocation": "118:14:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:4" + }, + "src": "112:23:4" + } + ], + "scope": 33, + "src": "56:81:4", + "usedErrors": [ + 29, + 31 + ] + } + ], + "src": "31:107:4" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ERC721Storage {\n struct ERC721Store {\n string name;\n string symbol;\n string baseTokenURI;\n mapping(uint256 => address) ownerOf;\n mapping(address => uint256) balanceOf;\n mapping(uint256 => address) tokenApprovals;\n mapping(address => mapping(address => bool)) operatorApprovals;\n }\n\n function _erc721Store() internal pure returns (ERC721Store storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ERC721\")) - 1)\n store.slot := 0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "exportedSymbols": { + "ERC721Storage": [ + 1677 + ] + }, + "id": 1678, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1643, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:20" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ERC721Storage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1677, + "linearizedBaseContracts": [ + 1677 + ], + "name": "ERC721Storage", + "nameLocation": "65:13:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ERC721Storage.ERC721Store", + "id": 1668, + "members": [ + { + "constant": false, + "id": 1645, + "mutability": "mutable", + "name": "name", + "nameLocation": "121:4:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "114:11:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "114:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1647, + "mutability": "mutable", + "name": "symbol", + "nameLocation": "142:6:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "135:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1646, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "135:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1649, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "165:12:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "158:19:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1648, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "158:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1653, + "mutability": "mutable", + "name": "ownerOf", + "nameLocation": "215:7:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "187:35:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1652, + "keyType": { + "id": 1650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "195:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "187:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "206:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1657, + "mutability": "mutable", + "name": "balanceOf", + "nameLocation": "260:9:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "232:37:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1656, + "keyType": { + "id": 1654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "240:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "232:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "251:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1661, + "mutability": "mutable", + "name": "tokenApprovals", + "nameLocation": "307:14:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "279:42:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1660, + "keyType": { + "id": 1658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "279:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "298:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1667, + "mutability": "mutable", + "name": "operatorApprovals", + "nameLocation": "376:17:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "331:62:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "typeName": { + "id": 1666, + "keyType": { + "id": 1662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "339:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "331:44:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "valueType": { + "id": 1665, + "keyType": { + "id": 1663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "350:24:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 1664, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "369:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "internal" + } + ], + "name": "ERC721Store", + "nameLocation": "92:11:20", + "nodeType": "StructDefinition", + "scope": 1677, + "src": "85:315:20", + "visibility": "public" + }, + { + "body": { + "id": 1675, + "nodeType": "Block", + "src": "480:196:20", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "499:171:20", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "580:80:20", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "594:66:20", + "type": "", + "value": "0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "580:10:20" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1672, + "isOffset": false, + "isSlot": true, + "src": "580:10:20", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 1674, + "nodeType": "InlineAssembly", + "src": "490:180:20" + } + ] + }, + "id": 1676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_erc721Store", + "nameLocation": "415:12:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1669, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:20" + }, + "returnParameters": { + "id": 1673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1672, + "mutability": "mutable", + "name": "store", + "nameLocation": "473:5:20", + "nodeType": "VariableDeclaration", + "scope": 1676, + "src": "453:25:20", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1671, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1670, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "453:11:20" + }, + "referencedDeclaration": 1668, + "src": "453:11:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "src": "452:27:20" + }, + "scope": 1677, + "src": "406:270:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1678, + "src": "56:622:20", + "usedErrors": [] + } + ], + "src": "31:648:20" + } + }, + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol\n*/\n\nlibrary StringUtil {\n function uintToString(uint value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n\n return string(buffer);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "exportedSymbols": { + "StringUtil": [ + 2369 + ] + }, + "id": 2370, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2290, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:25" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "StringUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2369, + "linearizedBaseContracts": [ + 2369 + ], + "name": "StringUtil", + "nameLocation": "218:10:25", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2367, + "nodeType": "Block", + "src": "307:447:25", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2297, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "321:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "321:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2303, + "nodeType": "IfStatement", + "src": "317:51:25", + "trueBody": { + "id": 2302, + "nodeType": "Block", + "src": "333:35:25", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:3:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "functionReturnParameters": 2296, + "id": 2301, + "nodeType": "Return", + "src": "347:10:25" + } + ] + } + }, + { + "assignments": [ + 2305 + ], + "declarations": [ + { + "constant": false, + "id": 2305, + "mutability": "mutable", + "name": "temp", + "nameLocation": "386:4:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "378:12:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "378:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2307, + "initialValue": { + "id": 2306, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "393:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "378:20:25" + }, + { + "assignments": [ + 2309 + ], + "declarations": [ + { + "constant": false, + "id": 2309, + "mutability": "mutable", + "name": "digits", + "nameLocation": "416:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "408:14:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "408:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2310, + "nodeType": "VariableDeclarationStatement", + "src": "408:14:25" + }, + { + "body": { + "id": 2321, + "nodeType": "Block", + "src": "450:57:25", + "statements": [ + { + "expression": { + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "464:8:25", + "subExpression": { + "id": 2314, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "464:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2316, + "nodeType": "ExpressionStatement", + "src": "464:8:25" + }, + { + "expression": { + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2317, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "486:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "494:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "486:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2320, + "nodeType": "ExpressionStatement", + "src": "486:10:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2311, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "439:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "447:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "439:9:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2322, + "nodeType": "WhileStatement", + "src": "432:75:25" + }, + { + "assignments": [ + 2324 + ], + "declarations": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "530:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "517:19:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2323, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "517:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2329, + "initialValue": { + "arguments": [ + { + "id": 2327, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "549:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "539:9:25", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "543:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "539:17:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "517:39:25" + }, + { + "body": { + "id": 2360, + "nodeType": "Block", + "src": "585:131:25", + "statements": [ + { + "expression": { + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2333, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "599:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 2334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "609:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "599:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2336, + "nodeType": "ExpressionStatement", + "src": "599:11:25" + }, + { + "expression": { + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2337, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "624:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2339, + "indexExpression": { + "id": 2338, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "631:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "624:14:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3438", + "id": 2344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "654:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2347, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "667:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "3130", + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "675:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "667:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:25", + "typeDescriptions": {} + } + }, + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:19:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "654:24:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "648:5:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2342, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "648:5:25", + "typeDescriptions": {} + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:31:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "641:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2340, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "641:6:25", + "typeDescriptions": {} + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "641:39:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "624:56:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2355, + "nodeType": "ExpressionStatement", + "src": "624:56:25" + }, + { + "expression": { + "id": 2358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2356, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "694:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "703:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "694:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2359, + "nodeType": "ExpressionStatement", + "src": "694:11:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2330, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "573:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "582:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "573:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2361, + "nodeType": "WhileStatement", + "src": "566:150:25" + }, + { + "expression": { + "arguments": [ + { + "id": 2364, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "740:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "733:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2362, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "733:6:25", + "typeDescriptions": {} + } + }, + "id": 2365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "733:14:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2296, + "id": 2366, + "nodeType": "Return", + "src": "726:21:25" + } + ] + }, + "id": 2368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uintToString", + "nameLocation": "244:12:25", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2292, + "mutability": "mutable", + "name": "value", + "nameLocation": "262:5:25", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "257:10:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2291, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "257:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "256:12:25" + }, + "returnParameters": { + "id": 2296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2295, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "292:13:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2294, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "292:6:25", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "291:15:25" + }, + "scope": 2369, + "src": "235:519:25", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2370, + "src": "210:546:25", + "usedErrors": [] + } + ], + "src": "31:726:25" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC165 {\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ] + }, + "id": 79, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 70, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:6" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC165", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 78, + "linearizedBaseContracts": [ + 78 + ], + "name": "IERC165", + "nameLocation": "66:7:6", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "01ffc9a7", + "id": 77, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "89:17:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 72, + "mutability": "mutable", + "name": "interfaceID", + "nameLocation": "114:11:6", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "107:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 71, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "107:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "106:20:6" + }, + "returnParameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "150:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 74, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "150:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "149:6:6" + }, + "scope": 78, + "src": "80:76:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 79, + "src": "56:102:6", + "usedErrors": [] + } + ], + "src": "31:128:6" + } + }, + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\n\ncontract ElectionStorage {\n struct ElectionStore {\n // True if initializeElectionModule was called\n bool initialized;\n // The address of the council NFT\n address councilToken;\n // Council member addresses\n SetUtil.AddressSet councilMembers;\n // Council token id's by council member address\n mapping(address => uint) councilTokenIds;\n // Array of EpochData's for each epoch\n EpochData[] epochs;\n // Array of ElectionData's for each election\n ElectionData[] elections;\n // Pointer to ElectionSettings\n // To be always used via store.settings[0] to avoid storage collisions\n mapping(uint => ElectionSettings) settings;\n }\n\n struct ElectionSettings {\n // Number of council members in the next epoch\n uint8 nextEpochSeatCount;\n // Minimum active council members. If too many are dismissed an emergency election is triggered\n uint8 minimumActiveMembers;\n // Minimum epoch duration when adjusting schedules\n uint64 minEpochDuration;\n // Minimum nomination period duration when adjusting schedules\n uint64 minNominationPeriodDuration;\n // Minimum voting period duration when adjusting schedules\n uint64 minVotingPeriodDuration;\n // Maximum size for tweaking epoch schedules (see tweakEpochSchedule)\n uint64 maxDateAdjustmentTolerance;\n // Default batch size when calling evaluate() with numBallots = 0\n uint defaultBallotEvaluationBatchSize;\n }\n\n struct EpochData {\n // Date at which the epoch started\n uint64 startDate;\n // Date at which the epoch's voting period will end\n uint64 endDate;\n // Date at which the epoch's nomination period will start\n uint64 nominationPeriodStartDate;\n // Date at which the epoch's voting period will start\n uint64 votingPeriodStartDate;\n }\n\n struct ElectionData {\n // True if ballots have been counted in this election\n bool evaluated;\n // True if NFTs have been re-shuffled in this election\n bool resolved;\n // Number of counted ballots in this election\n uint numEvaluatedBallots;\n // List of nominated candidates in this election\n SetUtil.AddressSet nominees;\n // List of winners of this election (requires evaluation)\n SetUtil.AddressSet winners;\n // List of all ballot ids in this election\n bytes32[] ballotIds;\n // BallotData by ballot id\n mapping(bytes32 => BallotData) ballotsById;\n // Ballot id that each user voted on\n mapping(address => bytes32) ballotIdsByAddress;\n // Number of votes for each candidate\n mapping(address => uint) candidateVotes;\n }\n\n struct BallotData {\n // Total accumulated votes in this ballot (needs evaluation)\n uint votes;\n // List of candidates in this ballot\n address[] candidates;\n // Vote power added per voter\n mapping(address => uint) votesByUser;\n }\n\n function _electionSettings() internal view returns (ElectionSettings storage) {\n return _electionStore().settings[0];\n }\n\n function _electionStore() internal pure returns (ElectionStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.election\")) - 1)\n store.slot := 0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "exportedSymbols": { + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4332, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4220, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:33" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 4221, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4332, + "sourceUnit": 2289, + "src": "56:65:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ElectionStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4331, + "linearizedBaseContracts": [ + 4331 + ], + "name": "ElectionStorage", + "nameLocation": "132:15:33", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionStorage.ElectionStore", + "id": 4246, + "members": [ + { + "constant": false, + "id": 4223, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "245:11:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "240:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4222, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "240:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4225, + "mutability": "mutable", + "name": "councilToken", + "nameLocation": "316:12:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "308:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4228, + "mutability": "mutable", + "name": "councilMembers", + "nameLocation": "393:14:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "374:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4227, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4226, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "374:18:33" + }, + "referencedDeclaration": 1788, + "src": "374:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4232, + "mutability": "mutable", + "name": "councilTokenIds", + "nameLocation": "498:15:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "473:40:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4231, + "keyType": { + "id": 4229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "473:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4230, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "492:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4236, + "mutability": "mutable", + "name": "epochs", + "nameLocation": "582:6:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "570:18:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + }, + "typeName": { + "baseType": { + "id": 4234, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4233, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "570:9:33" + }, + "referencedDeclaration": 4270, + "src": "570:9:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "id": 4235, + "nodeType": "ArrayTypeName", + "src": "570:11:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4240, + "mutability": "mutable", + "name": "elections", + "nameLocation": "666:9:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "651:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + }, + "typeName": { + "baseType": { + "id": 4238, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4237, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "651:12:33" + }, + "referencedDeclaration": 4299, + "src": "651:12:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "id": 4239, + "nodeType": "ArrayTypeName", + "src": "651:14:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4245, + "mutability": "mutable", + "name": "settings", + "nameLocation": "837:8:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "803:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "typeName": { + "id": 4244, + "keyType": { + "id": 4241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "811:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "803:33:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "valueType": { + "id": 4243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4242, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "819:16:33" + }, + "referencedDeclaration": 4261, + "src": "819:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionStore", + "nameLocation": "161:13:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "154:698:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionSettings", + "id": 4261, + "members": [ + { + "constant": false, + "id": 4248, + "mutability": "mutable", + "name": "nextEpochSeatCount", + "nameLocation": "953:18:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "947:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4247, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "947:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4250, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1091:20:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1085:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4249, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1085:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4252, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "1187:16:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1180:23:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4251, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1180:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4254, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "1291:27:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1284:34:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4253, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1284:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4256, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "1402:23:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1395:30:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4255, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1395:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4258, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "1520:26:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1513:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4257, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1513:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4260, + "mutability": "mutable", + "name": "defaultBallotEvaluationBatchSize", + "nameLocation": "1635:32:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1630:37:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4259, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1630:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "ElectionSettings", + "nameLocation": "865:16:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "858:816:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.EpochData", + "id": 4270, + "members": [ + { + "constant": false, + "id": 4263, + "mutability": "mutable", + "name": "startDate", + "nameLocation": "1757:9:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1750:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1750:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4265, + "mutability": "mutable", + "name": "endDate", + "nameLocation": "1843:7:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1836:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4264, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1836:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4267, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1933:25:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1926:32:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4266, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1926:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4269, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2037:21:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "2030:28:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4268, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2030:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "name": "EpochData", + "nameLocation": "1687:9:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "1680:385:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionData", + "id": 4299, + "members": [ + { + "constant": false, + "id": 4272, + "mutability": "mutable", + "name": "evaluated", + "nameLocation": "2168:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2163:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4271, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2163:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4274, + "mutability": "mutable", + "name": "resolved", + "nameLocation": "2255:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2250:13:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4273, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2250:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4276, + "mutability": "mutable", + "name": "numEvaluatedBallots", + "nameLocation": "2332:19:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2327:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4275, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2327:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4279, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "2437:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2418:27:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4277, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2418:18:33" + }, + "referencedDeclaration": 1788, + "src": "2418:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4282, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2540:7:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2521:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4281, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4280, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2521:18:33" + }, + "referencedDeclaration": 1788, + "src": "2521:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4285, + "mutability": "mutable", + "name": "ballotIds", + "nameLocation": "2618:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2608:19:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 4283, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2608:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4284, + "nodeType": "ArrayTypeName", + "src": "2608:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4290, + "mutability": "mutable", + "name": "ballotsById", + "nameLocation": "2703:11:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2672:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "typeName": { + "id": 4289, + "keyType": { + "id": 4286, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2680:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2672:30:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "valueType": { + "id": 4288, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4287, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2691:10:33" + }, + "referencedDeclaration": 4309, + "src": "2691:10:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4294, + "mutability": "mutable", + "name": "ballotIdsByAddress", + "nameLocation": "2797:18:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2769:46:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "typeName": { + "id": 4293, + "keyType": { + "id": 4291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2777:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2769:27:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "valueType": { + "id": 4292, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2788:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4298, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2896:14:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2871:39:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4297, + "keyType": { + "id": 4295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2879:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2871:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4296, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2890:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionData", + "nameLocation": "2078:12:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2071:846:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.BallotData", + "id": 4309, + "members": [ + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "votes", + "nameLocation": "3025:5:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3020:10:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4300, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3020:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4304, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3095:10:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3085:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3085:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4303, + "nodeType": "ArrayTypeName", + "src": "3085:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4308, + "mutability": "mutable", + "name": "votesByUser", + "nameLocation": "3178:11:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3153:36:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4307, + "keyType": { + "id": 4305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3161:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "3153:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4306, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3172:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "BallotData", + "nameLocation": "2930:10:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2923:273:33", + "visibility": "public" + }, + { + "body": { + "id": 4321, + "nodeType": "Block", + "src": "3280:52:33", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4315, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3297:14:33", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3297:16:33", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "settings", + "nodeType": "MemberAccess", + "referencedDeclaration": 4245, + "src": "3297:25:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings storage ref)" + } + }, + "id": 4319, + "indexExpression": { + "hexValue": "30", + "id": 4318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3323:1:33", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3297:28:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage", + "typeString": "struct ElectionStorage.ElectionSettings storage ref" + } + }, + "functionReturnParameters": 4314, + "id": 4320, + "nodeType": "Return", + "src": "3290:35:33" + } + ] + }, + "id": 4322, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionSettings", + "nameLocation": "3211:17:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4310, + "nodeType": "ParameterList", + "parameters": [], + "src": "3228:2:33" + }, + "returnParameters": { + "id": 4314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4313, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4322, + "src": "3254:24:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 4312, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4311, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3254:16:33" + }, + "referencedDeclaration": 4261, + "src": "3254:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "src": "3253:26:33" + }, + "scope": 4331, + "src": "3202:130:33", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4329, + "nodeType": "Block", + "src": "3416:198:33", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "3435:173:33", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3518:80:33", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3532:66:33", + "type": "", + "value": "0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "3518:10:33" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 4326, + "isOffset": false, + "isSlot": true, + "src": "3518:10:33", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 4328, + "nodeType": "InlineAssembly", + "src": "3426:182:33" + } + ] + }, + "id": 4330, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionStore", + "nameLocation": "3347:14:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4323, + "nodeType": "ParameterList", + "parameters": [], + "src": "3361:2:33" + }, + "returnParameters": { + "id": 4327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4326, + "mutability": "mutable", + "name": "store", + "nameLocation": "3409:5:33", + "nodeType": "VariableDeclaration", + "scope": 4330, + "src": "3387:27:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4325, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4324, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3387:13:33" + }, + "referencedDeclaration": 4246, + "src": "3387:13:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "src": "3386:29:33" + }, + "scope": 4331, + "src": "3338:276:33", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4332, + "src": "123:3493:33", + "usedErrors": [] + } + ], + "src": "31:3586:33" + } + }, + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary SetUtil {\n // ----------------------------------------\n // Address support\n // ----------------------------------------\n\n struct AddressSet {\n Bytes32Set raw;\n }\n\n function add(AddressSet storage set, address value) internal {\n add(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function remove(AddressSet storage set, address value) internal {\n remove(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function replace(\n AddressSet storage set,\n address value,\n address newValue\n ) internal {\n replace(set.raw, bytes32(uint256(uint160(value))), bytes32(uint256(uint160(newValue))));\n }\n\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return contains(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function length(AddressSet storage set) internal view returns (uint) {\n return length(set.raw);\n }\n\n function valueAt(AddressSet storage set, uint position) internal view returns (address) {\n return address(uint160(uint256(valueAt(set.raw, position))));\n }\n\n function positionOf(AddressSet storage set, address value) internal view returns (uint) {\n return positionOf(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = values(set.raw);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // ----------------------------------------\n // Core bytes32 support\n // ----------------------------------------\n\n error PositionOutOfBounds();\n error ValueNotInSet();\n error ValueAlreadyInSet();\n\n struct Bytes32Set {\n /* solhint-disable private-vars-leading-underscore */\n bytes32[] _values;\n mapping(bytes32 => uint) _positions; // Position zero is never used.\n /* solhint-enable private-vars-leading-underscore */\n }\n\n function add(Bytes32Set storage set, bytes32 value) internal {\n if (contains(set, value)) {\n revert ValueAlreadyInSet();\n }\n\n set._values.push(value);\n set._positions[value] = set._values.length;\n }\n\n function remove(Bytes32Set storage set, bytes32 value) internal {\n uint position = set._positions[value];\n if (position == 0) {\n revert ValueNotInSet();\n }\n\n uint index = position - 1;\n uint lastIndex = set._values.length - 1;\n\n // If the element being deleted is not the last in the values,\n // move the last element to its position.\n if (index != lastIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n set._values[index] = lastValue;\n set._positions[lastValue] = position;\n }\n\n // Remove the last element in the values.\n set._values.pop();\n delete set._positions[value];\n }\n\n function replace(\n Bytes32Set storage set,\n bytes32 value,\n bytes32 newValue\n ) internal {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n if (contains(set, newValue)) {\n revert ValueAlreadyInSet();\n }\n\n uint position = set._positions[value];\n uint index = position - 1;\n\n set._values[index] = newValue;\n set._positions[newValue] = position;\n }\n\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return set._positions[value] != 0;\n }\n\n function length(Bytes32Set storage set) internal view returns (uint) {\n return set._values.length;\n }\n\n function valueAt(Bytes32Set storage set, uint position) internal view returns (bytes32) {\n if (position == 0 || position > set._values.length) {\n revert PositionOutOfBounds();\n }\n\n uint index = position - 1;\n\n return set._values[index];\n }\n\n function positionOf(Bytes32Set storage set, bytes32 value) internal view returns (uint) {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n return set._positions[value];\n }\n\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return set._values;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "exportedSymbols": { + "SetUtil": [ + 2288 + ] + }, + "id": 2289, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1784, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:24" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SetUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2288, + "linearizedBaseContracts": [ + 2288 + ], + "name": "SetUtil", + "nameLocation": "64:7:24", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "SetUtil.AddressSet", + "id": 1788, + "members": [ + { + "constant": false, + "id": 1787, + "mutability": "mutable", + "name": "raw", + "nameLocation": "237:3:24", + "nodeType": "VariableDeclaration", + "scope": 1788, + "src": "226:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 1786, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1785, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "226:10:24" + }, + "referencedDeclaration": 2007, + "src": "226:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "name": "AddressSet", + "nameLocation": "205:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "198:49:24", + "visibility": "public" + }, + { + "body": { + "id": 1811, + "nodeType": "Block", + "src": "314:63:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1797, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "328:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "328:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1805, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1793, + "src": "361:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "353:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1803, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "353:7:24", + "typeDescriptions": {} + } + }, + "id": 1806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "345:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "345:7:24", + "typeDescriptions": {} + } + }, + "id": 1807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "345:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "337:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1799, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "337:7:24", + "typeDescriptions": {} + } + }, + "id": 1808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "337:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1796, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1812, + 2043 + ], + "referencedDeclaration": 2043, + "src": "324:3:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1810, + "nodeType": "ExpressionStatement", + "src": "324:46:24" + } + ] + }, + "id": 1812, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "262:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1791, + "mutability": "mutable", + "name": "set", + "nameLocation": "285:3:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "266:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1790, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1789, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "266:10:24" + }, + "referencedDeclaration": 1788, + "src": "266:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1793, + "mutability": "mutable", + "name": "value", + "nameLocation": "298:5:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "290:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1792, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "290:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:39:24" + }, + "returnParameters": { + "id": 1795, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:0:24" + }, + "scope": 2288, + "src": "253:124:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1835, + "nodeType": "Block", + "src": "447:66:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1821, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1815, + "src": "464:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1822, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "464:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1829, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1817, + "src": "497:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "489:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1827, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "489:7:24", + "typeDescriptions": {} + } + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "489:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "481:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:24", + "typeDescriptions": {} + } + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "481:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "473:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1823, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "473:7:24", + "typeDescriptions": {} + } + }, + "id": 1832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1820, + "name": "remove", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1836, + 2122 + ], + "referencedDeclaration": 2122, + "src": "457:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "457:49:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1834, + "nodeType": "ExpressionStatement", + "src": "457:49:24" + } + ] + }, + "id": 1836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "392:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "set", + "nameLocation": "418:3:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "399:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1814, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1813, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "399:10:24" + }, + "referencedDeclaration": 1788, + "src": "399:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "value", + "nameLocation": "431:5:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "423:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1816, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "423:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "398:39:24" + }, + "returnParameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [], + "src": "447:0:24" + }, + "scope": 2288, + "src": "383:130:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1871, + "nodeType": "Block", + "src": "632:104:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1847, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "650:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "650:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "683:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "675:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1853, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "675:7:24", + "typeDescriptions": {} + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "675:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1852, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "667:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1851, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "667:7:24", + "typeDescriptions": {} + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "667:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1849, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "659:7:24", + "typeDescriptions": {} + } + }, + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1865, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "717:8:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "709:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1863, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "709:7:24", + "typeDescriptions": {} + } + }, + "id": 1866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "709:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "701:7:24", + "typeDescriptions": {} + } + }, + "id": 1867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "693:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1859, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "693:7:24", + "typeDescriptions": {} + } + }, + "id": 1868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "693:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1846, + "name": "replace", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1872, + 2181 + ], + "referencedDeclaration": 2181, + "src": "642:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32,bytes32)" + } + }, + "id": 1869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:87:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1870, + "nodeType": "ExpressionStatement", + "src": "642:87:24" + } + ] + }, + "id": 1872, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "528:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "set", + "nameLocation": "564:3:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "545:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1838, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1837, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "545:10:24" + }, + "referencedDeclaration": 1788, + "src": "545:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "value", + "nameLocation": "585:5:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "577:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1840, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "577:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "608:8:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "600:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "600:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "535:87:24" + }, + "returnParameters": { + "id": 1845, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:24" + }, + "scope": 2288, + "src": "519:217:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1897, + "nodeType": "Block", + "src": "828:75:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1883, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1875, + "src": "854:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "854:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1891, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1877, + "src": "887:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "879:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1889, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "879:7:24", + "typeDescriptions": {} + } + }, + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "879:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "871:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "871:7:24", + "typeDescriptions": {} + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "871:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "863:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1885, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "863:7:24", + "typeDescriptions": {} + } + }, + "id": 1894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "863:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1882, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "845:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "845:51:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1881, + "id": 1896, + "nodeType": "Return", + "src": "838:58:24" + } + ] + }, + "id": 1898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "751:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "set", + "nameLocation": "779:3:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "760:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1874, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1873, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "760:10:24" + }, + "referencedDeclaration": 1788, + "src": "760:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1877, + "mutability": "mutable", + "name": "value", + "nameLocation": "792:5:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "784:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "784:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "759:39:24" + }, + "returnParameters": { + "id": 1881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1880, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "822:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1879, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "822:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "821:6:24" + }, + "scope": 2288, + "src": "742:161:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1911, + "nodeType": "Block", + "src": "978:39:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1907, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1901, + "src": "1002:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1002:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1906, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1912, + 2212 + ], + "referencedDeclaration": 2212, + "src": "995:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (uint256)" + } + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1905, + "id": 1910, + "nodeType": "Return", + "src": "988:22:24" + } + ] + }, + "id": 1912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "918:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "set", + "nameLocation": "944:3:24", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "925:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "925:10:24" + }, + "referencedDeclaration": 1788, + "src": "925:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "924:24:24" + }, + "returnParameters": { + "id": 1905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1904, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "972:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "972:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "971:6:24" + }, + "scope": 2288, + "src": "909:108:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1937, + "nodeType": "Block", + "src": "1111:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 1929, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1915, + "src": "1160:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1160:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "id": 1931, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "1169:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1928, + "name": "valueAt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1938, + 2248 + ], + "referencedDeclaration": 2248, + "src": "1152:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,uint256) view returns (bytes32)" + } + }, + "id": 1932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1152:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1144:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1926, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1144:7:24", + "typeDescriptions": {} + } + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1144:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1924, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1136:7:24", + "typeDescriptions": {} + } + }, + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1136:44:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1128:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1922, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1128:7:24", + "typeDescriptions": {} + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1128:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1921, + "id": 1936, + "nodeType": "Return", + "src": "1121:60:24" + } + ] + }, + "id": 1938, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "1032:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1915, + "mutability": "mutable", + "name": "set", + "nameLocation": "1059:3:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1040:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1914, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1913, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1040:10:24" + }, + "referencedDeclaration": 1788, + "src": "1040:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "position", + "nameLocation": "1069:8:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1064:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1064:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1039:39:24" + }, + "returnParameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1920, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1102:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1102:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1101:9:24" + }, + "scope": 2288, + "src": "1023:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1963, + "nodeType": "Block", + "src": "1282:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1949, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1941, + "src": "1310:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1310:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1957, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1943, + "src": "1343:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1335:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1955, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1335:7:24", + "typeDescriptions": {} + } + }, + "id": 1958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1335:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1327:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:24", + "typeDescriptions": {} + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1327:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1319:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1951, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1319:7:24", + "typeDescriptions": {} + } + }, + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1319:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1948, + "name": "positionOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1964, + 2274 + ], + "referencedDeclaration": 2274, + "src": "1299:10:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (uint256)" + } + }, + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1947, + "id": 1962, + "nodeType": "Return", + "src": "1292:60:24" + } + ] + }, + "id": 1964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "1203:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1941, + "mutability": "mutable", + "name": "set", + "nameLocation": "1233:3:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1214:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1940, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1939, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1214:10:24" + }, + "referencedDeclaration": 1788, + "src": "1214:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "value", + "nameLocation": "1246:5:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1238:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1942, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1238:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1213:39:24" + }, + "returnParameters": { + "id": 1947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1276:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1945, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1276:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1275:6:24" + }, + "scope": 2288, + "src": "1194:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1992, + "nodeType": "Block", + "src": "1446:172:24", + "statements": [ + { + "assignments": [ + 1977 + ], + "declarations": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "store", + "nameLocation": "1473:5:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1456:22:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1975, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1456:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1976, + "nodeType": "ArrayTypeName", + "src": "1456:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "id": 1982, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 1979, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1967, + "src": "1488:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1488:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1978, + "name": "values", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1993, + 2287 + ], + "referencedDeclaration": 2287, + "src": "1481:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (bytes32[] memory)" + } + }, + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1481:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1456:40:24" + }, + { + "assignments": [ + 1987 + ], + "declarations": [ + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "result", + "nameLocation": "1523:6:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1506:23:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1506:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1986, + "nodeType": "ArrayTypeName", + "src": "1506:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 1988, + "nodeType": "VariableDeclarationStatement", + "src": "1506:23:24" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1549:39:24", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1563:15:24", + "value": { + "name": "store", + "nodeType": "YulIdentifier", + "src": "1573:5:24" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1563:6:24" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1987, + "isOffset": false, + "isSlot": false, + "src": "1563:6:24", + "valueSize": 1 + }, + { + "declaration": 1977, + "isOffset": false, + "isSlot": false, + "src": "1573:5:24", + "valueSize": 1 + } + ], + "id": 1989, + "nodeType": "InlineAssembly", + "src": "1540:48:24" + }, + { + "expression": { + "id": 1990, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1987, + "src": "1605:6:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1972, + "id": 1991, + "nodeType": "Return", + "src": "1598:13:24" + } + ] + }, + "id": 1993, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "1374:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1967, + "mutability": "mutable", + "name": "set", + "nameLocation": "1400:3:24", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1381:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1966, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1965, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1381:10:24" + }, + "referencedDeclaration": 1788, + "src": "1381:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "1380:24:24" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1428:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1970, + "nodeType": "ArrayTypeName", + "src": "1428:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1427:18:24" + }, + "scope": 2288, + "src": "1365:253:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 1995, + "name": "PositionOutOfBounds", + "nameLocation": "1755:19:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1994, + "nodeType": "ParameterList", + "parameters": [], + "src": "1774:2:24" + }, + "src": "1749:28:24" + }, + { + "id": 1997, + "name": "ValueNotInSet", + "nameLocation": "1788:13:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1996, + "nodeType": "ParameterList", + "parameters": [], + "src": "1801:2:24" + }, + "src": "1782:22:24" + }, + { + "id": 1999, + "name": "ValueAlreadyInSet", + "nameLocation": "1815:17:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [], + "src": "1832:2:24" + }, + "src": "1809:26:24" + }, + { + "canonicalName": "SetUtil.Bytes32Set", + "id": 2007, + "members": [ + { + "constant": false, + "id": 2002, + "mutability": "mutable", + "name": "_values", + "nameLocation": "1941:7:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1931:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2000, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1931:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2001, + "nodeType": "ArrayTypeName", + "src": "1931:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2006, + "mutability": "mutable", + "name": "_positions", + "nameLocation": "1983:10:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1958:35:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 2005, + "keyType": { + "id": 2003, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1966:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1958:24:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 2004, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1977:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "Bytes32Set", + "nameLocation": "1848:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "1841:252:24", + "visibility": "public" + }, + { + "body": { + "id": 2042, + "nodeType": "Block", + "src": "2160:179:24", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 2016, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2183:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2017, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2188:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2015, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "2174:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2174:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2023, + "nodeType": "IfStatement", + "src": "2170:77:24", + "trueBody": { + "id": 2022, + "nodeType": "Block", + "src": "2196:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2019, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "2217:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2217:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2021, + "nodeType": "RevertStatement", + "src": "2210:26:24" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2029, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2274:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 2024, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2257:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2257:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "2257:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2257:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2031, + "nodeType": "ExpressionStatement", + "src": "2257:23:24" + }, + { + "expression": { + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2032, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2290:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2290:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2036, + "indexExpression": { + "id": 2034, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2305:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2290:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "id": 2037, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2314:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2314:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2314:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2290:42:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2041, + "nodeType": "ExpressionStatement", + "src": "2290:42:24" + } + ] + }, + "id": 2043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "2108:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2013, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2010, + "mutability": "mutable", + "name": "set", + "nameLocation": "2131:3:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2112:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2009, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2008, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2112:10:24" + }, + "referencedDeclaration": 2007, + "src": "2112:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2012, + "mutability": "mutable", + "name": "value", + "nameLocation": "2144:5:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2136:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2011, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2111:39:24" + }, + "returnParameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [], + "src": "2160:0:24" + }, + "scope": 2288, + "src": "2099:240:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2121, + "nodeType": "Block", + "src": "2409:647:24", + "statements": [ + { + "assignments": [ + 2052 + ], + "declarations": [ + { + "constant": false, + "id": 2052, + "mutability": "mutable", + "name": "position", + "nameLocation": "2424:8:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2419:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2419:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2057, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2053, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2435:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2435:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2056, + "indexExpression": { + "id": 2055, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "2450:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2435:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2419:37:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2058, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2470:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2482:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2470:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2065, + "nodeType": "IfStatement", + "src": "2466:66:24", + "trueBody": { + "id": 2064, + "nodeType": "Block", + "src": "2485:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2061, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "2506:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2063, + "nodeType": "RevertStatement", + "src": "2499:22:24" + } + ] + } + }, + { + "assignments": [ + 2067 + ], + "declarations": [ + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "index", + "nameLocation": "2547:5:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2542:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2066, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2542:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2071, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2068, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2555:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2566:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2555:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2542:25:24" + }, + { + "assignments": [ + 2073 + ], + "declarations": [ + { + "constant": false, + "id": 2073, + "mutability": "mutable", + "name": "lastIndex", + "nameLocation": "2582:9:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2577:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2072, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2577:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2079, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 2074, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2594:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2075, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2594:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2594:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2594:22:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2577:39:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2080, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2752:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2081, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2761:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2752:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2107, + "nodeType": "IfStatement", + "src": "2748:186:24", + "trueBody": { + "id": 2106, + "nodeType": "Block", + "src": "2772:162:24", + "statements": [ + { + "assignments": [ + 2084 + ], + "declarations": [ + { + "constant": false, + "id": 2084, + "mutability": "mutable", + "name": "lastValue", + "nameLocation": "2794:9:24", + "nodeType": "VariableDeclaration", + "scope": 2106, + "src": "2786:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2083, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2786:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 2089, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2085, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2806:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2806:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2088, + "indexExpression": { + "id": 2087, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2818:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2806:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2786:42:24" + }, + { + "expression": { + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2090, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2843:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2843:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2094, + "indexExpression": { + "id": 2092, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2855:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2843:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2095, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2864:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2843:30:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2097, + "nodeType": "ExpressionStatement", + "src": "2843:30:24" + }, + { + "expression": { + "id": 2104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2098, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2887:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2887:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2102, + "indexExpression": { + "id": 2100, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2902:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2887:25:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2103, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2915:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2887:36:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2105, + "nodeType": "ExpressionStatement", + "src": "2887:36:24" + } + ] + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 2108, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2994:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2994:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "src": "2994:15:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer)" + } + }, + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2994:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2114, + "nodeType": "ExpressionStatement", + "src": "2994:17:24" + }, + { + "expression": { + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "3021:28:24", + "subExpression": { + "baseExpression": { + "expression": { + "id": 2115, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "3028:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3028:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2118, + "indexExpression": { + "id": 2117, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "3043:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3028:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2120, + "nodeType": "ExpressionStatement", + "src": "3021:28:24" + } + ] + }, + "id": 2122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "2354:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "set", + "nameLocation": "2380:3:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2361:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2361:10:24" + }, + "referencedDeclaration": 2007, + "src": "2361:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2048, + "mutability": "mutable", + "name": "value", + "nameLocation": "2393:5:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2385:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2385:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2360:39:24" + }, + "returnParameters": { + "id": 2050, + "nodeType": "ParameterList", + "parameters": [], + "src": "2409:0:24" + }, + "scope": 2288, + "src": "2345:711:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2180, + "nodeType": "Block", + "src": "3175:348:24", + "statements": [ + { + "condition": { + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3189:21:24", + "subExpression": { + "arguments": [ + { + "id": 2133, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3199:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2134, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3204:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2132, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3190:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3190:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2141, + "nodeType": "IfStatement", + "src": "3185:74:24", + "trueBody": { + "id": 2140, + "nodeType": "Block", + "src": "3212:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2137, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "3233:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3233:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2139, + "nodeType": "RevertStatement", + "src": "3226:22:24" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 2143, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3282:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2144, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3287:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2142, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3273:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2150, + "nodeType": "IfStatement", + "src": "3269:80:24", + "trueBody": { + "id": 2149, + "nodeType": "Block", + "src": "3298:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2146, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "3319:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3319:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2148, + "nodeType": "RevertStatement", + "src": "3312:26:24" + } + ] + } + }, + { + "assignments": [ + 2152 + ], + "declarations": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "position", + "nameLocation": "3364:8:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3359:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2151, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3359:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2157, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2153, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3375:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3375:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2156, + "indexExpression": { + "id": 2155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3390:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3375:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3359:37:24" + }, + { + "assignments": [ + 2159 + ], + "declarations": [ + { + "constant": false, + "id": 2159, + "mutability": "mutable", + "name": "index", + "nameLocation": "3411:5:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3406:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2158, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3406:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2163, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2160, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3419:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3430:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3419:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3406:25:24" + }, + { + "expression": { + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2164, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3442:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3442:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2168, + "indexExpression": { + "id": 2166, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2159, + "src": "3454:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3442:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2169, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3463:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3442:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "3442:29:24" + }, + { + "expression": { + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2172, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3481:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3481:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2176, + "indexExpression": { + "id": 2174, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3496:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3481:24:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2177, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3508:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3481:35:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2179, + "nodeType": "ExpressionStatement", + "src": "3481:35:24" + } + ] + }, + "id": 2181, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "3071:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2125, + "mutability": "mutable", + "name": "set", + "nameLocation": "3107:3:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3088:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2124, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2123, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3088:10:24" + }, + "referencedDeclaration": 2007, + "src": "3088:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2127, + "mutability": "mutable", + "name": "value", + "nameLocation": "3128:5:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3120:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3120:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2129, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "3151:8:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3143:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3143:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3078:87:24" + }, + "returnParameters": { + "id": 2131, + "nodeType": "ParameterList", + "parameters": [], + "src": "3175:0:24" + }, + "scope": 2288, + "src": "3062:461:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2198, + "nodeType": "Block", + "src": "3615:50:24", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 2191, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "3632:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3632:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2194, + "indexExpression": { + "id": 2193, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2186, + "src": "3647:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3632:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3657:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3632:26:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2190, + "id": 2197, + "nodeType": "Return", + "src": "3625:33:24" + } + ] + }, + "id": 2199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "3538:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2184, + "mutability": "mutable", + "name": "set", + "nameLocation": "3566:3:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3547:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2183, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2182, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3547:10:24" + }, + "referencedDeclaration": 2007, + "src": "3547:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2186, + "mutability": "mutable", + "name": "value", + "nameLocation": "3579:5:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3571:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2185, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3571:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3546:39:24" + }, + "returnParameters": { + "id": 2190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3609:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2188, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3609:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3608:6:24" + }, + "scope": 2288, + "src": "3529:136:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2211, + "nodeType": "Block", + "src": "3740:42:24", + "statements": [ + { + "expression": { + "expression": { + "expression": { + "id": 2207, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "3757:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3757:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3757:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2206, + "id": 2210, + "nodeType": "Return", + "src": "3750:25:24" + } + ] + }, + "id": 2212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "3680:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2202, + "mutability": "mutable", + "name": "set", + "nameLocation": "3706:3:24", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3687:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2201, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2200, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3687:10:24" + }, + "referencedDeclaration": 2007, + "src": "3687:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "3686:24:24" + }, + "returnParameters": { + "id": 2206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2205, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3734:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3734:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3733:6:24" + }, + "scope": 2288, + "src": "3671:111:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2247, + "nodeType": "Block", + "src": "3876:193:24", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2222, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3890:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3902:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3890:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2225, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3907:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "expression": { + "id": 2226, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "3918:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3918:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3918:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3907:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3890:46:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2235, + "nodeType": "IfStatement", + "src": "3886:105:24", + "trueBody": { + "id": 2234, + "nodeType": "Block", + "src": "3938:53:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2231, + "name": "PositionOutOfBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "3959:19:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3959:21:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2233, + "nodeType": "RevertStatement", + "src": "3952:28:24" + } + ] + } + }, + { + "assignments": [ + 2237 + ], + "declarations": [ + { + "constant": false, + "id": 2237, + "mutability": "mutable", + "name": "index", + "nameLocation": "4006:5:24", + "nodeType": "VariableDeclaration", + "scope": 2247, + "src": "4001:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2236, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4001:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2241, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2238, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "4014:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4014:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4001:25:24" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2242, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "4044:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4044:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2245, + "indexExpression": { + "id": 2244, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2237, + "src": "4056:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4044:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2221, + "id": 2246, + "nodeType": "Return", + "src": "4037:25:24" + } + ] + }, + "id": 2248, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "3797:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2215, + "mutability": "mutable", + "name": "set", + "nameLocation": "3824:3:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3805:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2214, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2213, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3805:10:24" + }, + "referencedDeclaration": 2007, + "src": "3805:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2217, + "mutability": "mutable", + "name": "position", + "nameLocation": "3834:8:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3829:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3829:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3804:39:24" + }, + "returnParameters": { + "id": 2221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2220, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3867:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2219, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3867:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3866:9:24" + }, + "scope": 2288, + "src": "3788:281:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2273, + "nodeType": "Block", + "src": "4163:129:24", + "statements": [ + { + "condition": { + "id": 2262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4177:21:24", + "subExpression": { + "arguments": [ + { + "id": 2259, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4187:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2260, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4192:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2258, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "4178:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4178:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2267, + "nodeType": "IfStatement", + "src": "4173:74:24", + "trueBody": { + "id": 2266, + "nodeType": "Block", + "src": "4200:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2263, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "4221:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4221:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2265, + "nodeType": "RevertStatement", + "src": "4214:22:24" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2268, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4264:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "4264:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2271, + "indexExpression": { + "id": 2270, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4279:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4264:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2257, + "id": 2272, + "nodeType": "Return", + "src": "4257:28:24" + } + ] + }, + "id": 2274, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "4084:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2251, + "mutability": "mutable", + "name": "set", + "nameLocation": "4114:3:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4095:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2250, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2249, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4095:10:24" + }, + "referencedDeclaration": 2007, + "src": "4095:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2253, + "mutability": "mutable", + "name": "value", + "nameLocation": "4127:5:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4119:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2252, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4119:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4094:39:24" + }, + "returnParameters": { + "id": 2257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4157:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4157:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4156:6:24" + }, + "scope": 2288, + "src": "4075:217:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2286, + "nodeType": "Block", + "src": "4379:35:24", + "statements": [ + { + "expression": { + "expression": { + "id": 2283, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4396:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4396:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "functionReturnParameters": 2282, + "id": 2285, + "nodeType": "Return", + "src": "4389:18:24" + } + ] + }, + "id": 2287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "4307:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "set", + "nameLocation": "4333:3:24", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4314:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2276, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2275, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4314:10:24" + }, + "referencedDeclaration": 2007, + "src": "4314:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "4313:24:24" + }, + "returnParameters": { + "id": 2282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2281, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4361:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2279, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4361:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2280, + "nodeType": "ArrayTypeName", + "src": "4361:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4360:18:24" + }, + "scope": 2288, + "src": "4298:116:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2289, + "src": "56:4360:24", + "usedErrors": [ + 1995, + 1997, + 1999 + ] + } + ], + "src": "31:4386:24" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/MerkleProof.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"../../storage/DebtShareStorage.sol\";\n\n/// @dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number\ncontract CrossChainDebtShareManager is ElectionBase, DebtShareStorage {\n error MerkleRootNotSet();\n error InvalidMerkleProof();\n error CrossChainDebtShareAlreadyDeclared();\n\n event CrossChainDebtShareMerkleRootSet(bytes32 merkleRoot, uint blocknumber, uint epoch);\n event CrossChainDebtShareDeclared(address user, uint debtShare);\n\n function _setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n debtShareData.merkleRoot = merkleRoot;\n debtShareData.merkleRootBlockNumber = blocknumber;\n }\n\n function _declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.debtShares[user] != 0) {\n revert CrossChainDebtShareAlreadyDeclared();\n }\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n bytes32 leaf = keccak256(abi.encodePacked(user, debtShare));\n\n if (!MerkleProof.verify(merkleProof, debtShareData.merkleRoot, leaf)) {\n revert InvalidMerkleProof();\n }\n\n debtShareData.debtShares[user] = debtShare;\n }\n\n function _getCrossChainDebtShareMerkleRoot() internal view returns (bytes32) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRoot;\n }\n\n function _getCrossChainDebtShareMerkleRootBlockNumber() internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRootBlockNumber;\n }\n\n function _getDeclaredCrossChainDebtShare(address user) internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n return debtShareData.debtShares[user];\n }\n\n function _setCrossDomainMessenger(address newCrossDomainMessengerAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newCrossDomainMessengerAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newCrossDomainMessengerAddress == address(store.crossDomainMessenger)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newCrossDomainMessengerAddress)) {\n revert AddressError.NotAContract(newCrossDomainMessengerAddress);\n }\n\n store.crossDomainMessenger = ICrossDomainMessenger(newCrossDomainMessengerAddress);\n }\n\n function _getCrossDomainMessenger() internal view returns (address) {\n return address(_debtShareStore().crossDomainMessenger);\n }\n\n function _validateCrossChainMessage(address user) internal view {\n ICrossDomainMessenger messenger = ICrossDomainMessenger(_debtShareStore().crossDomainMessenger);\n\n if (address(messenger) == address(0)) {\n revert CrossDomainMessengerNotSet();\n }\n\n if (msg.sender != address(messenger)) {\n revert OnlyCrossDomainMessengerCanInvoke();\n }\n\n if (messenger.xDomainMessageSender() != user) {\n revert OnlyCrossDomainUserCanInvoke();\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 6950 + ], + "DebtShareStorage": [ + 6611 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6951, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6613, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:44" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "id": 6614, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 1783, + "src": "56:69:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6615, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 4684, + "src": "126:82:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6616, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 1697, + "src": "209:69:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6617, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 26, + "src": "279:70:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6618, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 16, + "src": "350:71:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6619, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 6612, + "src": "422:44:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6621, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "619:12:44" + }, + "id": 6622, + "nodeType": "InheritanceSpecifier", + "src": "619:12:44" + }, + { + "baseName": { + "id": 6623, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6611, + "src": "633:16:44" + }, + "id": 6624, + "nodeType": "InheritanceSpecifier", + "src": "633:16:44" + } + ], + "canonicalName": "CrossChainDebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6620, + "nodeType": "StructuredDocumentation", + "src": "468:112:44", + "text": "@dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number" + }, + "fullyImplemented": true, + "id": 6950, + "linearizedBaseContracts": [ + 6950, + 6611, + 4683, + 4331 + ], + "name": "CrossChainDebtShareManager", + "nameLocation": "589:26:44", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6626, + "name": "MerkleRootNotSet", + "nameLocation": "662:16:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6625, + "nodeType": "ParameterList", + "parameters": [], + "src": "678:2:44" + }, + "src": "656:25:44" + }, + { + "id": 6628, + "name": "InvalidMerkleProof", + "nameLocation": "692:18:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6627, + "nodeType": "ParameterList", + "parameters": [], + "src": "710:2:44" + }, + "src": "686:27:44" + }, + { + "id": 6630, + "name": "CrossChainDebtShareAlreadyDeclared", + "nameLocation": "724:34:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6629, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:44" + }, + "src": "718:43:44" + }, + { + "anonymous": false, + "id": 6638, + "name": "CrossChainDebtShareMerkleRootSet", + "nameLocation": "773:32:44", + "nodeType": "EventDefinition", + "parameters": { + "id": 6637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6632, + "indexed": false, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "814:10:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "806:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6631, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "806:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6634, + "indexed": false, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "831:11:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "826:16:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6633, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "826:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6636, + "indexed": false, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "849:5:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "844:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6635, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "844:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "805:50:44" + }, + "src": "767:89:44" + }, + { + "anonymous": false, + "id": 6644, + "name": "CrossChainDebtShareDeclared", + "nameLocation": "867:27:44", + "nodeType": "EventDefinition", + "parameters": { + "id": 6643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6640, + "indexed": false, + "mutability": "mutable", + "name": "user", + "nameLocation": "903:4:44", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "895:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6639, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "895:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6642, + "indexed": false, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "914:9:44", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "909:14:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "909:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "894:30:44" + }, + "src": "861:64:44" + }, + { + "body": { + "id": 6673, + "nodeType": "Block", + "src": "1021:238:44", + "statements": [ + { + "assignments": [ + 6653 + ], + "declarations": [ + { + "constant": false, + "id": 6653, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1063:13:44", + "nodeType": "VariableDeclaration", + "scope": 6673, + "src": "1031:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6652, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6651, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "1031:23:44" + }, + "referencedDeclaration": 6602, + "src": "1031:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6660, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6654, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1079:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6656, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "1079:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6659, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6657, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1121:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1121:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1079:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1031:114:44" + }, + { + "expression": { + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6661, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6653, + "src": "1156:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1156:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6664, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6646, + "src": "1183:10:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1156:37:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6666, + "nodeType": "ExpressionStatement", + "src": "1156:37:44" + }, + { + "expression": { + "id": 6671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6667, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6653, + "src": "1203:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6669, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6597, + "src": "1203:35:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6670, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "1241:11:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1203:49:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6672, + "nodeType": "ExpressionStatement", + "src": "1203:49:44" + } + ] + }, + "id": 6674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossChainDebtShareMerkleRoot", + "nameLocation": "940:33:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6646, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "982:10:44", + "nodeType": "VariableDeclaration", + "scope": 6674, + "src": "974:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6645, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "974:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6648, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "999:11:44", + "nodeType": "VariableDeclaration", + "scope": 6674, + "src": "994:16:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6647, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "994:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "973:38:44" + }, + "returnParameters": { + "id": 6650, + "nodeType": "ParameterList", + "parameters": [], + "src": "1021:0:44" + }, + "scope": 6950, + "src": "931:328:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6745, + "nodeType": "Block", + "src": "1406:600:44", + "statements": [ + { + "assignments": [ + 6686 + ], + "declarations": [ + { + "constant": false, + "id": 6686, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1448:13:44", + "nodeType": "VariableDeclaration", + "scope": 6745, + "src": "1416:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6685, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6684, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "1416:23:44" + }, + "referencedDeclaration": 6602, + "src": "1416:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6693, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6687, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1464:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1464:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6689, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "1464:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6692, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6690, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1506:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1506:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1464:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1416:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 6694, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1545:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "1545:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6697, + "indexExpression": { + "id": 6696, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1570:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1545:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1579:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1545:35:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6704, + "nodeType": "IfStatement", + "src": "1541:109:44", + "trueBody": { + "id": 6703, + "nodeType": "Block", + "src": "1582:68:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6700, + "name": "CrossChainDebtShareAlreadyDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6630, + "src": "1603:34:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:36:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6702, + "nodeType": "RevertStatement", + "src": "1596:43:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6705, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1664:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6706, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1664:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1692:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1664:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6713, + "nodeType": "IfStatement", + "src": "1660:85:44", + "trueBody": { + "id": 6712, + "nodeType": "Block", + "src": "1695:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6709, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "1716:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1716:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6711, + "nodeType": "RevertStatement", + "src": "1709:25:44" + } + ] + } + }, + { + "assignments": [ + 6715 + ], + "declarations": [ + { + "constant": false, + "id": 6715, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "1763:4:44", + "nodeType": "VariableDeclaration", + "scope": 6745, + "src": "1755:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1755:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6723, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 6719, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1797:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6720, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "1803:9:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6717, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1780:3:44", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1780:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:33:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6716, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1770:9:44", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1770:44:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1755:59:44" + }, + { + "condition": { + "id": 6731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1829:64:44", + "subExpression": { + "arguments": [ + { + "id": 6726, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6681, + "src": "1849:11:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "expression": { + "id": 6727, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1862:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1862:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6729, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6715, + "src": "1888:4:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6724, + "name": "MerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1782, + "src": "1830:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MerkleProof_$1782_$", + "typeString": "type(library MerkleProof)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verify", + "nodeType": "MemberAccess", + "referencedDeclaration": 1770, + "src": "1830:18:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32[] memory,bytes32,bytes32) pure returns (bool)" + } + }, + "id": 6730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1830:63:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6736, + "nodeType": "IfStatement", + "src": "1825:122:44", + "trueBody": { + "id": 6735, + "nodeType": "Block", + "src": "1895:52:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6732, + "name": "InvalidMerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6628, + "src": "1916:18:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1916:20:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6734, + "nodeType": "RevertStatement", + "src": "1909:27:44" + } + ] + } + }, + { + "expression": { + "id": 6743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6737, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1957:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "1957:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6741, + "indexExpression": { + "id": 6739, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1982:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1957:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6742, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "1990:9:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1957:42:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6744, + "nodeType": "ExpressionStatement", + "src": "1957:42:44" + } + ] + }, + "id": 6746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_declareCrossChainDebtShare", + "nameLocation": "1274:27:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6676, + "mutability": "mutable", + "name": "user", + "nameLocation": "1319:4:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1311:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6675, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1311:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6678, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "1341:9:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1333:17:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1333:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6681, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "1379:11:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1360:30:44", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6679, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1360:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6680, + "nodeType": "ArrayTypeName", + "src": "1360:9:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "1301:95:44" + }, + "returnParameters": { + "id": 6683, + "nodeType": "ParameterList", + "parameters": [], + "src": "1406:0:44" + }, + "scope": 6950, + "src": "1265:741:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6773, + "nodeType": "Block", + "src": "2089:268:44", + "statements": [ + { + "assignments": [ + 6753 + ], + "declarations": [ + { + "constant": false, + "id": 6753, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2131:13:44", + "nodeType": "VariableDeclaration", + "scope": 6773, + "src": "2099:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6751, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2099:23:44" + }, + "referencedDeclaration": 6602, + "src": "2099:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6760, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6754, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2147:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2147:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2147:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6759, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6757, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2189:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2147:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2099:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6761, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6753, + "src": "2228:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6762, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2228:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2256:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2228:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6769, + "nodeType": "IfStatement", + "src": "2224:85:44", + "trueBody": { + "id": 6768, + "nodeType": "Block", + "src": "2259:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6765, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "2280:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2280:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6767, + "nodeType": "RevertStatement", + "src": "2273:25:44" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6770, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6753, + "src": "2326:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6771, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2326:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6750, + "id": 6772, + "nodeType": "Return", + "src": "2319:31:44" + } + ] + }, + "id": 6774, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRoot", + "nameLocation": "2021:33:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6747, + "nodeType": "ParameterList", + "parameters": [], + "src": "2054:2:44" + }, + "returnParameters": { + "id": 6750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6749, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6774, + "src": "2080:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6748, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2080:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2079:9:44" + }, + "scope": 6950, + "src": "2012:345:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6801, + "nodeType": "Block", + "src": "2448:279:44", + "statements": [ + { + "assignments": [ + 6781 + ], + "declarations": [ + { + "constant": false, + "id": 6781, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2490:13:44", + "nodeType": "VariableDeclaration", + "scope": 6801, + "src": "2458:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6780, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6779, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2458:23:44" + }, + "referencedDeclaration": 6602, + "src": "2458:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6788, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6782, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2506:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2506:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6787, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6785, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2548:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2548:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2506:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2458:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6789, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6781, + "src": "2587:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2587:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2587:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6797, + "nodeType": "IfStatement", + "src": "2583:85:44", + "trueBody": { + "id": 6796, + "nodeType": "Block", + "src": "2618:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6793, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "2639:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2639:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6795, + "nodeType": "RevertStatement", + "src": "2632:25:44" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6798, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6781, + "src": "2685:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6597, + "src": "2685:35:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6778, + "id": 6800, + "nodeType": "Return", + "src": "2678:42:44" + } + ] + }, + "id": 6802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2372:44:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6775, + "nodeType": "ParameterList", + "parameters": [], + "src": "2416:2:44" + }, + "returnParameters": { + "id": 6778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6777, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6802, + "src": "2442:4:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2442:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2441:6:44" + }, + "scope": 6950, + "src": "2363:364:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6824, + "nodeType": "Block", + "src": "2817:179:44", + "statements": [ + { + "assignments": [ + 6811 + ], + "declarations": [ + { + "constant": false, + "id": 6811, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2859:13:44", + "nodeType": "VariableDeclaration", + "scope": 6824, + "src": "2827:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6809, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2827:23:44" + }, + "referencedDeclaration": 6602, + "src": "2827:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6818, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6812, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2875:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2875:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2875:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6817, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6815, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2917:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2875:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2827:114:44" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6819, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6811, + "src": "2959:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "2959:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6822, + "indexExpression": { + "id": 6821, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6804, + "src": "2984:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2959:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6808, + "id": 6823, + "nodeType": "Return", + "src": "2952:37:44" + } + ] + }, + "id": 6825, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDeclaredCrossChainDebtShare", + "nameLocation": "2742:31:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6805, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6804, + "mutability": "mutable", + "name": "user", + "nameLocation": "2782:4:44", + "nodeType": "VariableDeclaration", + "scope": 6825, + "src": "2774:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6803, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2774:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2773:14:44" + }, + "returnParameters": { + "id": 6808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6807, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6825, + "src": "2811:4:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6806, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2811:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2810:6:44" + }, + "scope": 6950, + "src": "2733:263:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6884, + "nodeType": "Block", + "src": "3085:575:44", + "statements": [ + { + "assignments": [ + 6832 + ], + "declarations": [ + { + "constant": false, + "id": 6832, + "mutability": "mutable", + "name": "store", + "nameLocation": "3118:5:44", + "nodeType": "VariableDeclaration", + "scope": 6884, + "src": "3095:28:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6830, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "3095:14:44" + }, + "referencedDeclaration": 6593, + "src": "3095:14:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6835, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6833, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3126:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3126:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3095:48:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6836, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3158:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3200:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3192:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6837, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3192:7:44", + "typeDescriptions": {} + } + }, + "id": 6840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3192:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3158:44:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6848, + "nodeType": "IfStatement", + "src": "3154:108:44", + "trueBody": { + "id": 6847, + "nodeType": "Block", + "src": "3204:58:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6842, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3225:12:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "3225:24:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3225:26:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6846, + "nodeType": "RevertStatement", + "src": "3218:33:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6849, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3276:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 6852, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6832, + "src": "3318:5:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3318:26:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3310:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3310:7:44", + "typeDescriptions": {} + } + }, + "id": 6854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3310:35:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3276:69:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6862, + "nodeType": "IfStatement", + "src": "3272:129:44", + "trueBody": { + "id": 6861, + "nodeType": "Block", + "src": "3347:54:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6856, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "3368:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "3368:20:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3368:22:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6860, + "nodeType": "RevertStatement", + "src": "3361:29:44" + } + ] + } + }, + { + "condition": { + "id": 6867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3415:55:44", + "subExpression": { + "arguments": [ + { + "id": 6865, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3439:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6863, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "3416:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 6864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "3416:22:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3416:54:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6875, + "nodeType": "IfStatement", + "src": "3411:150:44", + "trueBody": { + "id": 6874, + "nodeType": "Block", + "src": "3472:89:44", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 6871, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3519:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6868, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3493:12:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "3493:25:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 6872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3493:57:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6873, + "nodeType": "RevertStatement", + "src": "3486:64:44" + } + ] + } + }, + { + "expression": { + "id": 6882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6876, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6832, + "src": "3571:5:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3571:26:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6880, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3622:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6879, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3600:21:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3600:53:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "src": "3571:82:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6883, + "nodeType": "ExpressionStatement", + "src": "3571:82:44" + } + ] + }, + "id": 6885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossDomainMessenger", + "nameLocation": "3011:24:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6827, + "mutability": "mutable", + "name": "newCrossDomainMessengerAddress", + "nameLocation": "3044:30:44", + "nodeType": "VariableDeclaration", + "scope": 6885, + "src": "3036:38:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6826, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3036:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3035:40:44" + }, + "returnParameters": { + "id": 6829, + "nodeType": "ParameterList", + "parameters": [], + "src": "3085:0:44" + }, + "scope": 6950, + "src": "3002:658:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6897, + "nodeType": "Block", + "src": "3734:71:44", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6892, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3759:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3759:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3759:38:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3751:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3751:7:44", + "typeDescriptions": {} + } + }, + "id": 6895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3751:47:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6889, + "id": 6896, + "nodeType": "Return", + "src": "3744:54:44" + } + ] + }, + "id": 6898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossDomainMessenger", + "nameLocation": "3675:24:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6886, + "nodeType": "ParameterList", + "parameters": [], + "src": "3699:2:44" + }, + "returnParameters": { + "id": 6889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6888, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6898, + "src": "3725:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6887, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3725:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3724:9:44" + }, + "scope": 6950, + "src": "3666:139:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6948, + "nodeType": "Block", + "src": "3875:453:44", + "statements": [ + { + "assignments": [ + 6905 + ], + "declarations": [ + { + "constant": false, + "id": 6905, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3907:9:44", + "nodeType": "VariableDeclaration", + "scope": 6948, + "src": "3885:31:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6904, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6903, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "3885:21:44" + }, + "referencedDeclaration": 6416, + "src": "3885:21:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "id": 6911, + "initialValue": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6907, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3941:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3941:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3941:38:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6906, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3919:21:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3919:61:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3885:95:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6914, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4003:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3995:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6912, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3995:7:44", + "typeDescriptions": {} + } + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3995:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4017:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6916, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4017:7:44", + "typeDescriptions": {} + } + }, + "id": 6919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4017:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3995:32:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6925, + "nodeType": "IfStatement", + "src": "3991:98:44", + "trueBody": { + "id": 6924, + "nodeType": "Block", + "src": "4029:60:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6921, + "name": "CrossDomainMessengerNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4374, + "src": "4050:26:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4050:28:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6923, + "nodeType": "RevertStatement", + "src": "4043:35:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6926, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4103:3:44", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4103:10:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "id": 6930, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4125:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4117:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4117:7:44", + "typeDescriptions": {} + } + }, + "id": 6931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4117:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4103:32:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6937, + "nodeType": "IfStatement", + "src": "4099:105:44", + "trueBody": { + "id": 6936, + "nodeType": "Block", + "src": "4137:67:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6933, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4376, + "src": "4158:33:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4158:35:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6935, + "nodeType": "RevertStatement", + "src": "4151:42:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6938, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4218:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xDomainMessageSender", + "nodeType": "MemberAccess", + "referencedDeclaration": 6406, + "src": "4218:30:44", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4218:32:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6941, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6900, + "src": "4254:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4218:40:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6947, + "nodeType": "IfStatement", + "src": "4214:108:44", + "trueBody": { + "id": 6946, + "nodeType": "Block", + "src": "4260:62:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6943, + "name": "OnlyCrossDomainUserCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4378, + "src": "4281:28:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4281:30:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6945, + "nodeType": "RevertStatement", + "src": "4274:37:44" + } + ] + } + } + ] + }, + "id": 6949, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCrossChainMessage", + "nameLocation": "3820:26:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6900, + "mutability": "mutable", + "name": "user", + "nameLocation": "3855:4:44", + "nodeType": "VariableDeclaration", + "scope": 6949, + "src": "3847:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3846:14:44" + }, + "returnParameters": { + "id": 6902, + "nodeType": "ParameterList", + "parameters": [], + "src": "3875:0:44" + }, + "scope": 6950, + "src": "3811:517:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6951, + "src": "580:3750:44", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6626, + 6628, + 6630 + ] + } + ], + "src": "31:4300:44" + } + }, + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Based on OpenZeppelin https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol\nlibrary MerkleProof {\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n bytes32 computedHash = leaf;\n\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n\n // Check if the computed hash (root) is equal to the provided root\n return computedHash == root;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "exportedSymbols": { + "MerkleProof": [ + 1782 + ] + }, + "id": 1783, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1710, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:23" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MerkleProof", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1782, + "linearizedBaseContracts": [ + 1782 + ], + "name": "MerkleProof", + "nameLocation": "201:11:23", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1769, + "nodeType": "Block", + "src": "346:656:23", + "statements": [ + { + "assignments": [ + 1723 + ], + "declarations": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "computedHash", + "nameLocation": "364:12:23", + "nodeType": "VariableDeclaration", + "scope": 1769, + "src": "356:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1722, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "356:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1725, + "initialValue": { + "id": 1724, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1717, + "src": "379:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "356:27:23" + }, + { + "body": { + "id": 1763, + "nodeType": "Block", + "src": "437:446:23", + "statements": [ + { + "assignments": [ + 1738 + ], + "declarations": [ + { + "constant": false, + "id": 1738, + "mutability": "mutable", + "name": "proofElement", + "nameLocation": "459:12:23", + "nodeType": "VariableDeclaration", + "scope": 1763, + "src": "451:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1737, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "451:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1742, + "initialValue": { + "baseExpression": { + "id": 1739, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "474:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1741, + "indexExpression": { + "id": 1740, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "480:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "474:8:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "451:31:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1743, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "501:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 1744, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "517:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "501:28:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1761, + "nodeType": "Block", + "src": "705:168:23", + "statements": [ + { + "expression": { + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1754, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "801:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1756, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "831:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1757, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "845:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1755, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "816:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "816:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "801:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1760, + "nodeType": "ExpressionStatement", + "src": "801:57:23" + } + ] + }, + "id": 1762, + "nodeType": "IfStatement", + "src": "497:376:23", + "trueBody": { + "id": 1753, + "nodeType": "Block", + "src": "531:168:23", + "statements": [ + { + "expression": { + "id": 1751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1746, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "627:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1748, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "657:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1749, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "671:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1747, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "642:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "627:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1752, + "nodeType": "ExpressionStatement", + "src": "627:57:23" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1730, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "414:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1731, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "418:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "418:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "414:16:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1764, + "initializationExpression": { + "assignments": [ + 1727 + ], + "declarations": [ + { + "constant": false, + "id": 1727, + "mutability": "mutable", + "name": "i", + "nameLocation": "407:1:23", + "nodeType": "VariableDeclaration", + "scope": 1764, + "src": "399:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1729, + "initialValue": { + "hexValue": "30", + "id": 1728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "411:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "399:13:23" + }, + "loopExpression": { + "expression": { + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "432:3:23", + "subExpression": { + "id": 1734, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "432:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1736, + "nodeType": "ExpressionStatement", + "src": "432:3:23" + }, + "nodeType": "ForStatement", + "src": "394:489:23" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1765, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "975:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1766, + "name": "root", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1715, + "src": "991:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "975:20:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1721, + "id": 1768, + "nodeType": "Return", + "src": "968:27:23" + } + ] + }, + "id": 1770, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verify", + "nameLocation": "228:6:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1718, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1713, + "mutability": "mutable", + "name": "proof", + "nameLocation": "261:5:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "244:22:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1711, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "244:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1712, + "nodeType": "ArrayTypeName", + "src": "244:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1715, + "mutability": "mutable", + "name": "root", + "nameLocation": "284:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "276:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "276:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1717, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "306:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "298:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1716, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "298:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "234:82:23" + }, + "returnParameters": { + "id": 1721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1720, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "340:4:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1719, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "340:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "339:6:23" + }, + "scope": 1782, + "src": "219:783:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1780, + "nodeType": "Block", + "src": "1091:135:23", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1110:110:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1131:4:23", + "type": "", + "value": "0x00" + }, + { + "name": "a", + "nodeType": "YulIdentifier", + "src": "1137:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1124:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1124:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1124:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1159:4:23", + "type": "", + "value": "0x20" + }, + { + "name": "b", + "nodeType": "YulIdentifier", + "src": "1165:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1152:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1152:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1152:15:23" + }, + { + "nodeType": "YulAssignment", + "src": "1180:30:23", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1199:4:23", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1205:4:23", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "keccak256", + "nodeType": "YulIdentifier", + "src": "1189:9:23" + }, + "nodeType": "YulFunctionCall", + "src": "1189:21:23" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1180:5:23" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1772, + "isOffset": false, + "isSlot": false, + "src": "1137:1:23", + "valueSize": 1 + }, + { + "declaration": 1774, + "isOffset": false, + "isSlot": false, + "src": "1165:1:23", + "valueSize": 1 + }, + { + "declaration": 1777, + "isOffset": false, + "isSlot": false, + "src": "1180:5:23", + "valueSize": 1 + } + ], + "id": 1779, + "nodeType": "InlineAssembly", + "src": "1101:119:23" + } + ] + }, + "id": 1781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_efficientHash", + "nameLocation": "1017:14:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1772, + "mutability": "mutable", + "name": "a", + "nameLocation": "1040:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1032:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1032:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1774, + "mutability": "mutable", + "name": "b", + "nameLocation": "1051:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1043:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1773, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1043:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1031:22:23" + }, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "value", + "nameLocation": "1084:5:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1076:13:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1776, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1076:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1075:15:23" + }, + "scope": 1782, + "src": "1008:218:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1783, + "src": "193:1035:23", + "usedErrors": [] + } + ], + "src": "31:1198:23" + } + }, + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IDebtShare.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\nimport \"../interfaces/ICrossDomainMessenger.sol\";\n\ncontract DebtShareStorage {\n struct DebtShareStore {\n // Synthetix c2 DebtShare contract used to determine vote power in the local chain\n IDebtShare debtShareContract;\n // Array of debt share snapshot id's for each epoch\n uint128[] debtShareIds;\n // Array of CrossChainDebtShareData's for each epoch\n CrossChainDebtShareData[] crossChainDebtShareData;\n // Stores the address of the Optimism cross domain messenger on L2\n ICrossDomainMessenger crossDomainMessenger;\n }\n\n struct CrossChainDebtShareData {\n // Synthetix v2 cross chain debt share merkle root\n bytes32 merkleRoot;\n // Cross chain debt share merkle root snapshot blocknumber\n uint merkleRootBlockNumber;\n // Cross chain debt shares declared on this chain\n mapping(address => uint) debtShares;\n }\n\n function _debtShareStore() internal pure returns (DebtShareStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.debtshare\")) - 1)\n store.slot := 0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "exportedSymbols": { + "DebtShareStorage": [ + 6611 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6612, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6576, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:43" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "file": "../interfaces/IDebtShare.sol", + "id": 6577, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 6429, + "src": "56:38:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 6578, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 2289, + "src": "95:65:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "file": "../interfaces/ICrossDomainMessenger.sol", + "id": 6579, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 6417, + "src": "161:49:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "DebtShareStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6611, + "linearizedBaseContracts": [ + 6611 + ], + "name": "DebtShareStorage", + "nameLocation": "221:16:43", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "DebtShareStorage.DebtShareStore", + "id": 6593, + "members": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "378:17:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "367:28:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + }, + "typeName": { + "id": 6581, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6580, + "name": "IDebtShare", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6428, + "src": "367:10:43" + }, + "referencedDeclaration": 6428, + "src": "367:10:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6585, + "mutability": "mutable", + "name": "debtShareIds", + "nameLocation": "475:12:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "465:22:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + }, + "typeName": { + "baseType": { + "id": 6583, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "465:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6584, + "nodeType": "ArrayTypeName", + "src": "465:9:43", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6589, + "mutability": "mutable", + "name": "crossChainDebtShareData", + "nameLocation": "584:23:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "558:49:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + }, + "typeName": { + "baseType": { + "id": 6587, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6586, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "558:23:43" + }, + "referencedDeclaration": 6602, + "src": "558:23:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "id": 6588, + "nodeType": "ArrayTypeName", + "src": "558:25:43", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "crossDomainMessenger", + "nameLocation": "714:20:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "692:42:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6591, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6590, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "692:21:43" + }, + "referencedDeclaration": 6416, + "src": "692:21:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "name": "DebtShareStore", + "nameLocation": "251:14:43", + "nodeType": "StructDefinition", + "scope": 6611, + "src": "244:497:43", + "visibility": "public" + }, + { + "canonicalName": "DebtShareStorage.CrossChainDebtShareData", + "id": 6602, + "members": [ + { + "constant": false, + "id": 6595, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "855:10:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "847:18:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6594, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "847:7:43", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6597, + "mutability": "mutable", + "name": "merkleRootBlockNumber", + "nameLocation": "947:21:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "942:26:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "942:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6601, + "mutability": "mutable", + "name": "debtShares", + "nameLocation": "1061:10:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "1036:35:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6600, + "keyType": { + "id": 6598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1044:7:43", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1036:24:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6599, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1055:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "CrossChainDebtShareData", + "nameLocation": "754:23:43", + "nodeType": "StructDefinition", + "scope": 6611, + "src": "747:331:43", + "visibility": "public" + }, + { + "body": { + "id": 6609, + "nodeType": "Block", + "src": "1164:199:43", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1183:174:43", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1267:80:43", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1281:66:43", + "type": "", + "value": "0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "1267:10:43" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 6606, + "isOffset": false, + "isSlot": true, + "src": "1267:10:43", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 6608, + "nodeType": "InlineAssembly", + "src": "1174:183:43" + } + ] + }, + "id": 6610, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_debtShareStore", + "nameLocation": "1093:15:43", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6603, + "nodeType": "ParameterList", + "parameters": [], + "src": "1108:2:43" + }, + "returnParameters": { + "id": 6607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6606, + "mutability": "mutable", + "name": "store", + "nameLocation": "1157:5:43", + "nodeType": "VariableDeclaration", + "scope": 6610, + "src": "1134:28:43", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6605, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6604, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1134:14:43" + }, + "referencedDeclaration": 6593, + "src": "1134:14:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "src": "1133:30:43" + }, + "scope": 6611, + "src": "1084:279:43", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6612, + "src": "212:1153:43", + "usedErrors": [] + } + ], + "src": "31:1335:43" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IDebtShare {\n function balanceOfOnPeriod(address account, uint periodId) external view returns (uint);\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "exportedSymbols": { + "IDebtShare": [ + 6428 + ] + }, + "id": 6429, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6418, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:41" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IDebtShare", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6428, + "linearizedBaseContracts": [ + 6428 + ], + "name": "IDebtShare", + "nameLocation": "66:10:41", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "8a25acf4", + "id": 6427, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOfOnPeriod", + "nameLocation": "92:17:41", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6420, + "mutability": "mutable", + "name": "account", + "nameLocation": "118:7:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "110:15:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "110:7:41", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6422, + "mutability": "mutable", + "name": "periodId", + "nameLocation": "132:8:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "127:13:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6421, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "127:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "109:32:41" + }, + "returnParameters": { + "id": 6426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6425, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "165:4:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6424, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "165:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "164:6:41" + }, + "scope": 6428, + "src": "83:88:41", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6429, + "src": "56:117:41", + "usedErrors": [] + } + ], + "src": "31:143:41" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol": { + "sourceCode": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface ICrossDomainMessenger {\n event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit);\n event RelayedMessage(bytes32 indexed msgHash);\n event FailedRelayedMessage(bytes32 indexed msgHash);\n\n function xDomainMessageSender() external view returns (address);\n\n function sendMessage(\n address target,\n bytes calldata message,\n uint32 gasLimit\n ) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "exportedSymbols": { + "ICrossDomainMessenger": [ + 6416 + ] + }, + "id": 6417, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6381, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:23:40" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ICrossDomainMessenger", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6416, + "linearizedBaseContracts": [ + 6416 + ], + "name": "ICrossDomainMessenger", + "nameLocation": "67:21:40", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 6393, + "name": "SentMessage", + "nameLocation": "101:11:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6383, + "indexed": true, + "mutability": "mutable", + "name": "target", + "nameLocation": "129:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "113:22:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6382, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "113:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6385, + "indexed": false, + "mutability": "mutable", + "name": "sender", + "nameLocation": "145:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "137:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "137:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6387, + "indexed": false, + "mutability": "mutable", + "name": "message", + "nameLocation": "159:7:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "153:13:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6386, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "153:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6389, + "indexed": false, + "mutability": "mutable", + "name": "messageNonce", + "nameLocation": "176:12:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "168:20:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "168:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6391, + "indexed": false, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "198:8:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "190:16:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "190:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "112:95:40" + }, + "src": "95:113:40" + }, + { + "anonymous": false, + "id": 6397, + "name": "RelayedMessage", + "nameLocation": "219:14:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6395, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "250:7:40", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "234:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6394, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "234:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "233:25:40" + }, + "src": "213:46:40" + }, + { + "anonymous": false, + "id": 6401, + "name": "FailedRelayedMessage", + "nameLocation": "270:20:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "307:7:40", + "nodeType": "VariableDeclaration", + "scope": 6401, + "src": "291:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6398, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "291:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "290:25:40" + }, + "src": "264:52:40" + }, + { + "functionSelector": "6e296e45", + "id": 6406, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "xDomainMessageSender", + "nameLocation": "331:20:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [], + "src": "351:2:40" + }, + "returnParameters": { + "id": 6405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6406, + "src": "377:7:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "377:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "376:9:40" + }, + "scope": 6416, + "src": "322:64:40", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3dbb202b", + "id": 6415, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "sendMessage", + "nameLocation": "401:11:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6408, + "mutability": "mutable", + "name": "target", + "nameLocation": "430:6:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "422:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "422:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6410, + "mutability": "mutable", + "name": "message", + "nameLocation": "461:7:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "446:22:40", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6409, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "446:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6412, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "485:8:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "478:15:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 6411, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "478:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "412:87:40" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "508:0:40" + }, + "scope": 6416, + "src": "392:117:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6417, + "src": "57:454:40", + "usedErrors": [] + } + ], + "src": "32:480:40" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/DebtShareStorage.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\n\n/// @dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number\ncontract DebtShareManager is ElectionBase, DebtShareStorage {\n error DebtShareContractNotSet();\n error DebtShareSnapshotIdNotSet();\n\n event DebtShareContractSet(address contractAddress);\n event DebtShareSnapshotIdSet(uint snapshotId);\n\n function _setDebtShareSnapshotId(uint snapshotId) internal {\n DebtShareStore storage store = _debtShareStore();\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n store.debtShareIds[currentEpochIndex] = uint128(snapshotId);\n\n emit DebtShareSnapshotIdSet(snapshotId);\n }\n\n function _getDebtShareSnapshotId() internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n if (debtShareId == 0) {\n revert DebtShareSnapshotIdNotSet();\n }\n\n return debtShareId;\n }\n\n function _setDebtShareContract(address newDebtShareContractAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newDebtShareContractAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newDebtShareContractAddress == address(store.debtShareContract)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newDebtShareContractAddress)) {\n revert AddressError.NotAContract(newDebtShareContractAddress);\n }\n\n store.debtShareContract = IDebtShare(newDebtShareContractAddress);\n }\n\n function _getDebtShare(address user) internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n\n return store.debtShareContract.balanceOfOnPeriod(user, uint(debtShareId));\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "DebtShareManager": [ + 7129 + ], + "DebtShareStorage": [ + 6611 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 7130, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6952, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:45" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6953, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 6612, + "src": "56:44:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6954, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 1697, + "src": "101:69:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6955, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 26, + "src": "171:70:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6956, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 16, + "src": "242:71:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6957, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 4684, + "src": "314:82:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6959, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "521:12:45" + }, + "id": 6960, + "nodeType": "InheritanceSpecifier", + "src": "521:12:45" + }, + { + "baseName": { + "id": 6961, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6611, + "src": "535:16:45" + }, + "id": 6962, + "nodeType": "InheritanceSpecifier", + "src": "535:16:45" + } + ], + "canonicalName": "DebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6958, + "nodeType": "StructuredDocumentation", + "src": "398:94:45", + "text": "@dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number" + }, + "fullyImplemented": true, + "id": 7129, + "linearizedBaseContracts": [ + 7129, + 6611, + 4683, + 4331 + ], + "name": "DebtShareManager", + "nameLocation": "501:16:45", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6964, + "name": "DebtShareContractNotSet", + "nameLocation": "564:23:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6963, + "nodeType": "ParameterList", + "parameters": [], + "src": "587:2:45" + }, + "src": "558:32:45" + }, + { + "id": 6966, + "name": "DebtShareSnapshotIdNotSet", + "nameLocation": "601:25:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6965, + "nodeType": "ParameterList", + "parameters": [], + "src": "626:2:45" + }, + "src": "595:34:45" + }, + { + "anonymous": false, + "id": 6970, + "name": "DebtShareContractSet", + "nameLocation": "641:20:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6968, + "indexed": false, + "mutability": "mutable", + "name": "contractAddress", + "nameLocation": "670:15:45", + "nodeType": "VariableDeclaration", + "scope": 6970, + "src": "662:23:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6967, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "661:25:45" + }, + "src": "635:52:45" + }, + { + "anonymous": false, + "id": 6974, + "name": "DebtShareSnapshotIdSet", + "nameLocation": "698:22:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6972, + "indexed": false, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "726:10:45", + "nodeType": "VariableDeclaration", + "scope": 6974, + "src": "721:15:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6971, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "721:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "720:17:45" + }, + "src": "692:46:45" + }, + { + "body": { + "id": 7005, + "nodeType": "Block", + "src": "803:243:45", + "statements": [ + { + "assignments": [ + 6981 + ], + "declarations": [ + { + "constant": false, + "id": 6981, + "mutability": "mutable", + "name": "store", + "nameLocation": "836:5:45", + "nodeType": "VariableDeclaration", + "scope": 7005, + "src": "813:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6980, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6979, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "813:14:45" + }, + "referencedDeclaration": 6593, + "src": "813:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6984, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6982, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "844:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "844:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "813:48:45" + }, + { + "assignments": [ + 6986 + ], + "declarations": [ + { + "constant": false, + "id": 6986, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "877:17:45", + "nodeType": "VariableDeclaration", + "scope": 7005, + "src": "872:22:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6985, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "872:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6989, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6987, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "897:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "897:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "872:48:45" + }, + { + "expression": { + "id": 6999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6990, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6981, + "src": "930:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "930:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6994, + "indexExpression": { + "id": 6992, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6986, + "src": "949:17:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "930:37:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6997, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6976, + "src": "978:10:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "970:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6995, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "970:7:45", + "typeDescriptions": {} + } + }, + "id": 6998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:19:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "930:59:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 7000, + "nodeType": "ExpressionStatement", + "src": "930:59:45" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7002, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6976, + "src": "1028:10:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7001, + "name": "DebtShareSnapshotIdSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6974, + "src": "1005:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1005:34:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7004, + "nodeType": "EmitStatement", + "src": "1000:39:45" + } + ] + }, + "id": 7006, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareSnapshotId", + "nameLocation": "753:23:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6977, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6976, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "782:10:45", + "nodeType": "VariableDeclaration", + "scope": 7006, + "src": "777:15:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6975, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "777:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "776:17:45" + }, + "returnParameters": { + "id": 6978, + "nodeType": "ParameterList", + "parameters": [], + "src": "803:0:45" + }, + "scope": 7129, + "src": "744:302:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7035, + "nodeType": "Block", + "src": "1116:260:45", + "statements": [ + { + "assignments": [ + 7013 + ], + "declarations": [ + { + "constant": false, + "id": 7013, + "mutability": "mutable", + "name": "store", + "nameLocation": "1149:5:45", + "nodeType": "VariableDeclaration", + "scope": 7035, + "src": "1126:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7012, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7011, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1126:14:45" + }, + "referencedDeclaration": 6593, + "src": "1126:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7016, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7014, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1157:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1157:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1126:48:45" + }, + { + "assignments": [ + 7018 + ], + "declarations": [ + { + "constant": false, + "id": 7018, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "1193:11:45", + "nodeType": "VariableDeclaration", + "scope": 7035, + "src": "1185:19:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7017, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1185:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7024, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7019, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7013, + "src": "1207:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "1207:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7023, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7021, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1226:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1226:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1207:43:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1185:65:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 7027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7025, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "1264:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 7026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1279:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1264:16:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7032, + "nodeType": "IfStatement", + "src": "1260:81:45", + "trueBody": { + "id": 7031, + "nodeType": "Block", + "src": "1282:59:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7028, + "name": "DebtShareSnapshotIdNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6966, + "src": "1303:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:27:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "RevertStatement", + "src": "1296:34:45" + } + ] + } + }, + { + "expression": { + "id": 7033, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "1358:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "functionReturnParameters": 7010, + "id": 7034, + "nodeType": "Return", + "src": "1351:18:45" + } + ] + }, + "id": 7036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShareSnapshotId", + "nameLocation": "1061:23:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7007, + "nodeType": "ParameterList", + "parameters": [], + "src": "1084:2:45" + }, + "returnParameters": { + "id": 7010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7036, + "src": "1110:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7008, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1110:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1109:6:45" + }, + "scope": 7129, + "src": "1052:324:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7095, + "nodeType": "Block", + "src": "1459:543:45", + "statements": [ + { + "assignments": [ + 7043 + ], + "declarations": [ + { + "constant": false, + "id": 7043, + "mutability": "mutable", + "name": "store", + "nameLocation": "1492:5:45", + "nodeType": "VariableDeclaration", + "scope": 7095, + "src": "1469:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7042, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7041, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1469:14:45" + }, + "referencedDeclaration": 6593, + "src": "1469:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7046, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7044, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1500:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1500:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1469:48:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7047, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1532:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1571:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1563:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7048, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1563:7:45", + "typeDescriptions": {} + } + }, + "id": 7051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:10:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1532:41:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7059, + "nodeType": "IfStatement", + "src": "1528:105:45", + "trueBody": { + "id": 7058, + "nodeType": "Block", + "src": "1575:58:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7053, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1596:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1596:24:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:26:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7057, + "nodeType": "RevertStatement", + "src": "1589:33:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7060, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1647:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 7063, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7043, + "src": "1686:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "1686:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + ], + "id": 7062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1678:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1678:7:45", + "typeDescriptions": {} + } + }, + "id": 7065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1678:32:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1647:63:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7073, + "nodeType": "IfStatement", + "src": "1643:123:45", + "trueBody": { + "id": 7072, + "nodeType": "Block", + "src": "1712:54:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7067, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1733:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1733:20:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1733:22:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7071, + "nodeType": "RevertStatement", + "src": "1726:29:45" + } + ] + } + }, + { + "condition": { + "id": 7078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1780:52:45", + "subExpression": { + "arguments": [ + { + "id": 7076, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1804:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7074, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "1781:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 7075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "1781:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 7077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1781:51:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7086, + "nodeType": "IfStatement", + "src": "1776:144:45", + "trueBody": { + "id": 7085, + "nodeType": "Block", + "src": "1834:86:45", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7082, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1881:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7079, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1855:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "1855:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 7083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1855:54:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7084, + "nodeType": "RevertStatement", + "src": "1848:61:45" + } + ] + } + }, + { + "expression": { + "id": 7093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 7087, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7043, + "src": "1930:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "1930:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7091, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1967:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7090, + "name": "IDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6428, + "src": "1956:10:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDebtShare_$6428_$", + "typeString": "type(contract IDebtShare)" + } + }, + "id": 7092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1956:39:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "src": "1930:65:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7094, + "nodeType": "ExpressionStatement", + "src": "1930:65:45" + } + ] + }, + "id": 7096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareContract", + "nameLocation": "1391:21:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7038, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "1421:27:45", + "nodeType": "VariableDeclaration", + "scope": 7096, + "src": "1413:35:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1413:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1412:37:45" + }, + "returnParameters": { + "id": 7040, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:45" + }, + "scope": 7129, + "src": "1382:620:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7127, + "nodeType": "Block", + "src": "2074:225:45", + "statements": [ + { + "assignments": [ + 7105 + ], + "declarations": [ + { + "constant": false, + "id": 7105, + "mutability": "mutable", + "name": "store", + "nameLocation": "2107:5:45", + "nodeType": "VariableDeclaration", + "scope": 7127, + "src": "2084:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7104, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7103, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "2084:14:45" + }, + "referencedDeclaration": 6593, + "src": "2084:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7108, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7106, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2115:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2084:48:45" + }, + { + "assignments": [ + 7110 + ], + "declarations": [ + { + "constant": false, + "id": 7110, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "2151:11:45", + "nodeType": "VariableDeclaration", + "scope": 7127, + "src": "2143:19:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7109, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2143:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7116, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7111, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "2165:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "2165:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7115, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7113, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2184:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2165:43:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2143:65:45" + }, + { + "expression": { + "arguments": [ + { + "id": 7120, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7098, + "src": "2268:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 7123, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7110, + "src": "2279:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 7122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2274:4:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2274:4:45", + "typeDescriptions": {} + } + }, + "id": 7124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2274:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 7117, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "2226:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "2226:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOfOnPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6427, + "src": "2226:41:45", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2226:66:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7102, + "id": 7126, + "nodeType": "Return", + "src": "2219:73:45" + } + ] + }, + "id": 7128, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShare", + "nameLocation": "2017:13:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7099, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7098, + "mutability": "mutable", + "name": "user", + "nameLocation": "2039:4:45", + "nodeType": "VariableDeclaration", + "scope": 7128, + "src": "2031:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7097, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2031:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2030:14:45" + }, + "returnParameters": { + "id": 7102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7101, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7128, + "src": "2068:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7100, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2068:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2067:6:45" + }, + "scope": 7129, + "src": "2008:291:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7130, + "src": "492:1809:45", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6964, + 6966 + ] + } + ], + "src": "31:2271:45" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\n\n/// @dev Defines core functionality for recording votes in ElectionModule.cast()\ncontract ElectionVotes is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _validateCandidates(address[] calldata candidates) internal virtual {\n uint length = candidates.length;\n\n if (length == 0) {\n revert NoCandidates();\n }\n\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n for (uint i = 0; i < length; i++) {\n address candidate = candidates[i];\n\n // Reject candidates that are not nominated.\n if (!nominees.contains(candidate)) {\n revert NotNominated();\n }\n\n // Reject duplicate candidates.\n if (i < length - 1) {\n for (uint j = i + 1; j < length; j++) {\n address otherCandidate = candidates[j];\n\n if (candidate == otherCandidate) {\n revert DuplicateCandidates();\n }\n }\n }\n }\n }\n\n function _recordVote(\n address user,\n uint votePower,\n address[] calldata candidates\n ) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = _calculateBallotId(candidates);\n BallotData storage ballot = _getBallot(ballotId);\n\n // Initialize ballot if new.\n if (!_ballotExists(ballot)) {\n address[] memory newCandidates = candidates;\n\n ballot.candidates = newCandidates;\n\n election.ballotIds.push(ballotId);\n }\n\n ballot.votes += votePower;\n ballot.votesByUser[user] = votePower;\n election.ballotIdsByAddress[user] = ballotId;\n\n return ballotId;\n }\n\n function _withdrawVote(address user, uint votePower) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n ballot.votes -= votePower;\n ballot.votesByUser[user] = 0;\n election.ballotIdsByAddress[user] = bytes32(0);\n\n return ballotId;\n }\n\n function _withdrawCastedVote(address user, uint epochIndex) internal virtual {\n uint castedVotePower = _getCastedVotePower(user);\n\n bytes32 ballotId = _withdrawVote(user, castedVotePower);\n\n emit VoteWithdrawn(user, ballotId, epochIndex, castedVotePower);\n }\n\n function _getCastedVotePower(address user) internal virtual returns (uint votePower) {\n ElectionData storage election = _getCurrentElection();\n\n bytes32 ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n return ballot.votesByUser[user];\n }\n\n function _getVotePower(address) internal view virtual returns (uint) {\n return 1;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionVotes": [ + 6279 + ], + "MathUtil": [ + 1708 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6280, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5963, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5964, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 4684, + "src": "56:28:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 5965, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1697, + "src": "85:69:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 5966, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1709, + "src": "155:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 5967, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 26, + "src": "222:70:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 5968, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 16, + "src": "293:71:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5970, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "473:12:38" + }, + "id": 5971, + "nodeType": "InheritanceSpecifier", + "src": "473:12:38" + } + ], + "canonicalName": "ElectionVotes", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5969, + "nodeType": "StructuredDocumentation", + "src": "366:81:38", + "text": "@dev Defines core functionality for recording votes in ElectionModule.cast()" + }, + "fullyImplemented": true, + "id": 6279, + "linearizedBaseContracts": [ + 6279, + 4683, + 4331 + ], + "name": "ElectionVotes", + "nameLocation": "456:13:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5975, + "libraryName": { + "id": 5972, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "498:7:38" + }, + "nodeType": "UsingForDirective", + "src": "492:37:38", + "typeName": { + "id": 5974, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5973, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "510:18:38" + }, + "referencedDeclaration": 1788, + "src": "510:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 6066, + "nodeType": "Block", + "src": "612:821:38", + "statements": [ + { + "assignments": [ + 5982 + ], + "declarations": [ + { + "constant": false, + "id": 5982, + "mutability": "mutable", + "name": "length", + "nameLocation": "627:6:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "622:11:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5981, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "622:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5985, + "initialValue": { + "expression": { + "id": 5983, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "636:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 5984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "636:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "622:31:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5986, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "668:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "678:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "668:11:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5993, + "nodeType": "IfStatement", + "src": "664:63:38", + "trueBody": { + "id": 5992, + "nodeType": "Block", + "src": "681:46:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5989, + "name": "NoCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4352, + "src": "702:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "702:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5991, + "nodeType": "RevertStatement", + "src": "695:21:38" + } + ] + } + }, + { + "assignments": [ + 5998 + ], + "declarations": [ + { + "constant": false, + "id": 5998, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "764:8:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "737:35:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5996, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "737:18:38" + }, + "referencedDeclaration": 1788, + "src": "737:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 6002, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5999, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "775:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "775:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6001, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "775:30:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "737:68:38" + }, + { + "body": { + "id": 6064, + "nodeType": "Block", + "src": "850:577:38", + "statements": [ + { + "assignments": [ + 6014 + ], + "declarations": [ + { + "constant": false, + "id": 6014, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "872:9:38", + "nodeType": "VariableDeclaration", + "scope": 6064, + "src": "864:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "864:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6018, + "initialValue": { + "baseExpression": { + "id": 6015, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6017, + "indexExpression": { + "id": 6016, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "895:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "884:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "864:33:38" + }, + { + "condition": { + "id": 6023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "973:29:38", + "subExpression": { + "arguments": [ + { + "id": 6021, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "992:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6019, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5998, + "src": "974:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 6020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "974:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 6022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "974:28:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6028, + "nodeType": "IfStatement", + "src": "969:89:38", + "trueBody": { + "id": 6027, + "nodeType": "Block", + "src": "1004:54:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6024, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "1029:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1029:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6026, + "nodeType": "RevertStatement", + "src": "1022:21:38" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6029, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1120:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6030, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1124:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1133:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1124:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1120:14:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6063, + "nodeType": "IfStatement", + "src": "1116:301:38", + "trueBody": { + "id": 6062, + "nodeType": "Block", + "src": "1136:281:38", + "statements": [ + { + "body": { + "id": 6060, + "nodeType": "Block", + "src": "1192:211:38", + "statements": [ + { + "assignments": [ + 6047 + ], + "declarations": [ + { + "constant": false, + "id": 6047, + "mutability": "mutable", + "name": "otherCandidate", + "nameLocation": "1222:14:38", + "nodeType": "VariableDeclaration", + "scope": 6060, + "src": "1214:22:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6046, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1214:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6051, + "initialValue": { + "baseExpression": { + "id": 6048, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "1239:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6050, + "indexExpression": { + "id": 6049, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1250:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1239:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1214:38:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6052, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "1279:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6053, + "name": "otherCandidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "1292:14:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1279:27:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6059, + "nodeType": "IfStatement", + "src": "1275:110:38", + "trueBody": { + "id": 6058, + "nodeType": "Block", + "src": "1308:77:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6055, + "name": "DuplicateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4358, + "src": "1341:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1341:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6057, + "nodeType": "RevertStatement", + "src": "1334:28:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6040, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1175:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6041, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1179:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1175:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6061, + "initializationExpression": { + "assignments": [ + 6035 + ], + "declarations": [ + { + "constant": false, + "id": 6035, + "mutability": "mutable", + "name": "j", + "nameLocation": "1164:1:38", + "nodeType": "VariableDeclaration", + "scope": 6061, + "src": "1159:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6034, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1159:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6039, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6036, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1168:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 6037, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1172:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1168:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1159:14:38" + }, + "loopExpression": { + "expression": { + "id": 6044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1187:3:38", + "subExpression": { + "id": 6043, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1187:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6045, + "nodeType": "ExpressionStatement", + "src": "1187:3:38" + }, + "nodeType": "ForStatement", + "src": "1154:249:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6007, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "833:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6008, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "837:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "833:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6065, + "initializationExpression": { + "assignments": [ + 6004 + ], + "declarations": [ + { + "constant": false, + "id": 6004, + "mutability": "mutable", + "name": "i", + "nameLocation": "826:1:38", + "nodeType": "VariableDeclaration", + "scope": 6065, + "src": "821:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "821:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6006, + "initialValue": { + "hexValue": "30", + "id": 6005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "821:10:38" + }, + "loopExpression": { + "expression": { + "id": 6011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "845:3:38", + "subExpression": { + "id": 6010, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "845:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6012, + "nodeType": "ExpressionStatement", + "src": "845:3:38" + }, + "nodeType": "ForStatement", + "src": "816:611:38" + } + ] + }, + "id": 6067, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCandidates", + "nameLocation": "544:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5978, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "583:10:38", + "nodeType": "VariableDeclaration", + "scope": 6067, + "src": "564:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 5976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "564:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5977, + "nodeType": "ArrayTypeName", + "src": "564:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "563:31:38" + }, + "returnParameters": { + "id": 5980, + "nodeType": "ParameterList", + "parameters": [], + "src": "612:0:38" + }, + "scope": 6279, + "src": "535:898:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6149, + "nodeType": "Block", + "src": "1595:581:38", + "statements": [ + { + "assignments": [ + 6081 + ], + "declarations": [ + { + "constant": false, + "id": 6081, + "mutability": "mutable", + "name": "election", + "nameLocation": "1626:8:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1605:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6080, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6079, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1605:12:38" + }, + "referencedDeclaration": 4299, + "src": "1605:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6084, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6082, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "1637:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1637:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1605:53:38" + }, + { + "expression": { + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6085, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1669:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6087, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1699:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6086, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "1680:18:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 6088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:30:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1669:41:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6090, + "nodeType": "ExpressionStatement", + "src": "1669:41:38" + }, + { + "assignments": [ + 6093 + ], + "declarations": [ + { + "constant": false, + "id": 6093, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1739:6:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1720:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6092, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6091, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1720:10:38" + }, + "referencedDeclaration": 4309, + "src": "1720:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6097, + "initialValue": { + "arguments": [ + { + "id": 6095, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1759:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6094, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "1748:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1748:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1720:48:38" + }, + { + "condition": { + "id": 6101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1820:22:38", + "subExpression": { + "arguments": [ + { + "id": 6099, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1835:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + ], + "id": 6098, + "name": "_ballotExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "1821:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_BallotData_$4309_storage_ptr_$returns$_t_bool_$", + "typeString": "function (struct ElectionStorage.BallotData storage pointer) view returns (bool)" + } + }, + "id": 6100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1821:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6124, + "nodeType": "IfStatement", + "src": "1816:192:38", + "trueBody": { + "id": 6123, + "nodeType": "Block", + "src": "1844:164:38", + "statements": [ + { + "assignments": [ + 6106 + ], + "declarations": [ + { + "constant": false, + "id": 6106, + "mutability": "mutable", + "name": "newCandidates", + "nameLocation": "1875:13:38", + "nodeType": "VariableDeclaration", + "scope": 6123, + "src": "1858:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1858:7:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6105, + "nodeType": "ArrayTypeName", + "src": "1858:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 6108, + "initialValue": { + "id": 6107, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1891:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1858:43:38" + }, + { + "expression": { + "id": 6113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6109, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1916:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1916:17:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6112, + "name": "newCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6106, + "src": "1936:13:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "1916:33:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 6114, + "nodeType": "ExpressionStatement", + "src": "1916:33:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6120, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1988:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 6115, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "1964:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1964:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "1964:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1964:33:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6122, + "nodeType": "ExpressionStatement", + "src": "1964:33:38" + } + ] + } + }, + { + "expression": { + "id": 6129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6125, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2018:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2018:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 6128, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2034:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2018:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6130, + "nodeType": "ExpressionStatement", + "src": "2018:25:38" + }, + { + "expression": { + "id": 6137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6131, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2053:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2053:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6135, + "indexExpression": { + "id": 6133, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2072:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2053:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6136, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2080:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2053:36:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6138, + "nodeType": "ExpressionStatement", + "src": "2053:36:38" + }, + { + "expression": { + "id": 6145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6139, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "2099:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2099:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6143, + "indexExpression": { + "id": 6141, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2127:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2099:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6144, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2135:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2099:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6146, + "nodeType": "ExpressionStatement", + "src": "2099:44:38" + }, + { + "expression": { + "id": 6147, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2161:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6078, + "id": 6148, + "nodeType": "Return", + "src": "2154:15:38" + } + ] + }, + "id": 6150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_recordVote", + "nameLocation": "1448:11:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6069, + "mutability": "mutable", + "name": "user", + "nameLocation": "1477:4:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1469:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6068, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1469:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6071, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "1496:9:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1491:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6070, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1491:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6074, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "1534:10:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1515:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1515:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6073, + "nodeType": "ArrayTypeName", + "src": "1515:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1459:91:38" + }, + "returnParameters": { + "id": 6078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6077, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1585:8:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1577:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1577:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1576:18:38" + }, + "scope": 6279, + "src": "1439:737:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6206, + "nodeType": "Block", + "src": "2279:339:38", + "statements": [ + { + "assignments": [ + 6161 + ], + "declarations": [ + { + "constant": false, + "id": 6161, + "mutability": "mutable", + "name": "election", + "nameLocation": "2310:8:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2289:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6160, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6159, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2289:12:38" + }, + "referencedDeclaration": 4299, + "src": "2289:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6164, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6162, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "2321:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2321:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2289:53:38" + }, + { + "expression": { + "id": 6170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6165, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2353:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "expression": { + "id": 6166, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2364:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2364:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6169, + "indexExpression": { + "id": 6168, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2392:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2364:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2353:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6171, + "nodeType": "ExpressionStatement", + "src": "2353:44:38" + }, + { + "assignments": [ + 6174 + ], + "declarations": [ + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "2426:6:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2407:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6173, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6172, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2407:10:38" + }, + "referencedDeclaration": 4309, + "src": "2407:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6178, + "initialValue": { + "arguments": [ + { + "id": 6176, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2446:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6175, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "2435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2435:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2407:48:38" + }, + { + "expression": { + "id": 6183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6179, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2466:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2466:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 6182, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6154, + "src": "2482:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2466:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6184, + "nodeType": "ExpressionStatement", + "src": "2466:25:38" + }, + { + "expression": { + "id": 6191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6185, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2501:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6188, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2501:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6189, + "indexExpression": { + "id": 6187, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2520:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2501:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 6190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2528:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2501:28:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6192, + "nodeType": "ExpressionStatement", + "src": "2501:28:38" + }, + { + "expression": { + "id": 6202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6193, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2539:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2539:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6197, + "indexExpression": { + "id": 6195, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2567:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2539:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2583:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2575:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6198, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2575:7:38", + "typeDescriptions": {} + } + }, + "id": 6201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2575:10:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2539:46:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6203, + "nodeType": "ExpressionStatement", + "src": "2539:46:38" + }, + { + "expression": { + "id": 6204, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2603:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6158, + "id": 6205, + "nodeType": "Return", + "src": "2596:15:38" + } + ] + }, + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawVote", + "nameLocation": "2191:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6152, + "mutability": "mutable", + "name": "user", + "nameLocation": "2213:4:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2205:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2205:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6154, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2224:9:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2219:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6153, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2219:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2204:30:38" + }, + "returnParameters": { + "id": 6158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6157, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2269:8:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2261:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6156, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2261:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2260:18:38" + }, + "scope": 6279, + "src": "2182:436:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6234, + "nodeType": "Block", + "src": "2701:205:38", + "statements": [ + { + "assignments": [ + 6215 + ], + "declarations": [ + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "castedVotePower", + "nameLocation": "2716:15:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2711:20:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6214, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2711:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6219, + "initialValue": { + "arguments": [ + { + "id": 6217, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2754:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6216, + "name": "_getCastedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6268, + "src": "2734:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 6218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2734:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2711:48:38" + }, + { + "assignments": [ + 6221 + ], + "declarations": [ + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2778:8:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2770:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6220, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2770:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6226, + "initialValue": { + "arguments": [ + { + "id": 6223, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2803:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6224, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2809:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6222, + "name": "_withdrawVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6207, + "src": "2789:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) returns (bytes32)" + } + }, + "id": 6225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2789:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2770:55:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6228, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2855:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6229, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2861:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6230, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6211, + "src": "2871:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6231, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2883:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6227, + "name": "VoteWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4477, + "src": "2841:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2841:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6233, + "nodeType": "EmitStatement", + "src": "2836:63:38" + } + ] + }, + "id": 6235, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawCastedVote", + "nameLocation": "2633:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6209, + "mutability": "mutable", + "name": "user", + "nameLocation": "2661:4:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2653:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6211, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2672:10:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2667:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2667:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2652:31:38" + }, + "returnParameters": { + "id": 6213, + "nodeType": "ParameterList", + "parameters": [], + "src": "2701:0:38" + }, + "scope": 6279, + "src": "2624:282:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6267, + "nodeType": "Block", + "src": "2997:233:38", + "statements": [ + { + "assignments": [ + 6244 + ], + "declarations": [ + { + "constant": false, + "id": 6244, + "mutability": "mutable", + "name": "election", + "nameLocation": "3028:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3007:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6242, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3007:12:38" + }, + "referencedDeclaration": 4299, + "src": "3007:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6247, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6245, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "3039:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3007:53:38" + }, + { + "assignments": [ + 6249 + ], + "declarations": [ + { + "constant": false, + "id": 6249, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "3079:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3071:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6248, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3071:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6254, + "initialValue": { + "baseExpression": { + "expression": { + "id": 6250, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6244, + "src": "3090:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6251, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "3090:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6253, + "indexExpression": { + "id": 6252, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3118:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3090:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3071:52:38" + }, + { + "assignments": [ + 6257 + ], + "declarations": [ + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "3152:6:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3133:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6256, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6255, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "3133:10:38" + }, + "referencedDeclaration": 4309, + "src": "3133:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6261, + "initialValue": { + "arguments": [ + { + "id": 6259, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6249, + "src": "3172:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6258, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "3161:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3133:48:38" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6262, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "3199:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "3199:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6265, + "indexExpression": { + "id": 6264, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3218:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3199:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6241, + "id": 6266, + "nodeType": "Return", + "src": "3192:31:38" + } + ] + }, + "id": 6268, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCastedVotePower", + "nameLocation": "2921:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6237, + "mutability": "mutable", + "name": "user", + "nameLocation": "2949:4:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2941:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6236, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2941:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2940:14:38" + }, + "returnParameters": { + "id": 6241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6240, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2986:9:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2981:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2981:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2980:16:38" + }, + "scope": 6279, + "src": "2912:318:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6277, + "nodeType": "Block", + "src": "3305:25:38", + "statements": [ + { + "expression": { + "hexValue": "31", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3322:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 6274, + "id": 6276, + "nodeType": "Return", + "src": "3315:8:38" + } + ] + }, + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "3245:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6270, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3259:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3258:9:38" + }, + "returnParameters": { + "id": 6274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3299:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3299:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3298:6:38" + }, + "scope": 6279, + "src": "3236:94:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6280, + "src": "447:2885:38", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3302:38" + } + }, + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * Solmate - https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol\n*/\n\nlibrary MathUtil {\n function sqrt(uint256 x) internal pure returns (uint256 z) {\n assembly {\n // Start off with z at 1.\n z := 1\n\n // Used below to help find a nearby power of 2.\n let y := x\n\n // Find the lowest power of 2 that is at least sqrt(x).\n if iszero(lt(y, 0x100000000000000000000000000000000)) {\n y := shr(128, y) // Like dividing by 2 ** 128.\n z := shl(64, z) // Like multiplying by 2 ** 64.\n }\n if iszero(lt(y, 0x10000000000000000)) {\n y := shr(64, y) // Like dividing by 2 ** 64.\n z := shl(32, z) // Like multiplying by 2 ** 32.\n }\n if iszero(lt(y, 0x100000000)) {\n y := shr(32, y) // Like dividing by 2 ** 32.\n z := shl(16, z) // Like multiplying by 2 ** 16.\n }\n if iszero(lt(y, 0x10000)) {\n y := shr(16, y) // Like dividing by 2 ** 16.\n z := shl(8, z) // Like multiplying by 2 ** 8.\n }\n if iszero(lt(y, 0x100)) {\n y := shr(8, y) // Like dividing by 2 ** 8.\n z := shl(4, z) // Like multiplying by 2 ** 4.\n }\n if iszero(lt(y, 0x10)) {\n y := shr(4, y) // Like dividing by 2 ** 4.\n z := shl(2, z) // Like multiplying by 2 ** 2.\n }\n if iszero(lt(y, 0x8)) {\n // Equivalent to 2 ** z.\n z := shl(1, z)\n }\n\n // Shifting right by 1 is like dividing by 2.\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n\n // Compute a rounded down version of z.\n let zRoundDown := div(x, z)\n\n // If zRoundDown is smaller, use it.\n if lt(zRoundDown, z) {\n z := zRoundDown\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "exportedSymbols": { + "MathUtil": [ + 1708 + ] + }, + "id": 1709, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1698, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:22" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MathUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1708, + "linearizedBaseContracts": [ + 1708 + ], + "name": "MathUtil", + "nameLocation": "200:8:22", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1706, + "nodeType": "Block", + "src": "274:2057:22", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "293:2032:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "345:6:22", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "350:1:22", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "345:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "425:10:22", + "value": { + "name": "x", + "nodeType": "YulIdentifier", + "src": "434:1:22" + }, + "variables": [ + { + "name": "y", + "nodeType": "YulTypedName", + "src": "429:1:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "571:142:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "589:16:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "598:3:22", + "type": "", + "value": "128" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "603:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "594:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "594:11:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "589:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "652:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "661:2:22", + "type": "", + "value": "64" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "665:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "657:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "657:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "652:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "530:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "533:35:22", + "type": "", + "value": "0x100000000000000000000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "527:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "527:42:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "520:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "520:50:22" + }, + "nodeType": "YulIf", + "src": "517:196:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "764:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "782:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "791:2:22", + "type": "", + "value": "64" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "795:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "787:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "787:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "782:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "843:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "852:2:22", + "type": "", + "value": "32" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "856:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "848:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "848:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "843:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "739:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "742:19:22", + "type": "", + "value": "0x10000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "736:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "736:26:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "729:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "729:34:22" + }, + "nodeType": "YulIf", + "src": "726:178:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "947:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "965:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "974:2:22", + "type": "", + "value": "32" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "978:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "970:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "970:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "965:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1026:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1035:2:22", + "type": "", + "value": "16" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1039:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1031:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1031:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1026:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "930:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "933:11:22", + "type": "", + "value": "0x100000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "927:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "927:18:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "920:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "920:26:22" + }, + "nodeType": "YulIf", + "src": "917:170:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1126:138:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1144:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1153:2:22", + "type": "", + "value": "16" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1157:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1149:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1149:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1144:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1205:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1214:1:22", + "type": "", + "value": "8" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1217:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1210:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1210:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1205:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1113:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1116:7:22", + "type": "", + "value": "0x10000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1110:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1110:14:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1103:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1103:22:22" + }, + "nodeType": "YulIf", + "src": "1100:164:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1301:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1319:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1328:1:22", + "type": "", + "value": "8" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1331:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1324:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1324:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1319:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1378:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1387:1:22", + "type": "", + "value": "4" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1390:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1383:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1383:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1378:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1290:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1293:5:22", + "type": "", + "value": "0x100" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1287:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1287:12:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1280:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1280:20:22" + }, + "nodeType": "YulIf", + "src": "1277:160:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1473:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1491:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1500:1:22", + "type": "", + "value": "4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1503:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1496:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1496:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1491:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1550:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1559:1:22", + "type": "", + "value": "2" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1562:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1555:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1555:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1550:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1463:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1466:4:22", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1460:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1460:11:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1453:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1453:19:22" + }, + "nodeType": "YulIf", + "src": "1450:159:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1644:87:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1703:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1712:1:22", + "type": "", + "value": "1" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1715:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1708:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1708:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1703:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1635:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1638:3:22", + "type": "", + "value": "0x8" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1632:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1632:10:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1625:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1625:18:22" + }, + "nodeType": "YulIf", + "src": "1622:109:22" + }, + { + "nodeType": "YulAssignment", + "src": "1803:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1812:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1819:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1826:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1829:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1822:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1822:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1815:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1815:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1808:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1808:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1803:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1846:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1855:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1862:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1869:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1872:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1865:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1865:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1858:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1858:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1851:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1851:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1846:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1889:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1898:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1905:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1912:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1915:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1908:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1908:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1901:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1901:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1894:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1894:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1889:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1932:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1941:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1948:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1955:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1958:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1951:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1951:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1944:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1944:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1937:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1937:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1932:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1975:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1984:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1991:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1998:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2001:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1994:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1994:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1987:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1987:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1980:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1980:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1975:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2018:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2027:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2034:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2041:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2044:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2037:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2037:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2030:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2030:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2023:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2023:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2018:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2061:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2070:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2077:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2084:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2087:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2080:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2080:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2073:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2073:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2066:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2066:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2061:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2157:27:22", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2179:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2182:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2175:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2175:9:22" + }, + "variables": [ + { + "name": "zRoundDown", + "nodeType": "YulTypedName", + "src": "2161:10:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2268:47:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2286:15:22", + "value": { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2291:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2286:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2253:10:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2265:1:22" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2250:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "2250:17:22" + }, + "nodeType": "YulIf", + "src": "2247:68:22" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1826:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1869:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1912:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1955:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1998:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2041:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2084:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2179:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "434:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1026:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1039:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1205:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1217:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1378:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1390:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1550:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1562:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1703:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1715:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1803:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1819:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1829:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1846:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1862:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1872:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1889:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1905:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1915:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1932:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1948:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1958:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1975:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1991:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2001:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2018:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2034:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2044:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2061:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2077:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2087:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2182:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2265:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2286:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "345:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "652:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "665:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "843:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "856:1:22", + "valueSize": 1 + } + ], + "id": 1705, + "nodeType": "InlineAssembly", + "src": "284:2041:22" + } + ] + }, + "id": 1707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "224:4:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1700, + "mutability": "mutable", + "name": "x", + "nameLocation": "237:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "229:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "229:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "228:11:22" + }, + "returnParameters": { + "id": 1704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1703, + "mutability": "mutable", + "name": "z", + "nameLocation": "271:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "263:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1702, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "263:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "262:11:22" + }, + "scope": 1708, + "src": "215:2116:22", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1709, + "src": "192:2141:22", + "usedErrors": [] + } + ], + "src": "31:2303:22" + } + }, + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IOwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is Ownable, IOwnerModule, InitializableMixin {\n function _isInitialized() internal view override returns (bool) {\n return _ownableStore().initialized;\n }\n\n function isOwnerModuleInitialized() external view override returns (bool) {\n return _isInitialized();\n }\n\n function initializeOwnerModule(address initialOwner) external override onlyIfNotInitialized {\n nominateNewOwner(initialOwner);\n acceptOwnership();\n\n _ownableStore().initialized = true;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "IOwnerModule": [ + 2791 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "OwnerModule": [ + 4196 + ] + }, + "id": 4197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4143, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:31" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 4144, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 415, + "src": "56:69:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 4145, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 69, + "src": "126:84:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "file": "../interfaces/IOwnerModule.sol", + "id": 4146, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 2792, + "src": "211:40:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4147, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "322:7:31" + }, + "id": 4148, + "nodeType": "InheritanceSpecifier", + "src": "322:7:31" + }, + { + "baseName": { + "id": 4149, + "name": "IOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2791, + "src": "331:12:31" + }, + "id": 4150, + "nodeType": "InheritanceSpecifier", + "src": "331:12:31" + }, + { + "baseName": { + "id": 4151, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "345:18:31" + }, + "id": 4152, + "nodeType": "InheritanceSpecifier", + "src": "345:18:31" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4196, + "linearizedBaseContracts": [ + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "307:11:31", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 4162, + "nodeType": "Block", + "src": "434:51:31", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4158, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "451:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "451:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4157, + "id": 4161, + "nodeType": "Return", + "src": "444:34:31" + } + ] + }, + "id": 4163, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "379:14:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4154, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:31" + }, + "parameters": { + "id": 4153, + "nodeType": "ParameterList", + "parameters": [], + "src": "393:2:31" + }, + "returnParameters": { + "id": 4157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4156, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4163, + "src": "428:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "428:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "427:6:31" + }, + "scope": 4196, + "src": "370:115:31", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2790 + ], + "body": { + "id": 4172, + "nodeType": "Block", + "src": "565:40:31", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4169, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4163 + ], + "referencedDeclaration": 4163, + "src": "582:14:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:16:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4168, + "id": 4171, + "nodeType": "Return", + "src": "575:23:31" + } + ] + }, + "functionSelector": "35eb2824", + "id": 4173, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "500:24:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4165, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "541:8:31" + }, + "parameters": { + "id": 4164, + "nodeType": "ParameterList", + "parameters": [], + "src": "524:2:31" + }, + "returnParameters": { + "id": 4168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4167, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4173, + "src": "559:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4166, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "559:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "558:6:31" + }, + "scope": 4196, + "src": "491:114:31", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2785 + ], + "body": { + "id": 4194, + "nodeType": "Block", + "src": "703:119:31", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4182, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4175, + "src": "730:12:31", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4181, + "name": "nominateNewOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "713:16:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "713:30:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4184, + "nodeType": "ExpressionStatement", + "src": "713:30:31" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4185, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "753:15:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "753:17:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4187, + "nodeType": "ExpressionStatement", + "src": "753:17:31" + }, + { + "expression": { + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4188, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "781:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "781:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4190, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "781:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 4191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "811:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "781:34:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4193, + "nodeType": "ExpressionStatement", + "src": "781:34:31" + } + ] + }, + "functionSelector": "624bd96d", + "id": 4195, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4179, + "kind": "modifierInvocation", + "modifierName": { + "id": 4178, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "682:20:31" + }, + "nodeType": "ModifierInvocation", + "src": "682:20:31" + } + ], + "name": "initializeOwnerModule", + "nameLocation": "620:21:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "673:8:31" + }, + "parameters": { + "id": 4176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4175, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "650:12:31", + "nodeType": "VariableDeclaration", + "scope": 4195, + "src": "642:20:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "642:7:31", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "641:22:31" + }, + "returnParameters": { + "id": 4180, + "nodeType": "ParameterList", + "parameters": [], + "src": "703:0:31" + }, + "scope": 4196, + "src": "611:211:31", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4197, + "src": "298:526:31", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:794:31" + } + }, + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../errors/InitError.sol\";\n\nabstract contract InitializableMixin {\n modifier onlyIfInitialized() {\n if (!_isInitialized()) {\n revert InitError.NotInitialized();\n }\n\n _;\n }\n\n modifier onlyIfNotInitialized() {\n if (_isInitialized()) {\n revert InitError.AlreadyInitialized();\n }\n\n _;\n }\n\n function _isInitialized() internal view virtual returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "exportedSymbols": { + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ] + }, + "id": 69, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 34, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:5" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 35, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 69, + "sourceUnit": 33, + "src": "56:33:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "InitializableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 68, + "linearizedBaseContracts": [ + 68 + ], + "name": "InitializableMixin", + "nameLocation": "109:18:5", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 48, + "nodeType": "Block", + "src": "163:109:5", + "statements": [ + { + "condition": { + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "177:17:5", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 37, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "178:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "178:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 46, + "nodeType": "IfStatement", + "src": "173:81:5", + "trueBody": { + "id": 45, + "nodeType": "Block", + "src": "196:58:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 40, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "217:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "217:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "217:26:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 44, + "nodeType": "RevertStatement", + "src": "210:33:5" + } + ] + } + }, + { + "id": 47, + "nodeType": "PlaceholderStatement", + "src": "264:1:5" + } + ] + }, + "id": 49, + "name": "onlyIfInitialized", + "nameLocation": "143:17:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 36, + "nodeType": "ParameterList", + "parameters": [], + "src": "160:2:5" + }, + "src": "134:138:5", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "310:112:5", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "324:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59, + "nodeType": "IfStatement", + "src": "320:84:5", + "trueBody": { + "id": 58, + "nodeType": "Block", + "src": "342:62:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 53, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "363:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "363:28:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "363:30:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 57, + "nodeType": "RevertStatement", + "src": "356:37:5" + } + ] + } + }, + { + "id": 60, + "nodeType": "PlaceholderStatement", + "src": "414:1:5" + } + ] + }, + "id": 62, + "name": "onlyIfNotInitialized", + "nameLocation": "287:20:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "307:2:5" + }, + "src": "278:144:5", + "virtual": false, + "visibility": "internal" + }, + { + "id": 67, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "437:14:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "451:2:5" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "485:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "485:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "484:6:5" + }, + "scope": 68, + "src": "428:63:5", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 69, + "src": "91:402:5", + "usedErrors": [] + } + ], + "src": "31:463:5" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnerModule {\n function initializeOwnerModule(address initialOwner) external;\n\n function isOwnerModuleInitialized() external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "exportedSymbols": { + "IOwnerModule": [ + 2791 + ] + }, + "id": 2792, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2780, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:28" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnerModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2791, + "linearizedBaseContracts": [ + 2791 + ], + "name": "IOwnerModule", + "nameLocation": "66:12:28", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "624bd96d", + "id": 2785, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeOwnerModule", + "nameLocation": "94:21:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2783, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2782, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "124:12:28", + "nodeType": "VariableDeclaration", + "scope": 2785, + "src": "116:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "116:7:28", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "115:22:28" + }, + "returnParameters": { + "id": 2784, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:28" + }, + "scope": 2791, + "src": "85:62:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "35eb2824", + "id": 2790, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "162:24:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "186:2:28" + }, + "returnParameters": { + "id": 2789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2790, + "src": "212:4:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2787, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "212:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "211:6:28" + }, + "scope": 2791, + "src": "153:65:28", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2792, + "src": "56:164:28", + "usedErrors": [] + } + ], + "src": "31:190:28" + } + }, + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\n\ncontract UpgradeModule is UUPSImplementation, OwnableMixin {\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ], + "UpgradeModule": [ + 4218 + ] + }, + "id": 4219, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:32" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 4199, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 757, + "src": "56:76:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 4200, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 477, + "src": "133:74:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4201, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "235:18:32" + }, + "id": 4202, + "nodeType": "InheritanceSpecifier", + "src": "235:18:32" + }, + { + "baseName": { + "id": 4203, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "255:12:32" + }, + "id": 4204, + "nodeType": "InheritanceSpecifier", + "src": "255:12:32" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4218, + "linearizedBaseContracts": [ + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "218:13:32", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 4216, + "nodeType": "Block", + "src": "346:46:32", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4213, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "367:17:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4212, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "356:10:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "356:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "356:29:32" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 4217, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4210, + "kind": "modifierInvocation", + "modifierName": { + "id": 4209, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "336:9:32" + }, + "nodeType": "ModifierInvocation", + "src": "336:9:32" + } + ], + "name": "upgradeTo", + "nameLocation": "283:9:32", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "327:8:32" + }, + "parameters": { + "id": 4207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4206, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "301:17:32", + "nodeType": "VariableDeclaration", + "scope": 4217, + "src": "293:25:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "293:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "292:27:32" + }, + "returnParameters": { + "id": 4211, + "nodeType": "ParameterList", + "parameters": [], + "src": "346:0:32" + }, + "scope": 4218, + "src": "274:118:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 4219, + "src": "209:185:32", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:364:32" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IElectionModule.sol\";\nimport \"../submodules/election/ElectionSchedule.sol\";\nimport \"../submodules/election/ElectionCredentials.sol\";\nimport \"../submodules/election/ElectionVotes.sol\";\nimport \"../submodules/election/ElectionTally.sol\";\n\ncontract ElectionModule is\n IElectionModule,\n ElectionSchedule,\n ElectionCredentials,\n ElectionVotes,\n ElectionTally,\n OwnableMixin,\n InitializableMixin\n{\n using SetUtil for SetUtil.AddressSet;\n\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external virtual override onlyOwner onlyIfNotInitialized {\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n function _initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n ElectionStore storage store = _electionStore();\n\n uint8 seatCount = uint8(firstCouncil.length);\n if (minimumActiveMembers == 0 || minimumActiveMembers > seatCount) {\n revert InvalidMinimumActiveMembers();\n }\n\n ElectionSettings storage settings = _electionSettings();\n settings.minNominationPeriodDuration = 2 days;\n settings.minVotingPeriodDuration = 2 days;\n settings.minEpochDuration = 7 days;\n settings.maxDateAdjustmentTolerance = 7 days;\n settings.nextEpochSeatCount = uint8(firstCouncil.length);\n settings.minimumActiveMembers = minimumActiveMembers;\n settings.defaultBallotEvaluationBatchSize = 500;\n\n _createNewEpoch();\n\n EpochData storage firstEpoch = _getEpochAtIndex(0);\n uint64 epochStartDate = uint64(block.timestamp);\n _configureEpochSchedule(firstEpoch, epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n _createCouncilToken(councilTokenName, councilTokenSymbol);\n _addCouncilMembers(firstCouncil, 0);\n\n store.initialized = true;\n\n emit ElectionModuleInitialized();\n emit EpochStarted(0);\n }\n\n function isElectionModuleInitialized() public view override returns (bool) {\n return _isInitialized();\n }\n\n function _isInitialized() internal view override returns (bool) {\n return _electionStore().initialized;\n }\n\n function upgradeCouncilToken(address newCouncilTokenImplementation) external override onlyOwner onlyIfInitialized {\n CouncilToken(_electionStore().councilToken).upgradeTo(newCouncilTokenImplementation);\n\n emit CouncilTokenUpgraded(newCouncilTokenImplementation);\n }\n\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n true /*ensureChangesAreSmall = true*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n false /*!ensureChangesAreSmall = false*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external override onlyOwner {\n _setMinEpochDurations(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n\n emit MinimumEpochDurationsChanged(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n }\n\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external override onlyOwner {\n if (newMaxDateAdjustmentTolerance == 0) revert InvalidElectionSettings();\n\n _electionSettings().maxDateAdjustmentTolerance = newMaxDateAdjustmentTolerance;\n\n emit MaxDateAdjustmentToleranceChanged(newMaxDateAdjustmentTolerance);\n }\n\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external override onlyOwner {\n if (newDefaultBallotEvaluationBatchSize == 0) revert InvalidElectionSettings();\n\n _electionSettings().defaultBallotEvaluationBatchSize = newDefaultBallotEvaluationBatchSize;\n\n emit DefaultBallotEvaluationBatchSizeChanged(newDefaultBallotEvaluationBatchSize);\n }\n\n function setNextEpochSeatCount(uint8 newSeatCount)\n external\n override\n onlyOwner\n onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination)\n {\n if (newSeatCount == 0) revert InvalidElectionSettings();\n\n _electionSettings().nextEpochSeatCount = newSeatCount;\n\n emit NextEpochSeatCountChanged(newSeatCount);\n }\n\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external override onlyOwner {\n if (newMinimumActiveMembers == 0) revert InvalidMinimumActiveMembers();\n\n _electionSettings().minimumActiveMembers = newMinimumActiveMembers;\n\n emit MinimumActiveMembersChanged(newMinimumActiveMembers);\n }\n\n function dismissMembers(address[] calldata membersToDismiss) external override onlyOwner {\n uint epochIndex = _getCurrentEpochIndex();\n\n _removeCouncilMembers(membersToDismiss, epochIndex);\n\n emit CouncilMembersDismissed(membersToDismiss, epochIndex);\n\n // Don't immediately jump to an election if the council still has enough members\n if (_getCurrentPeriod() != ElectionPeriod.Administration) return;\n if (_electionStore().councilMembers.length() >= _electionSettings().minimumActiveMembers) return;\n\n _jumpToNominationPeriod();\n\n emit EmergencyElectionStarted(epochIndex);\n }\n\n function nominate() public virtual override onlyInPeriods(ElectionPeriod.Nomination, ElectionPeriod.Vote) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (nominees.contains(msg.sender)) revert AlreadyNominated();\n\n nominees.add(msg.sender);\n\n emit CandidateNominated(msg.sender, _getCurrentEpochIndex());\n }\n\n function withdrawNomination() external override onlyInPeriod(ElectionPeriod.Nomination) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (!nominees.contains(msg.sender)) revert NotNominated();\n\n nominees.remove(msg.sender);\n\n emit NominationWithdrawn(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionVotes needs to be extended to specify what determines voting power\n function cast(address[] calldata candidates) public virtual override onlyInPeriod(ElectionPeriod.Vote) {\n _cast(msg.sender, candidates);\n }\n\n function _cast(address user, address[] calldata candidates) internal virtual {\n uint votePower = _getVotePower(user);\n\n if (votePower == 0) revert NoVotePower();\n\n _validateCandidates(candidates);\n\n bytes32 ballotId;\n\n uint epochIndex = _getCurrentEpochIndex();\n\n if (hasVoted(user)) {\n _withdrawCastedVote(user, epochIndex);\n }\n\n ballotId = _recordVote(user, votePower, candidates);\n\n emit VoteRecorded(user, ballotId, epochIndex, votePower);\n }\n\n function withdrawVote() external override onlyInPeriod(ElectionPeriod.Vote) {\n if (!hasVoted(msg.sender)) {\n revert VoteNotCasted();\n }\n\n _withdrawCastedVote(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionTally needs to be extended to specify how votes are counted\n function evaluate(uint numBallots) external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (election.evaluated) revert ElectionAlreadyEvaluated();\n\n _evaluateNextBallotBatch(numBallots);\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n\n uint totalBallots = election.ballotIds.length;\n if (election.numEvaluatedBallots < totalBallots) {\n emit ElectionBatchEvaluated(currentEpochIndex, election.numEvaluatedBallots, totalBallots);\n } else {\n election.evaluated = true;\n\n emit ElectionEvaluated(currentEpochIndex, totalBallots);\n }\n }\n\n /// @dev Burns previous NFTs and mints new ones\n function resolve() external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (!election.evaluated) revert ElectionNotEvaluated();\n\n uint newEpochIndex = _getCurrentEpochIndex() + 1;\n\n _removeAllCouncilMembers(newEpochIndex);\n _addCouncilMembers(election.winners.values(), newEpochIndex);\n\n election.resolved = true;\n\n _createNewEpoch();\n _copyScheduleFromPreviousEpoch();\n\n emit EpochStarted(newEpochIndex);\n }\n\n function getMinEpochDurations()\n external\n view\n override\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n )\n {\n ElectionSettings storage settings = _electionSettings();\n\n return (settings.minNominationPeriodDuration, settings.minVotingPeriodDuration, settings.minEpochDuration);\n }\n\n function getMaxDateAdjustmentTolerance() external view override returns (uint64) {\n return _electionSettings().maxDateAdjustmentTolerance;\n }\n\n function getDefaultBallotEvaluationBatchSize() external view override returns (uint) {\n return _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n function getNextEpochSeatCount() external view override returns (uint8) {\n return _electionSettings().nextEpochSeatCount;\n }\n\n function getMinimumActiveMembers() external view override returns (uint8) {\n return _electionSettings().minimumActiveMembers;\n }\n\n function getEpochIndex() external view override returns (uint) {\n return _getCurrentEpochIndex();\n }\n\n function getEpochStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().startDate;\n }\n\n function getEpochEndDate() external view override returns (uint64) {\n return _getCurrentEpoch().endDate;\n }\n\n function getNominationPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().votingPeriodStartDate;\n }\n\n function getCurrentPeriod() external view override returns (uint) {\n return uint(_getCurrentPeriod());\n }\n\n function isNominated(address candidate) external view override returns (bool) {\n return _getCurrentElection().nominees.contains(candidate);\n }\n\n function getNominees() external view override returns (address[] memory) {\n return _getCurrentElection().nominees.values();\n }\n\n function calculateBallotId(address[] calldata candidates) external pure override returns (bytes32) {\n return _calculateBallotId(candidates);\n }\n\n function getBallotVoted(address user) public view override returns (bytes32) {\n return _getBallotVoted(user);\n }\n\n function hasVoted(address user) public view override returns (bool) {\n return _getBallotVoted(user) != bytes32(0);\n }\n\n function getVotePower(address user) external view override returns (uint) {\n return _getVotePower(user);\n }\n\n function getBallotVotes(bytes32 ballotId) external view override returns (uint) {\n return _getBallot(ballotId).votes;\n }\n\n function getBallotCandidates(bytes32 ballotId) external view override returns (address[] memory) {\n return _getBallot(ballotId).candidates;\n }\n\n function isElectionEvaluated() public view override returns (bool) {\n return _getCurrentElection().evaluated;\n }\n\n function getCandidateVotes(address candidate) external view override returns (uint) {\n return _getCurrentElection().candidateVotes[candidate];\n }\n\n function getElectionWinners() external view override returns (address[] memory) {\n return _getCurrentElection().winners.values();\n }\n\n function getCouncilToken() public view override returns (address) {\n return _electionStore().councilToken;\n }\n\n function getCouncilMembers() external view override returns (address[] memory) {\n return _electionStore().councilMembers.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionModule": [ + 4141 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "ElectionVotes": [ + 6279 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IElectionModule": [ + 2778 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "MathUtil": [ + 1708 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 4142, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3007, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:30" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 3008, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 33, + "src": "56:68:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 3009, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 477, + "src": "125:74:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 3010, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 69, + "src": "200:84:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "../interfaces/IElectionModule.sol", + "id": 3011, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 2779, + "src": "285:43:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "file": "../submodules/election/ElectionSchedule.sol", + "id": 3012, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5631, + "src": "329:53:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "file": "../submodules/election/ElectionCredentials.sol", + "id": 3013, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5066, + "src": "383:56:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "file": "../submodules/election/ElectionVotes.sol", + "id": 3014, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 6280, + "src": "440:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "file": "../submodules/election/ElectionTally.sol", + "id": 3015, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5962, + "src": "491:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 3016, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "574:15:30" + }, + "id": 3017, + "nodeType": "InheritanceSpecifier", + "src": "574:15:30" + }, + { + "baseName": { + "id": 3018, + "name": "ElectionSchedule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5630, + "src": "595:16:30" + }, + "id": 3019, + "nodeType": "InheritanceSpecifier", + "src": "595:16:30" + }, + { + "baseName": { + "id": 3020, + "name": "ElectionCredentials", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5065, + "src": "617:19:30" + }, + "id": 3021, + "nodeType": "InheritanceSpecifier", + "src": "617:19:30" + }, + { + "baseName": { + "id": 3022, + "name": "ElectionVotes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6279, + "src": "642:13:30" + }, + "id": 3023, + "nodeType": "InheritanceSpecifier", + "src": "642:13:30" + }, + { + "baseName": { + "id": 3024, + "name": "ElectionTally", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5961, + "src": "661:13:30" + }, + "id": 3025, + "nodeType": "InheritanceSpecifier", + "src": "661:13:30" + }, + { + "baseName": { + "id": 3026, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "680:12:30" + }, + "id": 3027, + "nodeType": "InheritanceSpecifier", + "src": "680:12:30" + }, + { + "baseName": { + "id": 3028, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "698:18:30" + }, + "id": 3029, + "nodeType": "InheritanceSpecifier", + "src": "698:18:30" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 6379 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4141, + "linearizedBaseContracts": [ + 4141, + 68, + 476, + 494, + 5961, + 6279, + 5065, + 5630, + 4683, + 4331, + 2778 + ], + "name": "ElectionModule", + "nameLocation": "552:14:30", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3033, + "libraryName": { + "id": 3030, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "729:7:30" + }, + "nodeType": "UsingForDirective", + "src": "723:37:30", + "typeName": { + "id": 3032, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3031, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "741:18:30" + }, + "referencedDeclaration": 1788, + "src": "741:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2506 + ], + "body": { + "id": 3066, + "nodeType": "Block", + "src": "1129:274:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3057, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3035, + "src": "1178:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3058, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "1208:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3059, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3040, + "src": "1240:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3060, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3042, + "src": "1266:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3061, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3044, + "src": "1300:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3062, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "1339:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3063, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "1374:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3056, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "1139:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 3064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1139:257:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3065, + "nodeType": "ExpressionStatement", + "src": "1139:257:30" + } + ] + }, + "functionSelector": "ee695137", + "id": 3067, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3052, + "kind": "modifierInvocation", + "modifierName": { + "id": 3051, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1098:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "1098:9:30" + }, + { + "id": 3054, + "kind": "modifierInvocation", + "modifierName": { + "id": 3053, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1108:20:30" + }, + "nodeType": "ModifierInvocation", + "src": "1108:20:30" + } + ], + "name": "initializeElectionModule", + "nameLocation": "775:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1089:8:30" + }, + "parameters": { + "id": 3049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3035, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "823:16:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "809:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3034, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3037, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "863:18:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "849:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "849:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3040, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "908:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "891:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3039, + "nodeType": "ArrayTypeName", + "src": "891:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3042, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "936:20:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "930:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3041, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "930:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3044, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "973:25:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "966:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3043, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "966:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3046, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1015:21:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1008:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3045, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1008:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3048, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1053:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1046:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3047, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1046:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "799:272:30" + }, + "returnParameters": { + "id": 3055, + "nodeType": "ParameterList", + "parameters": [], + "src": "1129:0:30" + }, + "scope": 4141, + "src": "766:637:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 3212, + "nodeType": "Block", + "src": "1725:1202:30", + "statements": [ + { + "assignments": [ + 3087 + ], + "declarations": [ + { + "constant": false, + "id": 3087, + "mutability": "mutable", + "name": "store", + "nameLocation": "1757:5:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1735:27:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 3086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3085, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "1735:13:30" + }, + "referencedDeclaration": 4246, + "src": "1735:13:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 3090, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3088, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1765:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1765:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1735:46:30" + }, + { + "assignments": [ + 3092 + ], + "declarations": [ + { + "constant": false, + "id": 3092, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "1798:9:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1792:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3091, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1792:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3098, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3095, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "1816:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1816:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1810:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3093, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1810:5:30", + "typeDescriptions": {} + } + }, + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1810:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1792:44:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3099, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1850:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1874:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1850:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3102, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1879:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3103, + "name": "seatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3092, + "src": "1902:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1879:32:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1850:61:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3110, + "nodeType": "IfStatement", + "src": "1846:128:30", + "trueBody": { + "id": 3109, + "nodeType": "Block", + "src": "1913:61:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3106, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "1934:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3108, + "nodeType": "RevertStatement", + "src": "1927:36:30" + } + ] + } + }, + { + "assignments": [ + 3113 + ], + "declarations": [ + { + "constant": false, + "id": 3113, + "mutability": "mutable", + "name": "settings", + "nameLocation": "2009:8:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1984:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3112, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3111, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1984:16:30" + }, + "referencedDeclaration": 4261, + "src": "1984:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3116, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3114, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "2020:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2020:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1984:55:30" + }, + { + "expression": { + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3117, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2049:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "2049:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2088:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2049:45:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3122, + "nodeType": "ExpressionStatement", + "src": "2049:45:30" + }, + { + "expression": { + "id": 3127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3123, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2104:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3125, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "2104:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2139:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2104:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3128, + "nodeType": "ExpressionStatement", + "src": "2104:41:30" + }, + { + "expression": { + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3129, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2155:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "2155:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2183:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2155:34:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3134, + "nodeType": "ExpressionStatement", + "src": "2155:34:30" + }, + { + "expression": { + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3135, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2199:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "2199:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2237:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2199:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3140, + "nodeType": "ExpressionStatement", + "src": "2199:44:30" + }, + { + "expression": { + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3141, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2253:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "2253:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3146, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2289:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2289:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2283:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3144, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2283:5:30", + "typeDescriptions": {} + } + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2283:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2253:56:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3150, + "nodeType": "ExpressionStatement", + "src": "2253:56:30" + }, + { + "expression": { + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3151, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2319:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "2319:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3154, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "2351:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2319:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3156, + "nodeType": "ExpressionStatement", + "src": "2319:52:30" + }, + { + "expression": { + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3157, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2381:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3159, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "2381:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "353030", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2425:3:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_500_by_1", + "typeString": "int_const 500" + }, + "value": "500" + }, + "src": "2381:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "2381:47:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3163, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "2439:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2439:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "2439:17:30" + }, + { + "assignments": [ + 3168 + ], + "declarations": [ + { + "constant": false, + "id": 3168, + "mutability": "mutable", + "name": "firstEpoch", + "nameLocation": "2485:10:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2467:28:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 3167, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3166, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "2467:9:30" + }, + "referencedDeclaration": 4270, + "src": "2467:9:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 3172, + "initialValue": { + "arguments": [ + { + "hexValue": "30", + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2515:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3169, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "2498:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2498:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2467:50:30" + }, + { + "assignments": [ + 3174 + ], + "declarations": [ + { + "constant": false, + "id": 3174, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2534:14:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2527:21:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3173, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2527:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 3180, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3177, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2558:5:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2558:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2551:6:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 3175, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2551:6:30", + "typeDescriptions": {} + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2527:47:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3182, + "name": "firstEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3168, + "src": "2608:10:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3183, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3174, + "src": "2620:14:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3184, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "2636:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3185, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3080, + "src": "2663:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3186, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "2686:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3181, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "2584:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2584:115:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "2584:115:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3190, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "2730:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3191, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "2748:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3189, + "name": "_createCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2710:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2710:57:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3193, + "nodeType": "ExpressionStatement", + "src": "2710:57:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3195, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2796:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "hexValue": "30", + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3194, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "2777:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2777:35:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3198, + "nodeType": "ExpressionStatement", + "src": "2777:35:30" + }, + { + "expression": { + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3199, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "2823:5:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "2823:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2843:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2823:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "2823:24:30" + }, + { + "eventCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3205, + "name": "ElectionModuleInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4380, + "src": "2863:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2863:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3207, + "nodeType": "EmitStatement", + "src": "2858:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "30", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2918:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3208, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2905:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3211, + "nodeType": "EmitStatement", + "src": "2900:20:30" + } + ] + }, + "id": 3213, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initializeElectionModule", + "nameLocation": "1418:25:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3069, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1467:16:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1453:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1453:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3071, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1507:18:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1493:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3070, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1493:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "1552:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1535:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1535:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3073, + "nodeType": "ArrayTypeName", + "src": "1535:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3076, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1580:20:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1574:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3075, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1574:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3078, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1617:25:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1610:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3077, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1610:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3080, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1659:21:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1652:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3079, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1652:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1697:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1690:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3081, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1690:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1443:272:30" + }, + "returnParameters": { + "id": 3084, + "nodeType": "ParameterList", + "parameters": [], + "src": "1725:0:30" + }, + "scope": 4141, + "src": "1409:1518:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2512 + ], + "body": { + "id": 3222, + "nodeType": "Block", + "src": "3008:40:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3219, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3234 + ], + "referencedDeclaration": 3234, + "src": "3025:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3025:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3218, + "id": 3221, + "nodeType": "Return", + "src": "3018:23:30" + } + ] + }, + "functionSelector": "c5798523", + "id": 3223, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "2942:27:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3215, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2984:8:30" + }, + "parameters": { + "id": 3214, + "nodeType": "ParameterList", + "parameters": [], + "src": "2969:2:30" + }, + "returnParameters": { + "id": 3218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3223, + "src": "3002:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3216, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3002:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3001:6:30" + }, + "scope": 4141, + "src": "2933:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 3233, + "nodeType": "Block", + "src": "3118:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3229, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3135:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3135:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "3135:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3228, + "id": 3232, + "nodeType": "Return", + "src": "3128:35:30" + } + ] + }, + "id": 3234, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "3063:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3225, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3094:8:30" + }, + "parameters": { + "id": 3224, + "nodeType": "ParameterList", + "parameters": [], + "src": "3077:2:30" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3234, + "src": "3112:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3226, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3112:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3111:6:30" + }, + "scope": 4141, + "src": "3054:116:30", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2518 + ], + "body": { + "id": 3257, + "nodeType": "Block", + "src": "3290:168:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3250, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3354:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3245, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3313:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3247, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3313:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3244, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3300:12:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:43:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6321, + "src": "3300:53:30", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:84:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3252, + "nodeType": "ExpressionStatement", + "src": "3300:84:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3254, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3421:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3253, + "name": "CouncilTokenUpgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "3400:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3256, + "nodeType": "EmitStatement", + "src": "3395:56:30" + } + ] + }, + "functionSelector": "54520478", + "id": 3258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3240, + "kind": "modifierInvocation", + "modifierName": { + "id": 3239, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3262:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3262:9:30" + }, + { + "id": 3242, + "kind": "modifierInvocation", + "modifierName": { + "id": 3241, + "name": "onlyIfInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 49, + "src": "3272:17:30" + }, + "nodeType": "ModifierInvocation", + "src": "3272:17:30" + } + ], + "name": "upgradeCouncilToken", + "nameLocation": "3185:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3238, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3253:8:30" + }, + "parameters": { + "id": 3237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3236, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "3213:29:30", + "nodeType": "VariableDeclaration", + "scope": 3258, + "src": "3205:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3204:39:30" + }, + "returnParameters": { + "id": 3243, + "nodeType": "ParameterList", + "parameters": [], + "src": "3290:0:30" + }, + "scope": 4141, + "src": "3176:282:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2528 + ], + "body": { + "id": 3291, + "nodeType": "Block", + "src": "3716:348:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3277, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "3760:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3760:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3279, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3792:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3280, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "3834:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3281, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "3872:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "74727565", + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3276, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3726:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3726:222:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3284, + "nodeType": "ExpressionStatement", + "src": "3726:222:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3286, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3985:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3287, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "4015:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3288, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "4041:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3285, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "3964:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3964:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3290, + "nodeType": "EmitStatement", + "src": "3959:98:30" + } + ] + }, + "functionSelector": "8f701997", + "id": 3292, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3268, + "kind": "modifierInvocation", + "modifierName": { + "id": 3267, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3634:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3634:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3270, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3658:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "3658:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3272, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "3689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3274, + "kind": "modifierInvocation", + "modifierName": { + "id": 3269, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "3644:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "3644:71:30" + } + ], + "name": "tweakEpochSchedule", + "nameLocation": "3473:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3266, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3625:8:30" + }, + "parameters": { + "id": 3265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3260, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3508:28:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3501:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3259, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3501:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3262, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3553:24:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3546:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3261, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3546:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3264, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3594:15:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3587:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3263, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3587:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3491:124:30" + }, + "returnParameters": { + "id": 3275, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:0:30" + }, + "scope": 4141, + "src": "3464:600:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2538 + ], + "body": { + "id": 3325, + "nodeType": "Block", + "src": "4323:351:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3311, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "4367:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4367:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3313, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4399:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3314, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4441:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3315, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4479:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "66616c7365", + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4508:5:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3310, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "4333:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4333:225:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3318, + "nodeType": "ExpressionStatement", + "src": "4333:225:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3320, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4595:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3321, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4625:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3322, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4651:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3319, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "4574:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4574:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3324, + "nodeType": "EmitStatement", + "src": "4569:98:30" + } + ] + }, + "functionSelector": "c14d0528", + "id": 3326, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3302, + "kind": "modifierInvocation", + "modifierName": { + "id": 3301, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4241:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4241:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3304, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4265:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "4265:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3306, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4296:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "4296:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3308, + "kind": "modifierInvocation", + "modifierName": { + "id": 3303, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "4251:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "4251:71:30" + } + ], + "name": "modifyEpochSchedule", + "nameLocation": "4079:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3300, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4232:8:30" + }, + "parameters": { + "id": 3299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3294, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "4115:28:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4108:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3293, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4108:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3296, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "4160:24:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4153:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3295, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4153:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3298, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "4201:15:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4194:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3297, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4194:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4098:124:30" + }, + "returnParameters": { + "id": 3309, + "nodeType": "ParameterList", + "parameters": [], + "src": "4323:0:30" + }, + "scope": 4141, + "src": "4070:604:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2548 + ], + "body": { + "id": 3350, + "nodeType": "Block", + "src": "4870:244:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3339, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "4902:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3340, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "4934:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3341, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "4962:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3338, + "name": "_setMinEpochDurations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5563, + "src": "4880:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4880:102:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3343, + "nodeType": "ExpressionStatement", + "src": "4880:102:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3345, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "5027:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3346, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "5059:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3347, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "5087:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3344, + "name": "MinimumEpochDurationsChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4429, + "src": "4998:28:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4998:109:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3349, + "nodeType": "EmitStatement", + "src": "4993:114:30" + } + ] + }, + "functionSelector": "a25a9f3a", + "id": 3351, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3336, + "kind": "modifierInvocation", + "modifierName": { + "id": 3335, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4860:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4860:9:30" + } + ], + "name": "setMinEpochDurations", + "nameLocation": "4689:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3334, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4851:8:30" + }, + "parameters": { + "id": 3333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3328, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "4726:30:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4719:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3327, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4719:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3330, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "4773:26:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4766:33:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3329, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4766:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3332, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "4816:19:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4809:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4709:132:30" + }, + "returnParameters": { + "id": 3337, + "nodeType": "ParameterList", + "parameters": [], + "src": "4870:0:30" + }, + "scope": 4141, + "src": "4680:434:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2554 + ], + "body": { + "id": 3376, + "nodeType": "Block", + "src": "5225:258:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3359, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5239:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5272:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5239:34:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3365, + "nodeType": "IfStatement", + "src": "5235:72:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3362, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5282:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5282:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3364, + "nodeType": "RevertStatement", + "src": "5275:32:30" + } + }, + { + "expression": { + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3366, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5318:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5318:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3368, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "5318:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3369, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5367:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5318:78:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3371, + "nodeType": "ExpressionStatement", + "src": "5318:78:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3373, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5446:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3372, + "name": "MaxDateAdjustmentToleranceChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4433, + "src": "5412:33:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$returns$__$", + "typeString": "function (uint64)" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:64:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3375, + "nodeType": "EmitStatement", + "src": "5407:69:30" + } + ] + }, + "functionSelector": "3ac1c5fe", + "id": 3377, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3357, + "kind": "modifierInvocation", + "modifierName": { + "id": 3356, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5215:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5215:9:30" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "5129:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3355, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5206:8:30" + }, + "parameters": { + "id": 3354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3353, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "5166:29:30", + "nodeType": "VariableDeclaration", + "scope": 3377, + "src": "5159:36:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3352, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5159:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5158:38:30" + }, + "returnParameters": { + "id": 3358, + "nodeType": "ParameterList", + "parameters": [], + "src": "5225:0:30" + }, + "scope": 4141, + "src": "5120:363:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2560 + ], + "body": { + "id": 3402, + "nodeType": "Block", + "src": "5604:288:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3385, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5618:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5657:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5618:40:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3391, + "nodeType": "IfStatement", + "src": "5614:78:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3388, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5667:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5667:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3390, + "nodeType": "RevertStatement", + "src": "5660:32:30" + } + }, + { + "expression": { + "id": 3396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3392, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5703:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "5703:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3395, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5758:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5703:90:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3397, + "nodeType": "ExpressionStatement", + "src": "5703:90:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3399, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5849:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3398, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4437, + "src": "5809:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5809:76:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3401, + "nodeType": "EmitStatement", + "src": "5804:81:30" + } + ] + }, + "functionSelector": "64deab73", + "id": 3403, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3383, + "kind": "modifierInvocation", + "modifierName": { + "id": 3382, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5594:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5594:9:30" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "5498:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3381, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5585:8:30" + }, + "parameters": { + "id": 3380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3379, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "5539:35:30", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "5534:40:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3378, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5534:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5533:42:30" + }, + "returnParameters": { + "id": 3384, + "nodeType": "ParameterList", + "parameters": [], + "src": "5604:0:30" + }, + "scope": 4141, + "src": "5489:403:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2566 + ], + "body": { + "id": 3434, + "nodeType": "Block", + "src": "6085:191:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3417, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6099:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6115:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6099:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3423, + "nodeType": "IfStatement", + "src": "6095:55:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3420, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "6125:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6125:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "RevertStatement", + "src": "6118:32:30" + } + }, + { + "expression": { + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3424, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6161:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6161:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "6161:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3427, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6202:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6161:53:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3429, + "nodeType": "ExpressionStatement", + "src": "6161:53:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3431, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6256:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3430, + "name": "NextEpochSeatCountChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4441, + "src": "6230:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6230:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3433, + "nodeType": "EmitStatement", + "src": "6225:44:30" + } + ] + }, + "functionSelector": "4b5dacac", + "id": 3435, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3409, + "kind": "modifierInvocation", + "modifierName": { + "id": 3408, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5991:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5991:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6023:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "6023:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3413, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6054:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "6054:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3415, + "kind": "modifierInvocation", + "modifierName": { + "id": 3410, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "6009:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "6009:71:30" + } + ], + "name": "setNextEpochSeatCount", + "nameLocation": "5907:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3407, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5974:8:30" + }, + "parameters": { + "id": 3406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3405, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "5935:12:30", + "nodeType": "VariableDeclaration", + "scope": 3435, + "src": "5929:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3404, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5929:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "5928:20:30" + }, + "returnParameters": { + "id": 3416, + "nodeType": "ParameterList", + "parameters": [], + "src": "6085:0:30" + }, + "scope": 4141, + "src": "5898:378:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2572 + ], + "body": { + "id": 3460, + "nodeType": "Block", + "src": "6374:232:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3443, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6388:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6415:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6388:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3449, + "nodeType": "IfStatement", + "src": "6384:70:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3446, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "6425:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6425:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3448, + "nodeType": "RevertStatement", + "src": "6418:36:30" + } + }, + { + "expression": { + "id": 3454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3450, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6465:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6465:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3452, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "6465:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3453, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6508:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6465:66:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3455, + "nodeType": "ExpressionStatement", + "src": "6465:66:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3457, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6575:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3456, + "name": "MinimumActiveMembersChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "6547:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:52:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3459, + "nodeType": "EmitStatement", + "src": "6542:57:30" + } + ] + }, + "functionSelector": "0438d06e", + "id": 3461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3441, + "kind": "modifierInvocation", + "modifierName": { + "id": 3440, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6364:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6364:9:30" + } + ], + "name": "setMinimumActiveMembers", + "nameLocation": "6291:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3439, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6355:8:30" + }, + "parameters": { + "id": 3438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3437, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "6321:23:30", + "nodeType": "VariableDeclaration", + "scope": 3461, + "src": "6315:29:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3436, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6315:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6314:31:30" + }, + "returnParameters": { + "id": 3442, + "nodeType": "ParameterList", + "parameters": [], + "src": "6374:0:30" + }, + "scope": 4141, + "src": "6282:324:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2579 + ], + "body": { + "id": 3510, + "nodeType": "Block", + "src": "6701:547:30", + "statements": [ + { + "assignments": [ + 3471 + ], + "declarations": [ + { + "constant": false, + "id": 3471, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "6716:10:30", + "nodeType": "VariableDeclaration", + "scope": 3510, + "src": "6711:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3470, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6711:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3474, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3472, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "6729:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6729:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6711:41:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3476, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6785:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3477, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6803:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3475, + "name": "_removeCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4900, + "src": "6763:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6763:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3479, + "nodeType": "ExpressionStatement", + "src": "6763:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3481, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6854:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3482, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6872:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3480, + "name": "CouncilMembersDismissed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4413, + "src": "6830:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6830:53:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3484, + "nodeType": "EmitStatement", + "src": "6825:58:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3485, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "6987:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6987:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 3487, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7010:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "7010:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "6987:52:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3491, + "nodeType": "IfStatement", + "src": "6983:65:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3490, + "nodeType": "Return", + "src": "7041:7:30" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3492, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "7061:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "7061:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "7061:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3497, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7105:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7105:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "7105:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "7061:84:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3502, + "nodeType": "IfStatement", + "src": "7057:97:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3501, + "nodeType": "Return", + "src": "7147:7:30" + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3503, + "name": "_jumpToNominationPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "7164:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7164:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3505, + "nodeType": "ExpressionStatement", + "src": "7164:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3507, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "7230:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3506, + "name": "EmergencyElectionStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4495, + "src": "7205:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7205:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3509, + "nodeType": "EmitStatement", + "src": "7200:41:30" + } + ] + }, + "functionSelector": "9a25eaf3", + "id": 3511, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3468, + "kind": "modifierInvocation", + "modifierName": { + "id": 3467, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6691:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6691:9:30" + } + ], + "name": "dismissMembers", + "nameLocation": "6621:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3466, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6682:8:30" + }, + "parameters": { + "id": 3465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3464, + "mutability": "mutable", + "name": "membersToDismiss", + "nameLocation": "6655:16:30", + "nodeType": "VariableDeclaration", + "scope": 3511, + "src": "6636:35:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3462, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6636:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3463, + "nodeType": "ArrayTypeName", + "src": "6636:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6635:37:30" + }, + "returnParameters": { + "id": 3469, + "nodeType": "ParameterList", + "parameters": [], + "src": "6701:0:30" + }, + "scope": 4141, + "src": "6612:636:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2583 + ], + "body": { + "id": 3553, + "nodeType": "Block", + "src": "7360:262:30", + "statements": [ + { + "assignments": [ + 3525 + ], + "declarations": [ + { + "constant": false, + "id": 3525, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7397:8:30", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "7370:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3524, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3523, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7370:18:30" + }, + "referencedDeclaration": 1788, + "src": "7370:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3529, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3526, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7408:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7408:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7408:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7370:68:30" + }, + { + "condition": { + "arguments": [ + { + "expression": { + "id": 3532, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7471:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7471:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3530, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7453:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7453:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7453:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3538, + "nodeType": "IfStatement", + "src": "7449:60:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3535, + "name": "AlreadyNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4348, + "src": "7491:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7491:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3537, + "nodeType": "RevertStatement", + "src": "7484:25:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7533:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7533:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3539, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7520:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "7520:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7520:24:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3545, + "nodeType": "ExpressionStatement", + "src": "7520:24:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3547, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7579:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7579:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3549, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7591:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7591:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3546, + "name": "CandidateNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4451, + "src": "7560:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7560:55:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3552, + "nodeType": "EmitStatement", + "src": "7555:60:30" + } + ] + }, + "functionSelector": "fcd7e1d7", + "id": 3554, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3515, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7312:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7312:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3517, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7339:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "7339:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3519, + "kind": "modifierInvocation", + "modifierName": { + "id": 3514, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "7298:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "7298:61:30" + } + ], + "name": "nominate", + "nameLocation": "7263:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3513, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7289:8:30" + }, + "parameters": { + "id": 3512, + "nodeType": "ParameterList", + "parameters": [], + "src": "7271:2:30" + }, + "returnParameters": { + "id": 3520, + "nodeType": "ParameterList", + "parameters": [], + "src": "7360:0:30" + }, + "scope": 4141, + "src": "7254:368:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 2587 + ], + "body": { + "id": 3595, + "nodeType": "Block", + "src": "7716:263:30", + "statements": [ + { + "assignments": [ + 3566 + ], + "declarations": [ + { + "constant": false, + "id": 3566, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7753:8:30", + "nodeType": "VariableDeclaration", + "scope": 3595, + "src": "7726:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3565, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3564, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7726:18:30" + }, + "referencedDeclaration": 1788, + "src": "7726:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3570, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3567, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7764:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7764:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7764:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7726:68:30" + }, + { + "condition": { + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7809:30:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7828:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7828:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3571, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7810:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7810:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7810:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3580, + "nodeType": "IfStatement", + "src": "7805:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3577, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "7848:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7848:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3579, + "nodeType": "RevertStatement", + "src": "7841:21:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3584, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7889:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7889:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3581, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7873:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "7873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7873:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3587, + "nodeType": "ExpressionStatement", + "src": "7873:27:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3589, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7936:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7936:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3591, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7948:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7948:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3588, + "name": "NominationWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "7916:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7916:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3594, + "nodeType": "EmitStatement", + "src": "7911:61:30" + } + ] + }, + "functionSelector": "d11801cf", + "id": 3596, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3558, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3560, + "kind": "modifierInvocation", + "modifierName": { + "id": 3557, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "7676:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "7676:39:30" + } + ], + "name": "withdrawNomination", + "nameLocation": "7637:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3556, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7667:8:30" + }, + "parameters": { + "id": 3555, + "nodeType": "ParameterList", + "parameters": [], + "src": "7655:2:30" + }, + "returnParameters": { + "id": 3561, + "nodeType": "ParameterList", + "parameters": [], + "src": "7716:0:30" + }, + "scope": 4141, + "src": "7628:351:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2594 + ], + "body": { + "id": 3614, + "nodeType": "Block", + "src": "8176:46:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3609, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8192:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8192:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3611, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3600, + "src": "8204:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3608, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3674, + "src": "8186:5:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 3612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8186:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3613, + "nodeType": "ExpressionStatement", + "src": "8186:29:30" + } + ] + }, + "documentation": { + "id": 3597, + "nodeType": "StructuredDocumentation", + "src": "7985:83:30", + "text": "@dev ElectionVotes needs to be extended to specify what determines voting power" + }, + "functionSelector": "84ae670c", + "id": 3615, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3604, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8155:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8155:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3606, + "kind": "modifierInvocation", + "modifierName": { + "id": 3603, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8142:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8142:33:30" + } + ], + "name": "cast", + "nameLocation": "8082:4:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3602, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8133:8:30" + }, + "parameters": { + "id": 3601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3600, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8106:10:30", + "nodeType": "VariableDeclaration", + "scope": 3615, + "src": "8087:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8087:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3599, + "nodeType": "ArrayTypeName", + "src": "8087:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8086:31:30" + }, + "returnParameters": { + "id": 3607, + "nodeType": "ParameterList", + "parameters": [], + "src": "8176:0:30" + }, + "scope": 4141, + "src": "8073:149:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 3673, + "nodeType": "Block", + "src": "8305:446:30", + "statements": [ + { + "assignments": [ + 3624 + ], + "declarations": [ + { + "constant": false, + "id": 3624, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8320:9:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8315:14:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3623, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8315:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3628, + "initialValue": { + "arguments": [ + { + "id": 3626, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8346:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3625, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "8332:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8332:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8315:36:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3629, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8366:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8379:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8366:14:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3635, + "nodeType": "IfStatement", + "src": "8362:40:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3632, + "name": "NoVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "8389:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8389:13:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3634, + "nodeType": "RevertStatement", + "src": "8382:20:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3637, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8433:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3636, + "name": "_validateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6067, + "src": "8413:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 3638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8413:31:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3639, + "nodeType": "ExpressionStatement", + "src": "8413:31:30" + }, + { + "assignments": [ + 3641 + ], + "declarations": [ + { + "constant": false, + "id": 3641, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "8463:8:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8455:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3640, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8455:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3642, + "nodeType": "VariableDeclarationStatement", + "src": "8455:16:30" + }, + { + "assignments": [ + 3644 + ], + "declarations": [ + { + "constant": false, + "id": 3644, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "8487:10:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8482:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3643, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8482:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3647, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3645, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8500:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8500:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8482:41:30" + }, + { + "condition": { + "arguments": [ + { + "id": 3649, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8547:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3648, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8538:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8538:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3657, + "nodeType": "IfStatement", + "src": "8534:82:30", + "trueBody": { + "id": 3656, + "nodeType": "Block", + "src": "8554:62:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3652, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8588:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3653, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8594:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3651, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8568:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8568:37:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "8568:37:30" + } + ] + } + }, + { + "expression": { + "id": 3664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3658, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8626:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3660, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8649:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3661, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8655:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3662, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8666:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3659, + "name": "_recordVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6150, + "src": "8637:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_address_$dyn_calldata_ptr_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,address[] calldata) returns (bytes32)" + } + }, + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8637:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "8626:51:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 3665, + "nodeType": "ExpressionStatement", + "src": "8626:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3667, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8706:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3668, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8712:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3669, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8722:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3670, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8734:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3666, + "name": "VoteRecorded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4467, + "src": "8693:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8693:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3672, + "nodeType": "EmitStatement", + "src": "8688:56:30" + } + ] + }, + "id": 3674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_cast", + "nameLocation": "8237:5:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3617, + "mutability": "mutable", + "name": "user", + "nameLocation": "8251:4:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8243:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8243:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3620, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8276:10:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8257:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3618, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8257:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3619, + "nodeType": "ArrayTypeName", + "src": "8257:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8242:45:30" + }, + "returnParameters": { + "id": 3622, + "nodeType": "ParameterList", + "parameters": [], + "src": "8305:0:30" + }, + "scope": 4141, + "src": "8228:523:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2598 + ], + "body": { + "id": 3699, + "nodeType": "Block", + "src": "8833:157:30", + "statements": [ + { + "condition": { + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8847:21:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3683, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8857:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8857:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3682, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8848:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8848:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3691, + "nodeType": "IfStatement", + "src": "8843:74:30", + "trueBody": { + "id": 3690, + "nodeType": "Block", + "src": "8870:47:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3687, + "name": "VoteNotCasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4356, + "src": "8891:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8891:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3689, + "nodeType": "RevertStatement", + "src": "8884:22:30" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3693, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8947:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8947:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3695, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8959:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8959:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3692, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8927:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8927:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3698, + "nodeType": "ExpressionStatement", + "src": "8927:56:30" + } + ] + }, + "functionSelector": "d83eb231", + "id": 3700, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3678, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8812:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8812:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3680, + "kind": "modifierInvocation", + "modifierName": { + "id": 3677, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8799:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8799:33:30" + } + ], + "name": "withdrawVote", + "nameLocation": "8766:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3676, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8790:8:30" + }, + "parameters": { + "id": 3675, + "nodeType": "ParameterList", + "parameters": [], + "src": "8778:2:30" + }, + "returnParameters": { + "id": 3681, + "nodeType": "ParameterList", + "parameters": [], + "src": "8833:0:30" + }, + "scope": 4141, + "src": "8757:233:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2604 + ], + "body": { + "id": 3763, + "nodeType": "Block", + "src": "9170:599:30", + "statements": [ + { + "assignments": [ + 3713 + ], + "declarations": [ + { + "constant": false, + "id": 3713, + "mutability": "mutable", + "name": "election", + "nameLocation": "9201:8:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9180:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3711, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9180:12:30" + }, + "referencedDeclaration": 4299, + "src": "9180:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3716, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3714, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9212:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9212:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9180:53:30" + }, + { + "condition": { + "expression": { + "id": 3717, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9248:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9248:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3722, + "nodeType": "IfStatement", + "src": "9244:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3719, + "name": "ElectionAlreadyEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4346, + "src": "9275:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9275:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3721, + "nodeType": "RevertStatement", + "src": "9268:33:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3724, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3703, + "src": "9337:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3723, + "name": "_evaluateNextBallotBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5695, + "src": "9312:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9312:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3726, + "nodeType": "ExpressionStatement", + "src": "9312:36:30" + }, + { + "assignments": [ + 3728 + ], + "declarations": [ + { + "constant": false, + "id": 3728, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "9364:17:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9359:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3727, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9359:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3731, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3729, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "9384:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9384:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9359:48:30" + }, + { + "assignments": [ + 3733 + ], + "declarations": [ + { + "constant": false, + "id": 3733, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "9423:12:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9418:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3732, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9418:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3737, + "initialValue": { + "expression": { + "expression": { + "id": 3734, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9438:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3735, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "9438:18:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 3736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9438:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9418:45:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3738, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9477:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3739, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9477:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 3740, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9508:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9477:43:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3761, + "nodeType": "Block", + "src": "9643:120:30", + "statements": [ + { + "expression": { + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3750, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9657:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9657:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9678:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "9657:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3755, + "nodeType": "ExpressionStatement", + "src": "9657:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3757, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9720:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3758, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9739:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3756, + "name": "ElectionEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4483, + "src": "9702:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9702:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3760, + "nodeType": "EmitStatement", + "src": "9697:55:30" + } + ] + }, + "id": 3762, + "nodeType": "IfStatement", + "src": "9473:290:30", + "trueBody": { + "id": 3749, + "nodeType": "Block", + "src": "9522:115:30", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "id": 3743, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9564:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3744, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9583:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9583:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3746, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9613:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3742, + "name": "ElectionBatchEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "9541:22:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9541:85:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3748, + "nodeType": "EmitStatement", + "src": "9536:90:30" + } + ] + } + } + ] + }, + "documentation": { + "id": 3701, + "nodeType": "StructuredDocumentation", + "src": "8996:76:30", + "text": "@dev ElectionTally needs to be extended to specify how votes are counted" + }, + "functionSelector": "37143233", + "id": 3764, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3707, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9143:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9143:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3709, + "kind": "modifierInvocation", + "modifierName": { + "id": 3706, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9130:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9130:39:30" + } + ], + "name": "evaluate", + "nameLocation": "9086:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3705, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9121:8:30" + }, + "parameters": { + "id": 3704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3703, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "9100:10:30", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "9095:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3702, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9095:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9094:17:30" + }, + "returnParameters": { + "id": 3710, + "nodeType": "ParameterList", + "parameters": [], + "src": "9170:0:30" + }, + "scope": 4141, + "src": "9077:692:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2608 + ], + "body": { + "id": 3821, + "nodeType": "Block", + "src": "9904:462:30", + "statements": [ + { + "assignments": [ + 3775 + ], + "declarations": [ + { + "constant": false, + "id": 3775, + "mutability": "mutable", + "name": "election", + "nameLocation": "9935:8:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "9914:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3774, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3773, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9914:12:30" + }, + "referencedDeclaration": 4299, + "src": "9914:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3778, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3776, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9946:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9946:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9914:53:30" + }, + { + "condition": { + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9982:19:30", + "subExpression": { + "expression": { + "id": 3779, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "9983:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9983:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3785, + "nodeType": "IfStatement", + "src": "9978:54:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3782, + "name": "ElectionNotEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4344, + "src": "10010:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10010:22:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3784, + "nodeType": "RevertStatement", + "src": "10003:29:30" + } + }, + { + "assignments": [ + 3787 + ], + "declarations": [ + { + "constant": false, + "id": 3787, + "mutability": "mutable", + "name": "newEpochIndex", + "nameLocation": "10048:13:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "10043:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10043:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3792, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3788, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "10064:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10064:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10090:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10064:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10043:48:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3794, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10127:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3793, + "name": "_removeAllCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "10102:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3796, + "nodeType": "ExpressionStatement", + "src": "10102:39:30" + }, + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 3798, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10170:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "10170:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "10170:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10170:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3802, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10197:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3797, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "10151:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10151:60:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3804, + "nodeType": "ExpressionStatement", + "src": "10151:60:30" + }, + { + "expression": { + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3805, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10222:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "resolved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4274, + "src": "10222:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10242:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10222:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3810, + "nodeType": "ExpressionStatement", + "src": "10222:24:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3811, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "10257:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10257:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3813, + "nodeType": "ExpressionStatement", + "src": "10257:17:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3814, + "name": "_copyScheduleFromPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5512, + "src": "10284:30:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10284:32:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3816, + "nodeType": "ExpressionStatement", + "src": "10284:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3818, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10345:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3817, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "10332:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10332:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3820, + "nodeType": "EmitStatement", + "src": "10327:32:30" + } + ] + }, + "documentation": { + "id": 3765, + "nodeType": "StructuredDocumentation", + "src": "9775:47:30", + "text": "@dev Burns previous NFTs and mints new ones" + }, + "functionSelector": "2810e1d6", + "id": 3822, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3769, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9877:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9877:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3771, + "kind": "modifierInvocation", + "modifierName": { + "id": 3768, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9864:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9864:39:30" + } + ], + "name": "resolve", + "nameLocation": "9836:7:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3767, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9855:8:30" + }, + "parameters": { + "id": 3766, + "nodeType": "ParameterList", + "parameters": [], + "src": "9843:2:30" + }, + "returnParameters": { + "id": 3772, + "nodeType": "ParameterList", + "parameters": [], + "src": "9904:0:30" + }, + "scope": 4141, + "src": "9827:539:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2618 + ], + "body": { + "id": 3846, + "nodeType": "Block", + "src": "10611:189:30", + "statements": [ + { + "assignments": [ + 3834 + ], + "declarations": [ + { + "constant": false, + "id": 3834, + "mutability": "mutable", + "name": "settings", + "nameLocation": "10646:8:30", + "nodeType": "VariableDeclaration", + "scope": 3846, + "src": "10621:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3833, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3832, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "10621:16:30" + }, + "referencedDeclaration": 4261, + "src": "10621:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3837, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3835, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10657:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10657:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10621:55:30" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 3838, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10695:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3839, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "10695:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3840, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10733:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3841, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "10733:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3842, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10767:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3843, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "10767:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "id": 3844, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10694:99:30", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint64_$_t_uint64_$_t_uint64_$", + "typeString": "tuple(uint64,uint64,uint64)" + } + }, + "functionReturnParameters": 3831, + "id": 3845, + "nodeType": "Return", + "src": "10687:106:30" + } + ] + }, + "functionSelector": "8625c053", + "id": 3847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "10381:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3824, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10442:8:30" + }, + "parameters": { + "id": 3823, + "nodeType": "ParameterList", + "parameters": [], + "src": "10401:2:30" + }, + "returnParameters": { + "id": 3831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3826, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "10488:27:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10481:34:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3825, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10481:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3828, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "10536:23:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10529:30:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3827, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10529:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3830, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "10580:16:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10573:23:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3829, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10573:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10467:139:30" + }, + "scope": 4141, + "src": "10372:428:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2624 + ], + "body": { + "id": 3857, + "nodeType": "Block", + "src": "10887:70:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3853, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10904:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10904:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "10904:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3852, + "id": 3856, + "nodeType": "Return", + "src": "10897:53:30" + } + ] + }, + "functionSelector": "e9544a51", + "id": 3858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "10815:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10861:8:30" + }, + "parameters": { + "id": 3848, + "nodeType": "ParameterList", + "parameters": [], + "src": "10844:2:30" + }, + "returnParameters": { + "id": 3852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "10879:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10879:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10878:8:30" + }, + "scope": 4141, + "src": "10806:151:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2630 + ], + "body": { + "id": 3868, + "nodeType": "Block", + "src": "11048:76:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3864, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11065:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3866, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "11065:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3863, + "id": 3867, + "nodeType": "Return", + "src": "11058:59:30" + } + ] + }, + "functionSelector": "0f98dfba", + "id": 3869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "10972:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11024:8:30" + }, + "parameters": { + "id": 3859, + "nodeType": "ParameterList", + "parameters": [], + "src": "11007:2:30" + }, + "returnParameters": { + "id": 3863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3862, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3869, + "src": "11042:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3861, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11042:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11041:6:30" + }, + "scope": 4141, + "src": "10963:161:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2636 + ], + "body": { + "id": 3879, + "nodeType": "Block", + "src": "11202:62:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3875, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11219:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11219:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "11219:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3874, + "id": 3878, + "nodeType": "Return", + "src": "11212:45:30" + } + ] + }, + "functionSelector": "447068ef", + "id": 3880, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "11139:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3871, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11177:8:30" + }, + "parameters": { + "id": 3870, + "nodeType": "ParameterList", + "parameters": [], + "src": "11160:2:30" + }, + "returnParameters": { + "id": 3874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3873, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3880, + "src": "11195:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3872, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11195:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11194:7:30" + }, + "scope": 4141, + "src": "11130:134:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2642 + ], + "body": { + "id": 3890, + "nodeType": "Block", + "src": "11344:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3886, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11361:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3888, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "11361:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3885, + "id": 3889, + "nodeType": "Return", + "src": "11354:47:30" + } + ] + }, + "functionSelector": "85160425", + "id": 3891, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "11279:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11319:8:30" + }, + "parameters": { + "id": 3881, + "nodeType": "ParameterList", + "parameters": [], + "src": "11302:2:30" + }, + "returnParameters": { + "id": 3885, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3884, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3891, + "src": "11337:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3883, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11337:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11336:7:30" + }, + "scope": 4141, + "src": "11270:138:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2648 + ], + "body": { + "id": 3900, + "nodeType": "Block", + "src": "11477:47:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3897, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "11494:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11494:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3896, + "id": 3899, + "nodeType": "Return", + "src": "11487:30:30" + } + ] + }, + "functionSelector": "ffe7f643", + "id": 3901, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "11423:13:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3893, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11453:8:30" + }, + "parameters": { + "id": 3892, + "nodeType": "ParameterList", + "parameters": [], + "src": "11436:2:30" + }, + "returnParameters": { + "id": 3896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3895, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3901, + "src": "11471:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3894, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11471:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11470:6:30" + }, + "scope": 4141, + "src": "11414:110:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2654 + ], + "body": { + "id": 3911, + "nodeType": "Block", + "src": "11599:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3907, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11616:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11616:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "11616:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3906, + "id": 3910, + "nodeType": "Return", + "src": "11609:35:30" + } + ] + }, + "functionSelector": "ce04e44c", + "id": 3912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "11539:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3903, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11573:8:30" + }, + "parameters": { + "id": 3902, + "nodeType": "ParameterList", + "parameters": [], + "src": "11556:2:30" + }, + "returnParameters": { + "id": 3906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3905, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3912, + "src": "11591:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3904, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11591:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11590:8:30" + }, + "scope": 4141, + "src": "11530:121:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2660 + ], + "body": { + "id": 3922, + "nodeType": "Block", + "src": "11724:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3918, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11741:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3920, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "11741:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3917, + "id": 3921, + "nodeType": "Return", + "src": "11734:33:30" + } + ] + }, + "functionSelector": "362c906d", + "id": 3923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "11666:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3914, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11698:8:30" + }, + "parameters": { + "id": 3913, + "nodeType": "ParameterList", + "parameters": [], + "src": "11681:2:30" + }, + "returnParameters": { + "id": 3917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3916, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3923, + "src": "11716:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3915, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11716:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11715:8:30" + }, + "scope": 4141, + "src": "11657:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2666 + ], + "body": { + "id": 3933, + "nodeType": "Block", + "src": "11860:68:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3929, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11877:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11877:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "11877:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3928, + "id": 3932, + "nodeType": "Return", + "src": "11870:51:30" + } + ] + }, + "functionSelector": "e420d7f9", + "id": 3934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "11789:28:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3925, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11834:8:30" + }, + "parameters": { + "id": 3924, + "nodeType": "ParameterList", + "parameters": [], + "src": "11817:2:30" + }, + "returnParameters": { + "id": 3928, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3927, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3934, + "src": "11852:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3926, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11852:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11851:8:30" + }, + "scope": 4141, + "src": "11780:148:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2672 + ], + "body": { + "id": 3944, + "nodeType": "Block", + "src": "12010:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3940, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "12027:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "12027:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3939, + "id": 3943, + "nodeType": "Return", + "src": "12020:47:30" + } + ] + }, + "functionSelector": "e1509015", + "id": 3945, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "11943:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3936, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11984:8:30" + }, + "parameters": { + "id": 3935, + "nodeType": "ParameterList", + "parameters": [], + "src": "11967:2:30" + }, + "returnParameters": { + "id": 3939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3938, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3945, + "src": "12002:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3937, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "12002:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "12001:8:30" + }, + "scope": 4141, + "src": "11934:140:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2678 + ], + "body": { + "id": 3957, + "nodeType": "Block", + "src": "12146:49:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3953, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "12168:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12168:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12163:4:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3951, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12163:4:30", + "typeDescriptions": {} + } + }, + "id": 3955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3950, + "id": 3956, + "nodeType": "Return", + "src": "12156:32:30" + } + ] + }, + "functionSelector": "086146d2", + "id": 3958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "12089:16:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3947, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12122:8:30" + }, + "parameters": { + "id": 3946, + "nodeType": "ParameterList", + "parameters": [], + "src": "12105:2:30" + }, + "returnParameters": { + "id": 3950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3949, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3958, + "src": "12140:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3948, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12140:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12139:6:30" + }, + "scope": 4141, + "src": "12080:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2686 + ], + "body": { + "id": 3973, + "nodeType": "Block", + "src": "12279:74:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3970, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3960, + "src": "12336:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3966, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12296:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12296:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3969, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "12296:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3965, + "id": 3972, + "nodeType": "Return", + "src": "12289:57:30" + } + ] + }, + "functionSelector": "3a3e6c81", + "id": 3974, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "12210:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3962, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12255:8:30" + }, + "parameters": { + "id": 3961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3960, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "12230:9:30", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12222:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12222:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12221:19:30" + }, + "returnParameters": { + "id": 3965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3964, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12273:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3963, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12273:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12272:6:30" + }, + "scope": 4141, + "src": "12201:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2693 + ], + "body": { + "id": 3987, + "nodeType": "Block", + "src": "12432:63:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3981, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12449:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3983, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12449:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3984, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "12449:37:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 3980, + "id": 3986, + "nodeType": "Return", + "src": "12442:46:30" + } + ] + }, + "functionSelector": "9636f67c", + "id": 3988, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "12368:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3976, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12396:8:30" + }, + "parameters": { + "id": 3975, + "nodeType": "ParameterList", + "parameters": [], + "src": "12379:2:30" + }, + "returnParameters": { + "id": 3980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3979, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3988, + "src": "12414:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12414:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3978, + "nodeType": "ArrayTypeName", + "src": "12414:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12413:18:30" + }, + "scope": 4141, + "src": "12359:136:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2702 + ], + "body": { + "id": 4001, + "nodeType": "Block", + "src": "12600:54:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3998, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3991, + "src": "12636:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3997, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "12617:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12617:30:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3996, + "id": 4000, + "nodeType": "Return", + "src": "12610:37:30" + } + ] + }, + "functionSelector": "edc968ba", + "id": 4002, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "12510:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3993, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12573:8:30" + }, + "parameters": { + "id": 3992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3991, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "12547:10:30", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12528:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3989, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12528:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3990, + "nodeType": "ArrayTypeName", + "src": "12528:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12527:31:30" + }, + "returnParameters": { + "id": 3996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3995, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12591:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3994, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12591:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12590:9:30" + }, + "scope": 4141, + "src": "12501:153:30", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2710 + ], + "body": { + "id": 4014, + "nodeType": "Block", + "src": "12737:45:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4011, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4004, + "src": "12770:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4010, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12754:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4009, + "id": 4013, + "nodeType": "Return", + "src": "12747:28:30" + } + ] + }, + "functionSelector": "95ff6584", + "id": 4015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "12669:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4006, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12710:8:30" + }, + "parameters": { + "id": 4005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4004, + "mutability": "mutable", + "name": "user", + "nameLocation": "12692:4:30", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12684:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12684:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12683:14:30" + }, + "returnParameters": { + "id": 4009, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4008, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12728:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4007, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12728:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12727:9:30" + }, + "scope": 4141, + "src": "12660:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2718 + ], + "body": { + "id": 4032, + "nodeType": "Block", + "src": "12856:59:30", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4024, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4017, + "src": "12889:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4023, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12873:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12906:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12898:7:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4026, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12898:7:30", + "typeDescriptions": {} + } + }, + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12898:10:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12873:35:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4022, + "id": 4031, + "nodeType": "Return", + "src": "12866:42:30" + } + ] + }, + "functionSelector": "09eef43e", + "id": 4033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "12797:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4019, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12832:8:30" + }, + "parameters": { + "id": 4018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4017, + "mutability": "mutable", + "name": "user", + "nameLocation": "12814:4:30", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12806:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4016, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12806:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12805:14:30" + }, + "returnParameters": { + "id": 4022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12850:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12850:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12849:6:30" + }, + "scope": 4141, + "src": "12788:127:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2726 + ], + "body": { + "id": 4045, + "nodeType": "Block", + "src": "12995:43:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4042, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "13026:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4041, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "13012:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 4043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13012:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4040, + "id": 4044, + "nodeType": "Return", + "src": "13005:26:30" + } + ] + }, + "functionSelector": "bb9c0920", + "id": 4046, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "12930:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4037, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12971:8:30" + }, + "parameters": { + "id": 4036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "user", + "nameLocation": "12951:4:30", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12943:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12943:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12942:14:30" + }, + "returnParameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4039, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12989:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12989:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12988:6:30" + }, + "scope": 4141, + "src": "12921:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2734 + ], + "body": { + "id": 4059, + "nodeType": "Block", + "src": "13124:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4055, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4048, + "src": "13152:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4054, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13141:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13141:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "13141:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4053, + "id": 4058, + "nodeType": "Return", + "src": "13134:33:30" + } + ] + }, + "functionSelector": "7a3bc0ee", + "id": 4060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "13053:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13100:8:30" + }, + "parameters": { + "id": 4049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4048, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13076:8:30", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13068:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13068:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13067:18:30" + }, + "returnParameters": { + "id": 4053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4052, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13118:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13118:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13117:6:30" + }, + "scope": 4141, + "src": "13044:130:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2743 + ], + "body": { + "id": 4074, + "nodeType": "Block", + "src": "13277:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4070, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4062, + "src": "13305:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4069, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13294:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13294:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "13294:31:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 4068, + "id": 4073, + "nodeType": "Return", + "src": "13287:38:30" + } + ] + }, + "functionSelector": "655aaaca", + "id": 4075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "13189:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4064, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13241:8:30" + }, + "parameters": { + "id": 4063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4062, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13217:8:30", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13209:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4061, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13209:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13208:18:30" + }, + "returnParameters": { + "id": 4068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13259:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4065, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13259:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4066, + "nodeType": "ArrayTypeName", + "src": "13259:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13258:18:30" + }, + "scope": 4141, + "src": "13180:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2749 + ], + "body": { + "id": 4085, + "nodeType": "Block", + "src": "13405:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4081, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13422:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13422:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4083, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "13422:31:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4080, + "id": 4084, + "nodeType": "Return", + "src": "13415:38:30" + } + ] + }, + "functionSelector": "e327b585", + "id": 4086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "13347:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4077, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13381:8:30" + }, + "parameters": { + "id": 4076, + "nodeType": "ParameterList", + "parameters": [], + "src": "13366:2:30" + }, + "returnParameters": { + "id": 4080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "13399:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4078, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13399:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "13398:6:30" + }, + "scope": 4141, + "src": "13338:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2757 + ], + "body": { + "id": 4100, + "nodeType": "Block", + "src": "13550:71:30", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4094, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13567:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13567:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4096, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "13567:36:30", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4098, + "indexExpression": { + "id": 4097, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4088, + "src": "13604:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13567:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4093, + "id": 4099, + "nodeType": "Return", + "src": "13560:54:30" + } + ] + }, + "functionSelector": "d82f25f0", + "id": 4101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "13475:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4090, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13526:8:30" + }, + "parameters": { + "id": 4089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4088, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "13501:9:30", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13493:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13492:19:30" + }, + "returnParameters": { + "id": 4093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4092, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13544:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13544:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13543:6:30" + }, + "scope": 4141, + "src": "13466:155:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2764 + ], + "body": { + "id": 4114, + "nodeType": "Block", + "src": "13707:62:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4108, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13724:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4110, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "13724:29:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13724:36:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:38:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4107, + "id": 4113, + "nodeType": "Return", + "src": "13717:45:30" + } + ] + }, + "functionSelector": "f2516dbf", + "id": 4115, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "13636:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4103, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13671:8:30" + }, + "parameters": { + "id": 4102, + "nodeType": "ParameterList", + "parameters": [], + "src": "13654:2:30" + }, + "returnParameters": { + "id": 4107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4106, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4115, + "src": "13689:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13689:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4105, + "nodeType": "ArrayTypeName", + "src": "13689:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13688:18:30" + }, + "scope": 4141, + "src": "13627:142:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2770 + ], + "body": { + "id": 4125, + "nodeType": "Block", + "src": "13841:53:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4121, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13858:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13858:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "13858:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4120, + "id": 4124, + "nodeType": "Return", + "src": "13851:36:30" + } + ] + }, + "functionSelector": "c07de0d3", + "id": 4126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "13784:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4117, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13814:8:30" + }, + "parameters": { + "id": 4116, + "nodeType": "ParameterList", + "parameters": [], + "src": "13799:2:30" + }, + "returnParameters": { + "id": 4120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4119, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4126, + "src": "13832:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13832:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13831:9:30" + }, + "scope": 4141, + "src": "13775:119:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2777 + ], + "body": { + "id": 4139, + "nodeType": "Block", + "src": "13979:64:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4133, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13996:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "13996:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4136, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13996:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4132, + "id": 4138, + "nodeType": "Return", + "src": "13989:47:30" + } + ] + }, + "functionSelector": "606a6b76", + "id": 4140, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "13909:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4128, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13943:8:30" + }, + "parameters": { + "id": 4127, + "nodeType": "ParameterList", + "parameters": [], + "src": "13926:2:30" + }, + "returnParameters": { + "id": 4132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4131, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4140, + "src": "13961:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13961:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4130, + "nodeType": "ArrayTypeName", + "src": "13961:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13960:18:30" + }, + "scope": 4141, + "src": "13900:143:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4142, + "src": "543:13502:30", + "usedErrors": [ + 5, + 19, + 29, + 31, + 1995, + 1997, + 1999, + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:14015:30" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module for electing a council, represented by a set of NFT holders\ninterface IElectionModule {\n // ---------------------------------------\n // Initialization\n // ---------------------------------------\n\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external;\n\n /// @notice Shows whether the module has been initialized\n function isElectionModuleInitialized() external view returns (bool);\n\n // ---------------------------------------\n // Owner write functions\n // ---------------------------------------\n\n /// @notice Upgrades the implementation of the existing council NFT token\n function upgradeCouncilToken(address newCouncilTokenImplementation) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Determines minimum values for epoch schedule adjustments\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external;\n\n /// @notice Determines adjustment size for tweakEpochSchedule\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external;\n\n /// @notice Determines batch size when evaluate() is called with numBallots = 0\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external;\n\n /// @notice Determines the number of council members in the next epoch\n function setNextEpochSeatCount(uint8 newSeatCount) external;\n\n /// @notice Determines the minimum number of council members before triggering an emergency election\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external;\n\n /// @notice Allows the owner to remove one or more council members, triggering an election if a threshold is met\n function dismissMembers(address[] calldata members) external;\n\n // ---------------------------------------\n // User write functions\n // ---------------------------------------\n\n /// @notice Allows anyone to self-nominate during the Nomination period\n function nominate() external;\n\n /// @notice Self-withdrawal of nominations during the Nomination period\n function withdrawNomination() external;\n\n /// @notice Allows anyone with vote power to vote on nominated candidates during the Voting period\n function cast(address[] calldata candidates) external;\n\n /// @notice Allows votes to be withdraw\n function withdrawVote() external;\n\n /// @notice Processes ballots in batches during the Evaluation period (after epochEndDate)\n function evaluate(uint numBallots) external;\n\n /// @notice Shuffles NFTs and resolves an election after it has been evaluated\n function resolve() external;\n\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Exposes minimum durations required when adjusting epoch schedules\n function getMinEpochDurations()\n external\n view\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n\n /// @notice Exposes maximum size of adjustments when calling tweakEpochSchedule\n function getMaxDateAdjustmentTolerance() external view returns (uint64);\n\n /// @notice Shows the default batch size when calling evaluate() with numBallots = 0\n function getDefaultBallotEvaluationBatchSize() external view returns (uint);\n\n /// @notice Shows the number of council members that the next epoch will have\n function getNextEpochSeatCount() external view returns (uint8);\n\n /// @notice Returns the minimum active members that the council needs to avoid an emergency election\n function getMinimumActiveMembers() external view returns (uint8);\n\n /// @notice Returns the index of the current epoch. The first epoch's index is 1\n function getEpochIndex() external view returns (uint);\n\n /// @notice Returns the date in which the current epoch started\n function getEpochStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the current epoch will end\n function getEpochEndDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the current epoch will start\n function getNominationPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the current epoch will start\n function getVotingPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the current period type: Administration, Nomination, Voting, Evaluation\n function getCurrentPeriod() external view returns (uint);\n\n /// @notice Shows if a candidate has been nominated in the current epoch\n function isNominated(address candidate) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the current epoch\n function getNominees() external view returns (address[] memory);\n\n /// @notice Hashes a list of candidates (used for identifying and storing ballots)\n function calculateBallotId(address[] calldata candidates) external pure returns (bytes32);\n\n /// @notice Returns the ballot id that user voted on in the current election\n function getBallotVoted(address user) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the current election\n function hasVoted(address user) external view returns (bool);\n\n /// @notice Returns the vote power of user in the current election\n function getVotePower(address user) external view returns (uint);\n\n /// @notice Returns the number of votes given to a particular ballot\n function getBallotVotes(bytes32 ballotId) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has\n function getBallotCandidates(bytes32 ballotId) external view returns (address[] memory);\n\n /// @notice Returns whether all ballots in the current election have been counted\n function isElectionEvaluated() external view returns (bool);\n\n /// @notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated\n function getCandidateVotes(address candidate) external view returns (uint);\n\n /// @notice Returns the winners of the current election. Requires the election to be partially or totally evaluated\n function getElectionWinners() external view returns (address[] memory);\n\n /// @notice Returns the address of the council NFT token\n function getCouncilToken() external view returns (address);\n\n /// @notice Returns the current NFT token holders\n function getCouncilMembers() external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "exportedSymbols": { + "IElectionModule": [ + 2778 + ] + }, + "id": 2779, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2486, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:27" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2487, + "nodeType": "StructuredDocumentation", + "src": "56:78:27", + "text": "@title Module for electing a council, represented by a set of NFT holders" + }, + "fullyImplemented": false, + "id": 2778, + "linearizedBaseContracts": [ + 2778 + ], + "name": "IElectionModule", + "nameLocation": "144:15:27", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2488, + "nodeType": "StructuredDocumentation", + "src": "283:73:27", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "ee695137", + "id": 2506, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "370:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2490, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "418:16:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "404:30:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2489, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "404:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2492, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "458:18:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "444:32:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2491, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "444:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2495, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "503:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "486:29:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2493, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "486:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2494, + "nodeType": "ArrayTypeName", + "src": "486:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2497, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "531:20:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "525:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2496, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "525:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2499, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "568:25:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "561:32:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2498, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "561:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2501, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "610:21:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "603:28:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2500, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "603:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2503, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "648:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "641:19:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2502, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "641:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "394:272:27" + }, + "returnParameters": { + "id": 2505, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:0:27" + }, + "scope": 2778, + "src": "361:315:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2507, + "nodeType": "StructuredDocumentation", + "src": "682:57:27", + "text": "@notice Shows whether the module has been initialized" + }, + "functionSelector": "c5798523", + "id": 2512, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "753:27:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2508, + "nodeType": "ParameterList", + "parameters": [], + "src": "780:2:27" + }, + "returnParameters": { + "id": 2511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2510, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "806:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2509, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "806:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "805:6:27" + }, + "scope": 2778, + "src": "744:68:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2513, + "nodeType": "StructuredDocumentation", + "src": "942:73:27", + "text": "@notice Upgrades the implementation of the existing council NFT token" + }, + "functionSelector": "54520478", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeCouncilToken", + "nameLocation": "1029:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2515, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "1057:29:27", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "1049:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2514, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1049:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1048:39:27" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [], + "src": "1096:0:27" + }, + "scope": 2778, + "src": "1020:77:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2519, + "nodeType": "StructuredDocumentation", + "src": "1103:167:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)" + }, + "functionSelector": "8f701997", + "id": 2528, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tweakEpochSchedule", + "nameLocation": "1284:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2521, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1319:28:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1312:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2520, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1312:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1364:24:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1357:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2522, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1357:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1405:15:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1398:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2524, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1398:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1302:124:27" + }, + "returnParameters": { + "id": 2527, + "nodeType": "ParameterList", + "parameters": [], + "src": "1435:0:27" + }, + "scope": 2778, + "src": "1275:161:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2529, + "nodeType": "StructuredDocumentation", + "src": "1442:103:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration" + }, + "functionSelector": "c14d0528", + "id": 2538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "modifyEpochSchedule", + "nameLocation": "1559:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1595:28:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1588:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2530, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1588:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2533, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1640:24:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1633:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2532, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2535, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1681:15:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1674:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2534, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1674:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1578:124:27" + }, + "returnParameters": { + "id": 2537, + "nodeType": "ParameterList", + "parameters": [], + "src": "1711:0:27" + }, + "scope": 2778, + "src": "1550:162:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2539, + "nodeType": "StructuredDocumentation", + "src": "1718:68:27", + "text": "@notice Determines minimum values for epoch schedule adjustments" + }, + "functionSelector": "a25a9f3a", + "id": 2548, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinEpochDurations", + "nameLocation": "1800:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2541, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "1837:30:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1830:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2540, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1830:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2543, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "1884:26:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1877:33:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2542, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1877:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2545, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "1927:19:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1920:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2544, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1920:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1820:132:27" + }, + "returnParameters": { + "id": 2547, + "nodeType": "ParameterList", + "parameters": [], + "src": "1961:0:27" + }, + "scope": 2778, + "src": "1791:171:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2549, + "nodeType": "StructuredDocumentation", + "src": "1968:61:27", + "text": "@notice Determines adjustment size for tweakEpochSchedule" + }, + "functionSelector": "3ac1c5fe", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "2043:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "2080:29:27", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "2073:36:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2550, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2073:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2072:38:27" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "2119:0:27" + }, + "scope": 2778, + "src": "2034:86:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "2126:79:27", + "text": "@notice Determines batch size when evaluate() is called with numBallots = 0" + }, + "functionSelector": "64deab73", + "id": 2560, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "2219:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2557, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "2260:35:27", + "nodeType": "VariableDeclaration", + "scope": 2560, + "src": "2255:40:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2556, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2255:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2254:42:27" + }, + "returnParameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [], + "src": "2305:0:27" + }, + "scope": 2778, + "src": "2210:96:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2561, + "nodeType": "StructuredDocumentation", + "src": "2312:70:27", + "text": "@notice Determines the number of council members in the next epoch" + }, + "functionSelector": "4b5dacac", + "id": 2566, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setNextEpochSeatCount", + "nameLocation": "2396:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "2424:12:27", + "nodeType": "VariableDeclaration", + "scope": 2566, + "src": "2418:18:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2562, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2418:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2417:20:27" + }, + "returnParameters": { + "id": 2565, + "nodeType": "ParameterList", + "parameters": [], + "src": "2446:0:27" + }, + "scope": 2778, + "src": "2387:60:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2567, + "nodeType": "StructuredDocumentation", + "src": "2453:100:27", + "text": "@notice Determines the minimum number of council members before triggering an emergency election" + }, + "functionSelector": "0438d06e", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinimumActiveMembers", + "nameLocation": "2567:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "2597:23:27", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "2591:29:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2568, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2591:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2590:31:27" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "2630:0:27" + }, + "scope": 2778, + "src": "2558:73:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2573, + "nodeType": "StructuredDocumentation", + "src": "2637:112:27", + "text": "@notice Allows the owner to remove one or more council members, triggering an election if a threshold is met" + }, + "functionSelector": "9a25eaf3", + "id": 2579, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "dismissMembers", + "nameLocation": "2763:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2576, + "mutability": "mutable", + "name": "members", + "nameLocation": "2797:7:27", + "nodeType": "VariableDeclaration", + "scope": 2579, + "src": "2778:26:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2778:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2575, + "nodeType": "ArrayTypeName", + "src": "2778:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2777:28:27" + }, + "returnParameters": { + "id": 2578, + "nodeType": "ParameterList", + "parameters": [], + "src": "2814:0:27" + }, + "scope": 2778, + "src": "2754:61:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2580, + "nodeType": "StructuredDocumentation", + "src": "2944:71:27", + "text": "@notice Allows anyone to self-nominate during the Nomination period" + }, + "functionSelector": "fcd7e1d7", + "id": 2583, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominate", + "nameLocation": "3029:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "3037:2:27" + }, + "returnParameters": { + "id": 2582, + "nodeType": "ParameterList", + "parameters": [], + "src": "3048:0:27" + }, + "scope": 2778, + "src": "3020:29:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2584, + "nodeType": "StructuredDocumentation", + "src": "3055:71:27", + "text": "@notice Self-withdrawal of nominations during the Nomination period" + }, + "functionSelector": "d11801cf", + "id": 2587, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawNomination", + "nameLocation": "3140:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2585, + "nodeType": "ParameterList", + "parameters": [], + "src": "3158:2:27" + }, + "returnParameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [], + "src": "3169:0:27" + }, + "scope": 2778, + "src": "3131:39:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2588, + "nodeType": "StructuredDocumentation", + "src": "3176:98:27", + "text": "@notice Allows anyone with vote power to vote on nominated candidates during the Voting period" + }, + "functionSelector": "84ae670c", + "id": 2594, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "cast", + "nameLocation": "3288:4:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2591, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3312:10:27", + "nodeType": "VariableDeclaration", + "scope": 2594, + "src": "3293:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3293:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2590, + "nodeType": "ArrayTypeName", + "src": "3293:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3292:31:27" + }, + "returnParameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [], + "src": "3332:0:27" + }, + "scope": 2778, + "src": "3279:54:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2595, + "nodeType": "StructuredDocumentation", + "src": "3339:39:27", + "text": "@notice Allows votes to be withdraw" + }, + "functionSelector": "d83eb231", + "id": 2598, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawVote", + "nameLocation": "3392:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [], + "src": "3404:2:27" + }, + "returnParameters": { + "id": 2597, + "nodeType": "ParameterList", + "parameters": [], + "src": "3415:0:27" + }, + "scope": 2778, + "src": "3383:33:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2599, + "nodeType": "StructuredDocumentation", + "src": "3422:90:27", + "text": "@notice Processes ballots in batches during the Evaluation period (after epochEndDate)" + }, + "functionSelector": "37143233", + "id": 2604, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "evaluate", + "nameLocation": "3526:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2601, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "3540:10:27", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "3535:15:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2600, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3535:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3534:17:27" + }, + "returnParameters": { + "id": 2603, + "nodeType": "ParameterList", + "parameters": [], + "src": "3560:0:27" + }, + "scope": 2778, + "src": "3517:44:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2605, + "nodeType": "StructuredDocumentation", + "src": "3567:78:27", + "text": "@notice Shuffles NFTs and resolves an election after it has been evaluated" + }, + "functionSelector": "2810e1d6", + "id": 2608, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "resolve", + "nameLocation": "3659:7:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2606, + "nodeType": "ParameterList", + "parameters": [], + "src": "3666:2:27" + }, + "returnParameters": { + "id": 2607, + "nodeType": "ParameterList", + "parameters": [], + "src": "3677:0:27" + }, + "scope": 2778, + "src": "3650:28:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2609, + "nodeType": "StructuredDocumentation", + "src": "3801:77:27", + "text": "@notice Exposes minimum durations required when adjusting epoch schedules" + }, + "functionSelector": "8625c053", + "id": 2618, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "3892:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2610, + "nodeType": "ParameterList", + "parameters": [], + "src": "3912:2:27" + }, + "returnParameters": { + "id": 2617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2612, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "3982:27:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "3975:34:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2611, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3975:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2614, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "4030:23:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4023:30:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2613, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4023:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2616, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "4074:16:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4067:23:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2615, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4067:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3961:139:27" + }, + "scope": 2778, + "src": "3883:218:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2619, + "nodeType": "StructuredDocumentation", + "src": "4107:79:27", + "text": "@notice Exposes maximum size of adjustments when calling tweakEpochSchedule" + }, + "functionSelector": "e9544a51", + "id": 2624, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "4200:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2620, + "nodeType": "ParameterList", + "parameters": [], + "src": "4229:2:27" + }, + "returnParameters": { + "id": 2623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2622, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2624, + "src": "4255:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2621, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4255:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4254:8:27" + }, + "scope": 2778, + "src": "4191:72:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2625, + "nodeType": "StructuredDocumentation", + "src": "4269:84:27", + "text": "@notice Shows the default batch size when calling evaluate() with numBallots = 0" + }, + "functionSelector": "0f98dfba", + "id": 2630, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "4367:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "4402:2:27" + }, + "returnParameters": { + "id": 2629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2630, + "src": "4428:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2627, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4428:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4427:6:27" + }, + "scope": 2778, + "src": "4358:76:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2631, + "nodeType": "StructuredDocumentation", + "src": "4440:77:27", + "text": "@notice Shows the number of council members that the next epoch will have" + }, + "functionSelector": "447068ef", + "id": 2636, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "4531:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2632, + "nodeType": "ParameterList", + "parameters": [], + "src": "4552:2:27" + }, + "returnParameters": { + "id": 2635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2634, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "4578:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2633, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4578:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4577:7:27" + }, + "scope": 2778, + "src": "4522:63:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2637, + "nodeType": "StructuredDocumentation", + "src": "4591:100:27", + "text": "@notice Returns the minimum active members that the council needs to avoid an emergency election" + }, + "functionSelector": "85160425", + "id": 2642, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "4705:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2638, + "nodeType": "ParameterList", + "parameters": [], + "src": "4728:2:27" + }, + "returnParameters": { + "id": 2641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "4754:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2639, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4754:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4753:7:27" + }, + "scope": 2778, + "src": "4696:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2643, + "nodeType": "StructuredDocumentation", + "src": "4767:80:27", + "text": "@notice Returns the index of the current epoch. The first epoch's index is 1" + }, + "functionSelector": "ffe7f643", + "id": 2648, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "4861:13:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2644, + "nodeType": "ParameterList", + "parameters": [], + "src": "4874:2:27" + }, + "returnParameters": { + "id": 2647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2646, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2648, + "src": "4900:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2645, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4900:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4899:6:27" + }, + "scope": 2778, + "src": "4852:54:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2649, + "nodeType": "StructuredDocumentation", + "src": "4912:63:27", + "text": "@notice Returns the date in which the current epoch started" + }, + "functionSelector": "ce04e44c", + "id": 2654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "4989:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2650, + "nodeType": "ParameterList", + "parameters": [], + "src": "5006:2:27" + }, + "returnParameters": { + "id": 2653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2652, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2654, + "src": "5032:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2651, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5032:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5031:8:27" + }, + "scope": 2778, + "src": "4980:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2655, + "nodeType": "StructuredDocumentation", + "src": "5046:64:27", + "text": "@notice Returns the date in which the current epoch will end" + }, + "functionSelector": "362c906d", + "id": 2660, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "5124:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2656, + "nodeType": "ParameterList", + "parameters": [], + "src": "5139:2:27" + }, + "returnParameters": { + "id": 2659, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2658, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2660, + "src": "5165:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2657, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5165:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5164:8:27" + }, + "scope": 2778, + "src": "5115:58:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2661, + "nodeType": "StructuredDocumentation", + "src": "5179:91:27", + "text": "@notice Returns the date in which the Nomination period in the current epoch will start" + }, + "functionSelector": "e420d7f9", + "id": 2666, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "5284:28:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2662, + "nodeType": "ParameterList", + "parameters": [], + "src": "5312:2:27" + }, + "returnParameters": { + "id": 2665, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2664, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2666, + "src": "5338:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2663, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5338:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5337:8:27" + }, + "scope": 2778, + "src": "5275:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2667, + "nodeType": "StructuredDocumentation", + "src": "5352:87:27", + "text": "@notice Returns the date in which the Voting period in the current epoch will start" + }, + "functionSelector": "e1509015", + "id": 2672, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "5453:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2668, + "nodeType": "ParameterList", + "parameters": [], + "src": "5477:2:27" + }, + "returnParameters": { + "id": 2671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2670, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2672, + "src": "5503:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2669, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5503:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5502:8:27" + }, + "scope": 2778, + "src": "5444:67:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2673, + "nodeType": "StructuredDocumentation", + "src": "5517:91:27", + "text": "@notice Returns the current period type: Administration, Nomination, Voting, Evaluation" + }, + "functionSelector": "086146d2", + "id": 2678, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "5622:16:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2674, + "nodeType": "ParameterList", + "parameters": [], + "src": "5638:2:27" + }, + "returnParameters": { + "id": 2677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2678, + "src": "5664:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2675, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5664:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5663:6:27" + }, + "scope": 2778, + "src": "5613:57:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2679, + "nodeType": "StructuredDocumentation", + "src": "5676:72:27", + "text": "@notice Shows if a candidate has been nominated in the current epoch" + }, + "functionSelector": "3a3e6c81", + "id": 2686, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "5762:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2681, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "5782:9:27", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5774:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5774:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5773:19:27" + }, + "returnParameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5816:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5816:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5815:6:27" + }, + "scope": 2778, + "src": "5753:69:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2687, + "nodeType": "StructuredDocumentation", + "src": "5828:75:27", + "text": "@notice Returns a list of all nominated candidates in the current epoch" + }, + "functionSelector": "9636f67c", + "id": 2693, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "5917:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2688, + "nodeType": "ParameterList", + "parameters": [], + "src": "5928:2:27" + }, + "returnParameters": { + "id": 2692, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2691, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2693, + "src": "5954:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2689, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5954:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ArrayTypeName", + "src": "5954:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5953:18:27" + }, + "scope": 2778, + "src": "5908:64:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2694, + "nodeType": "StructuredDocumentation", + "src": "5978:82:27", + "text": "@notice Hashes a list of candidates (used for identifying and storing ballots)" + }, + "functionSelector": "edc968ba", + "id": 2702, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "6074:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2697, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6111:10:27", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6092:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6092:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2696, + "nodeType": "ArrayTypeName", + "src": "6092:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6091:31:27" + }, + "returnParameters": { + "id": 2701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2700, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6146:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2699, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6146:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6145:9:27" + }, + "scope": 2778, + "src": "6065:90:27", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2703, + "nodeType": "StructuredDocumentation", + "src": "6161:76:27", + "text": "@notice Returns the ballot id that user voted on in the current election" + }, + "functionSelector": "95ff6584", + "id": 2710, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "6251:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2706, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "user", + "nameLocation": "6274:4:27", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6266:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6266:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6265:14:27" + }, + "returnParameters": { + "id": 2709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2708, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6303:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2707, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6303:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6302:9:27" + }, + "scope": 2778, + "src": "6242:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2711, + "nodeType": "StructuredDocumentation", + "src": "6318:61:27", + "text": "@notice Returns if user has voted in the current election" + }, + "functionSelector": "09eef43e", + "id": 2718, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "6393:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2713, + "mutability": "mutable", + "name": "user", + "nameLocation": "6410:4:27", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6402:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6402:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6401:14:27" + }, + "returnParameters": { + "id": 2717, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2716, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6439:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6439:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "6438:6:27" + }, + "scope": 2778, + "src": "6384:61:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2719, + "nodeType": "StructuredDocumentation", + "src": "6451:66:27", + "text": "@notice Returns the vote power of user in the current election" + }, + "functionSelector": "bb9c0920", + "id": 2726, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "6531:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "user", + "nameLocation": "6552:4:27", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6544:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2720, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6544:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6543:14:27" + }, + "returnParameters": { + "id": 2725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2724, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6581:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2723, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6581:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6580:6:27" + }, + "scope": 2778, + "src": "6522:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2727, + "nodeType": "StructuredDocumentation", + "src": "6593:68:27", + "text": "@notice Returns the number of votes given to a particular ballot" + }, + "functionSelector": "7a3bc0ee", + "id": 2734, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "6675:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2729, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6698:8:27", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6690:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2728, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6690:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6689:18:27" + }, + "returnParameters": { + "id": 2733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2732, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6731:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2731, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6731:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6730:6:27" + }, + "scope": 2778, + "src": "6666:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2735, + "nodeType": "StructuredDocumentation", + "src": "6743:71:27", + "text": "@notice Returns the list of candidates that a particular ballot has" + }, + "functionSelector": "655aaaca", + "id": 2743, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "6828:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2738, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2737, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6856:8:27", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6848:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2736, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6848:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6847:18:27" + }, + "returnParameters": { + "id": 2742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2741, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6889:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6889:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2740, + "nodeType": "ArrayTypeName", + "src": "6889:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6888:18:27" + }, + "scope": 2778, + "src": "6819:88:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2744, + "nodeType": "StructuredDocumentation", + "src": "6913:81:27", + "text": "@notice Returns whether all ballots in the current election have been counted" + }, + "functionSelector": "e327b585", + "id": 2749, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "7008:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2745, + "nodeType": "ParameterList", + "parameters": [], + "src": "7027:2:27" + }, + "returnParameters": { + "id": 2748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2747, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2749, + "src": "7053:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2746, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7053:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7052:6:27" + }, + "scope": 2778, + "src": "6999:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2750, + "nodeType": "StructuredDocumentation", + "src": "7065:120:27", + "text": "@notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "d82f25f0", + "id": 2757, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "7199:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2752, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "7225:9:27", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7217:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7217:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7216:19:27" + }, + "returnParameters": { + "id": 2756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2755, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7259:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2754, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7259:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7258:6:27" + }, + "scope": 2778, + "src": "7190:75:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2758, + "nodeType": "StructuredDocumentation", + "src": "7271:115:27", + "text": "@notice Returns the winners of the current election. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "f2516dbf", + "id": 2764, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "7400:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2759, + "nodeType": "ParameterList", + "parameters": [], + "src": "7418:2:27" + }, + "returnParameters": { + "id": 2763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2762, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7444:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7444:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2761, + "nodeType": "ArrayTypeName", + "src": "7444:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7443:18:27" + }, + "scope": 2778, + "src": "7391:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2765, + "nodeType": "StructuredDocumentation", + "src": "7468:56:27", + "text": "@notice Returns the address of the council NFT token" + }, + "functionSelector": "c07de0d3", + "id": 2770, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "7538:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2766, + "nodeType": "ParameterList", + "parameters": [], + "src": "7553:2:27" + }, + "returnParameters": { + "id": 2769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2768, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2770, + "src": "7579:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7579:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7578:9:27" + }, + "scope": 2778, + "src": "7529:59:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2771, + "nodeType": "StructuredDocumentation", + "src": "7594:49:27", + "text": "@notice Returns the current NFT token holders" + }, + "functionSelector": "606a6b76", + "id": 2777, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "7657:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2772, + "nodeType": "ParameterList", + "parameters": [], + "src": "7674:2:27" + }, + "returnParameters": { + "id": 2776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2775, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2777, + "src": "7700:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7700:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2774, + "nodeType": "ArrayTypeName", + "src": "7700:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7699:18:27" + }, + "scope": 2778, + "src": "7648:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2779, + "src": "134:7586:27", + "usedErrors": [] + } + ], + "src": "31:7690:27" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\n\n/// @dev Provides core schedule functionality. I.e. dates, periods, etc\ncontract ElectionSchedule is ElectionBase {\n /// @dev Used to allow certain functions to only operate within a given period\n modifier onlyInPeriod(ElectionPeriod period) {\n _onlyInPeriod(period);\n\n _;\n }\n\n function _onlyInPeriod(ElectionPeriod period) private view {\n if (_getCurrentPeriod() != period) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Only allow to run in any of the given two periods\n modifier onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) {\n _onlyInPeriods(period1, period2);\n\n _;\n }\n\n function _onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) private view {\n ElectionPeriod currentPeriod = _getCurrentPeriod();\n\n if (currentPeriod != period1 && currentPeriod != period2) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Determines the current period type according to the current time and the epoch's dates\n function _getCurrentPeriod() internal view returns (ElectionPeriod) {\n if (!_electionStore().initialized) {\n revert InitError.NotInitialized();\n }\n\n EpochData storage epoch = _getCurrentEpoch();\n\n uint64 currentTime = uint64(block.timestamp);\n\n if (currentTime >= epoch.endDate) {\n return ElectionPeriod.Evaluation;\n }\n\n if (currentTime >= epoch.votingPeriodStartDate) {\n return ElectionPeriod.Vote;\n }\n\n if (currentTime >= epoch.nominationPeriodStartDate) {\n return ElectionPeriod.Nomination;\n }\n\n return ElectionPeriod.Administration;\n }\n\n /// @dev Sets dates within an epoch, with validations\n function _configureEpochSchedule(\n EpochData storage epoch,\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n _validateEpochSchedule(epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n epoch.startDate = epochStartDate;\n epoch.nominationPeriodStartDate = nominationPeriodStartDate;\n epoch.votingPeriodStartDate = votingPeriodStartDate;\n epoch.endDate = epochEndDate;\n }\n\n /// @dev Ensures epoch dates are in the correct order, durations are above minimums, etc\n function _validateEpochSchedule(\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) private view {\n if (\n epochEndDate <= votingPeriodStartDate ||\n votingPeriodStartDate <= nominationPeriodStartDate ||\n nominationPeriodStartDate <= epochStartDate\n ) {\n revert InvalidEpochConfiguration();\n }\n\n uint64 epochDuration = epochEndDate - epochStartDate;\n uint64 votingPeriodDuration = epochEndDate - votingPeriodStartDate;\n uint64 nominationPeriodDuration = votingPeriodStartDate - nominationPeriodStartDate;\n\n ElectionSettings storage settings = _electionSettings();\n\n if (\n epochDuration < settings.minEpochDuration ||\n nominationPeriodDuration < settings.minNominationPeriodDuration ||\n votingPeriodDuration < settings.minVotingPeriodDuration\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n /// @dev Changes epoch dates, with validations\n function _adjustEpochSchedule(\n EpochData storage epoch,\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate,\n bool ensureChangesAreSmall\n ) internal {\n uint64 maxDateAdjustmentTolerance = _electionSettings().maxDateAdjustmentTolerance;\n ElectionPeriod initialPeriod = _getCurrentPeriod();\n\n if (ensureChangesAreSmall) {\n if (\n _uint64AbsDifference(newEpochEndDate, epoch.endDate) > maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newNominationPeriodStartDate, epoch.nominationPeriodStartDate) >\n maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newVotingPeriodStartDate, epoch.votingPeriodStartDate) > maxDateAdjustmentTolerance\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n _configureEpochSchedule(\n epoch,\n epoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n\n if (_getCurrentPeriod() != initialPeriod) {\n revert ChangesCurrentPeriod();\n }\n }\n\n /// @dev Moves schedule forward to immediately jump to the nomination period\n function _jumpToNominationPeriod() internal {\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 nominationPeriodDuration = _getNominationPeriodDuration(currentEpoch);\n uint64 votingPeriodDuration = _getVotingPeriodDuration(currentEpoch);\n\n // Keep the previous durations, but shift everything back\n // so that nominations start now\n uint64 newNominationPeriodStartDate = uint64(block.timestamp);\n uint64 newVotingPeriodStartDate = newNominationPeriodStartDate + nominationPeriodDuration;\n uint64 newEpochEndDate = newVotingPeriodStartDate + votingPeriodDuration;\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n }\n\n /// @dev Copies the current epoch schedule to the next epoch, maintaining durations\n function _copyScheduleFromPreviousEpoch() internal {\n EpochData storage previousEpoch = _getPreviousEpoch();\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 currentEpochStartDate = uint64(block.timestamp);\n uint64 currentEpochEndDate = currentEpochStartDate + _getEpochDuration(previousEpoch);\n uint64 currentVotingPeriodStartDate = currentEpochEndDate - _getVotingPeriodDuration(previousEpoch);\n uint64 currentNominationPeriodStartDate = currentVotingPeriodStartDate - _getNominationPeriodDuration(previousEpoch);\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpochStartDate,\n currentNominationPeriodStartDate,\n currentVotingPeriodStartDate,\n currentEpochEndDate\n );\n }\n\n /// @dev Sets the minimum epoch durations, with validations\n function _setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) internal {\n ElectionSettings storage settings = _electionSettings();\n\n if (newMinNominationPeriodDuration == 0 || newMinVotingPeriodDuration == 0 || newMinEpochDuration == 0) {\n revert InvalidElectionSettings();\n }\n\n settings.minNominationPeriodDuration = newMinNominationPeriodDuration;\n settings.minVotingPeriodDuration = newMinVotingPeriodDuration;\n settings.minEpochDuration = newMinEpochDuration;\n }\n\n function _uint64AbsDifference(uint64 valueA, uint64 valueB) private pure returns (uint64) {\n return valueA > valueB ? valueA - valueB : valueB - valueA;\n }\n\n function _getEpochDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.startDate;\n }\n\n function _getVotingPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.votingPeriodStartDate;\n }\n\n function _getNominationPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.votingPeriodStartDate - epoch.nominationPeriodStartDate;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "InitError": [ + 32 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5631, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5067, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:36" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5068, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 4684, + "src": "56:28:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 5069, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 33, + "src": "85:68:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5071, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "256:12:36" + }, + "id": 5072, + "nodeType": "InheritanceSpecifier", + "src": "256:12:36" + } + ], + "canonicalName": "ElectionSchedule", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5070, + "nodeType": "StructuredDocumentation", + "src": "155:72:36", + "text": "@dev Provides core schedule functionality. I.e. dates, periods, etc" + }, + "fullyImplemented": true, + "id": 5630, + "linearizedBaseContracts": [ + 5630, + 4683, + 4331 + ], + "name": "ElectionSchedule", + "nameLocation": "236:16:36", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 5083, + "nodeType": "Block", + "src": "403:50:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5079, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5076, + "src": "427:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5078, + "name": "_onlyInPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "413:13:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "413:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5081, + "nodeType": "ExpressionStatement", + "src": "413:21:36" + }, + { + "id": 5082, + "nodeType": "PlaceholderStatement", + "src": "445:1:36" + } + ] + }, + "documentation": { + "id": 5073, + "nodeType": "StructuredDocumentation", + "src": "275:78:36", + "text": "@dev Used to allow certain functions to only operate within a given period" + }, + "id": 5084, + "name": "onlyInPeriod", + "nameLocation": "367:12:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5076, + "mutability": "mutable", + "name": "period", + "nameLocation": "395:6:36", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "380:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5074, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "380:14:36" + }, + "referencedDeclaration": 4342, + "src": "380:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "379:23:36" + }, + "src": "358:95:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5099, + "nodeType": "Block", + "src": "518:111:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5090, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "532:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "532:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5092, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "532:29:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5098, + "nodeType": "IfStatement", + "src": "528:95:36", + "trueBody": { + "id": 5097, + "nodeType": "Block", + "src": "563:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5094, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "584:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "584:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5096, + "nodeType": "RevertStatement", + "src": "577:35:36" + } + ] + } + } + ] + }, + "id": 5100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriod", + "nameLocation": "468:13:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5087, + "mutability": "mutable", + "name": "period", + "nameLocation": "497:6:36", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "482:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5085, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "482:14:36" + }, + "referencedDeclaration": 4342, + "src": "482:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "481:23:36" + }, + "returnParameters": { + "id": 5089, + "nodeType": "ParameterList", + "parameters": [], + "src": "518:0:36" + }, + "scope": 5630, + "src": "459:170:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5115, + "nodeType": "Block", + "src": "769:61:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5110, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "794:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "id": 5111, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5107, + "src": "803:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5109, + "name": "_onlyInPeriods", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5144, + "src": "779:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod,enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "779:32:36" + }, + { + "id": 5114, + "nodeType": "PlaceholderStatement", + "src": "822:1:36" + } + ] + }, + "documentation": { + "id": 5101, + "nodeType": "StructuredDocumentation", + "src": "635:58:36", + "text": "@dev Only allow to run in any of the given two periods" + }, + "id": 5116, + "name": "onlyInPeriods", + "nameLocation": "707:13:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5104, + "mutability": "mutable", + "name": "period1", + "nameLocation": "736:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "721:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5103, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5102, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "721:14:36" + }, + "referencedDeclaration": 4342, + "src": "721:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5107, + "mutability": "mutable", + "name": "period2", + "nameLocation": "760:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "745:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5106, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5105, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "745:14:36" + }, + "referencedDeclaration": 4342, + "src": "745:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "720:48:36" + }, + "src": "698:132:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5143, + "nodeType": "Block", + "src": "921:195:36", + "statements": [ + { + "assignments": [ + 5127 + ], + "declarations": [ + { + "constant": false, + "id": 5127, + "mutability": "mutable", + "name": "currentPeriod", + "nameLocation": "946:13:36", + "nodeType": "VariableDeclaration", + "scope": 5143, + "src": "931:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5126, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5125, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "931:14:36" + }, + "referencedDeclaration": 4342, + "src": "931:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5130, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5128, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "962:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "962:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "931:50:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5131, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "996:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5132, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "1013:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "996:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5134, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "1024:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5135, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5122, + "src": "1041:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "1024:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "996:52:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5142, + "nodeType": "IfStatement", + "src": "992:118:36", + "trueBody": { + "id": 5141, + "nodeType": "Block", + "src": "1050:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5138, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "1071:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1071:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5140, + "nodeType": "RevertStatement", + "src": "1064:35:36" + } + ] + } + } + ] + }, + "id": 5144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriods", + "nameLocation": "845:14:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "period1", + "nameLocation": "875:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "860:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5118, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5117, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "860:14:36" + }, + "referencedDeclaration": 4342, + "src": "860:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5122, + "mutability": "mutable", + "name": "period2", + "nameLocation": "899:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "884:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5121, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5120, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "884:14:36" + }, + "referencedDeclaration": 4342, + "src": "884:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "859:48:36" + }, + "returnParameters": { + "id": 5124, + "nodeType": "ParameterList", + "parameters": [], + "src": "921:0:36" + }, + "scope": 5630, + "src": "836:280:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5206, + "nodeType": "Block", + "src": "1290:595:36", + "statements": [ + { + "condition": { + "id": 5154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1304:29:36", + "subExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5151, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1305:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1305:16:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "1305:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5161, + "nodeType": "IfStatement", + "src": "1300:93:36", + "trueBody": { + "id": 5160, + "nodeType": "Block", + "src": "1335:58:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5155, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1356:9:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 5157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "1356:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1356:26:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5159, + "nodeType": "RevertStatement", + "src": "1349:33:36" + } + ] + } + }, + { + "assignments": [ + 5164 + ], + "declarations": [ + { + "constant": false, + "id": 5164, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "1421:5:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1403:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5163, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5162, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1403:9:36" + }, + "referencedDeclaration": 4270, + "src": "1403:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5167, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5165, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "1429:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1403:44:36" + }, + { + "assignments": [ + 5169 + ], + "declarations": [ + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "currentTime", + "nameLocation": "1465:11:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1458:18:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5168, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1458:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5175, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5172, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1486:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1486:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1479:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5170, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1479:6:36", + "typeDescriptions": {} + } + }, + "id": 5174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1479:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1458:44:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5176, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1517:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5177, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1532:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "1532:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1517:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5184, + "nodeType": "IfStatement", + "src": "1513:91:36", + "trueBody": { + "id": 5183, + "nodeType": "Block", + "src": "1547:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5180, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1568:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "1568:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5182, + "nodeType": "Return", + "src": "1561:32:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5185, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1618:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5186, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1633:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "1633:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1618:42:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5193, + "nodeType": "IfStatement", + "src": "1614:99:36", + "trueBody": { + "id": 5192, + "nodeType": "Block", + "src": "1662:51:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5189, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1683:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "1683:19:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5191, + "nodeType": "Return", + "src": "1676:26:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5194, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1727:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5195, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1742:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "1742:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1727:46:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5202, + "nodeType": "IfStatement", + "src": "1723:109:36", + "trueBody": { + "id": 5201, + "nodeType": "Block", + "src": "1775:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5198, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1796:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "1796:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5200, + "nodeType": "Return", + "src": "1789:32:36" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 5203, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1849:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "1849:29:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5205, + "nodeType": "Return", + "src": "1842:36:36" + } + ] + }, + "documentation": { + "id": 5145, + "nodeType": "StructuredDocumentation", + "src": "1122:95:36", + "text": "@dev Determines the current period type according to the current time and the epoch's dates" + }, + "id": 5207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentPeriod", + "nameLocation": "1231:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5146, + "nodeType": "ParameterList", + "parameters": [], + "src": "1248:2:36" + }, + "returnParameters": { + "id": 5150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5149, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5207, + "src": "1274:14:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5148, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5147, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "1274:14:36" + }, + "referencedDeclaration": 4342, + "src": "1274:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "1273:16:36" + }, + "scope": 5630, + "src": "1222:663:36", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5253, + "nodeType": "Block", + "src": "2170:330:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5223, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2203:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5224, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2219:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5225, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2246:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5226, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2269:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5222, + "name": "_validateEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "2180:22:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64,uint64) view" + } + }, + "id": 5227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2180:102:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5228, + "nodeType": "ExpressionStatement", + "src": "2180:102:36" + }, + { + "expression": { + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5229, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2293:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "2293:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5232, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2311:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2293:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5234, + "nodeType": "ExpressionStatement", + "src": "2293:32:36" + }, + { + "expression": { + "id": 5239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5235, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2335:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "2335:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5238, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2369:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2335:59:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5240, + "nodeType": "ExpressionStatement", + "src": "2335:59:36" + }, + { + "expression": { + "id": 5245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5241, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2404:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "2404:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5244, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2434:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2404:51:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5246, + "nodeType": "ExpressionStatement", + "src": "2404:51:36" + }, + { + "expression": { + "id": 5251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5247, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2465:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "2465:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5250, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2481:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2465:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5252, + "nodeType": "ExpressionStatement", + "src": "2465:28:36" + } + ] + }, + "documentation": { + "id": 5208, + "nodeType": "StructuredDocumentation", + "src": "1891:53:36", + "text": "@dev Sets dates within an epoch, with validations" + }, + "id": 5254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_configureEpochSchedule", + "nameLocation": "1958:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5211, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "2009:5:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "1991:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5210, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5209, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1991:9:36" + }, + "referencedDeclaration": 4270, + "src": "1991:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5213, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2031:14:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2024:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5212, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2024:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5215, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2062:25:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2055:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5214, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2055:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5217, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2104:21:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2097:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5216, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2097:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5219, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2142:12:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2135:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2135:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1981:179:36" + }, + "returnParameters": { + "id": 5221, + "nodeType": "ParameterList", + "parameters": [], + "src": "2170:0:36" + }, + "scope": 5630, + "src": "1949:551:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5325, + "nodeType": "Block", + "src": "2790:851:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5266, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "2817:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5267, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2833:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2817:37:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5269, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2870:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5270, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2895:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2870:50:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:103:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5273, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2936:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5274, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "2965:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2936:43:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:162:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5281, + "nodeType": "IfStatement", + "src": "2800:249:36", + "trueBody": { + "id": 5280, + "nodeType": "Block", + "src": "2990:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5277, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3011:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3011:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5279, + "nodeType": "RevertStatement", + "src": "3004:34:36" + } + ] + } + }, + { + "assignments": [ + 5283 + ], + "declarations": [ + { + "constant": false, + "id": 5283, + "mutability": "mutable", + "name": "epochDuration", + "nameLocation": "3066:13:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3059:20:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5282, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3059:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5284, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3082:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5285, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "3097:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3082:29:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3059:52:36" + }, + { + "assignments": [ + 5289 + ], + "declarations": [ + { + "constant": false, + "id": 5289, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "3128:20:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3121:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5288, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3121:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5293, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5290, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3151:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5291, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3166:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3151:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3121:66:36" + }, + { + "assignments": [ + 5295 + ], + "declarations": [ + { + "constant": false, + "id": 5295, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "3204:24:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3197:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5294, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3197:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5299, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5296, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3231:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5297, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "3255:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3231:49:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3197:83:36" + }, + { + "assignments": [ + 5302 + ], + "declarations": [ + { + "constant": false, + "id": 5302, + "mutability": "mutable", + "name": "settings", + "nameLocation": "3316:8:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3291:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5301, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5300, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3291:16:36" + }, + "referencedDeclaration": 4261, + "src": "3291:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5305, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5303, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3327:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3327:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3291:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5306, + "name": "epochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3374:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5307, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3390:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "3390:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3374:41:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5310, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5295, + "src": "3431:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5311, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3458:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "3458:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3431:63:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:120:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5315, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "3510:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5316, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3533:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "3533:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3510:55:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:191:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5324, + "nodeType": "IfStatement", + "src": "3357:278:36", + "trueBody": { + "id": 5323, + "nodeType": "Block", + "src": "3576:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5320, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3597:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3597:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5322, + "nodeType": "RevertStatement", + "src": "3590:34:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5255, + "nodeType": "StructuredDocumentation", + "src": "2506:88:36", + "text": "@dev Ensures epoch dates are in the correct order, durations are above minimums, etc" + }, + "id": 5326, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateEpochSchedule", + "nameLocation": "2608:22:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5257, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2647:14:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2640:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5256, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2640:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5259, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2678:25:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2671:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5258, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2671:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5261, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2720:21:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2713:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5260, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2713:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5263, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2758:12:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2751:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2751:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2630:146:36" + }, + "returnParameters": { + "id": 5265, + "nodeType": "ParameterList", + "parameters": [], + "src": "2790:0:36" + }, + "scope": 5630, + "src": "2599:1042:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5402, + "nodeType": "Block", + "src": "3930:983:36", + "statements": [ + { + "assignments": [ + 5342 + ], + "declarations": [ + { + "constant": false, + "id": 5342, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "3947:26:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "3940:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5341, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3940:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5346, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5343, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3976:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3976:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "3976:46:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3940:82:36" + }, + { + "assignments": [ + 5349 + ], + "declarations": [ + { + "constant": false, + "id": 5349, + "mutability": "mutable", + "name": "initialPeriod", + "nameLocation": "4047:13:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "4032:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5348, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5347, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "4032:14:36" + }, + "referencedDeclaration": 4342, + "src": "4032:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5352, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5350, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4063:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4063:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4032:50:36" + }, + { + "condition": { + "id": 5353, + "name": "ensureChangesAreSmall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5338, + "src": "4097:21:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5383, + "nodeType": "IfStatement", + "src": "4093:507:36", + "trueBody": { + "id": 5382, + "nodeType": "Block", + "src": "4120:480:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5355, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4176:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5356, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4193:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5357, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "4193:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5354, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4155:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4155:52:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5359, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4210:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4155:81:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5362, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4277:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5363, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4307:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5364, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "4307:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5361, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4256:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4256:83:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5366, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4358:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4256:128:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:229:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5370, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4425:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5371, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4451:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "4451:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5369, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4404:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4404:75:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5374, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4482:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4404:104:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:353:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5381, + "nodeType": "IfStatement", + "src": "4134:456:36", + "trueBody": { + "id": 5380, + "nodeType": "Block", + "src": "4523:67:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5377, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "4548:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4548:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5379, + "nodeType": "RevertStatement", + "src": "4541:34:36" + } + ] + } + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5385, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4647:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5386, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4666:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5387, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "4666:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5388, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4695:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5389, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4737:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5390, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4775:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5384, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "4610:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4610:190:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5392, + "nodeType": "ExpressionStatement", + "src": "4610:190:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5393, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4815:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4815:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5395, + "name": "initialPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5349, + "src": "4838:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "4815:36:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5401, + "nodeType": "IfStatement", + "src": "4811:96:36", + "trueBody": { + "id": 5400, + "nodeType": "Block", + "src": "4853:54:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5397, + "name": "ChangesCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4366, + "src": "4874:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4874:22:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5399, + "nodeType": "RevertStatement", + "src": "4867:29:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5327, + "nodeType": "StructuredDocumentation", + "src": "3647:46:36", + "text": "@dev Changes epoch dates, with validations" + }, + "id": 5403, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_adjustEpochSchedule", + "nameLocation": "3707:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5330, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "3755:5:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3737:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5329, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5328, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3737:9:36" + }, + "referencedDeclaration": 4270, + "src": "3737:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3777:28:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3770:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3770:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5334, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3822:24:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3815:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5333, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3815:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5336, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3863:15:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3856:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5335, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3856:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5338, + "mutability": "mutable", + "name": "ensureChangesAreSmall", + "nameLocation": "3893:21:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3888:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5337, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3888:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3727:193:36" + }, + "returnParameters": { + "id": 5340, + "nodeType": "ParameterList", + "parameters": [], + "src": "3930:0:36" + }, + "scope": 5630, + "src": "3698:1215:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5454, + "nodeType": "Block", + "src": "5044:808:36", + "statements": [ + { + "assignments": [ + 5409 + ], + "declarations": [ + { + "constant": false, + "id": 5409, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "5072:12:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5054:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5408, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5407, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "5054:9:36" + }, + "referencedDeclaration": 4270, + "src": "5054:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5412, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5410, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "5087:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5054:51:36" + }, + { + "assignments": [ + 5414 + ], + "declarations": [ + { + "constant": false, + "id": 5414, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "5123:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5116:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5413, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5116:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5418, + "initialValue": { + "arguments": [ + { + "id": 5416, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5179:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5415, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "5150:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5150:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5116:76:36" + }, + { + "assignments": [ + 5420 + ], + "declarations": [ + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "5209:20:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5202:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5419, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5202:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5424, + "initialValue": { + "arguments": [ + { + "id": 5422, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5257:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5421, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "5232:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:38:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5202:68:36" + }, + { + "assignments": [ + 5426 + ], + "declarations": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "5395:28:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5388:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5425, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5388:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5432, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5429, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "5433:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "5433:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5426:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5427, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5426:6:36", + "typeDescriptions": {} + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5426:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5388:61:36" + }, + { + "assignments": [ + 5434 + ], + "declarations": [ + { + "constant": false, + "id": 5434, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "5466:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5459:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5433, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5459:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5438, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5435, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5493:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5436, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5414, + "src": "5524:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5493:55:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5459:89:36" + }, + { + "assignments": [ + 5440 + ], + "declarations": [ + { + "constant": false, + "id": 5440, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "5565:15:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5558:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5439, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5558:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5444, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5441, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5583:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5442, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "5610:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5583:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5558:72:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5446, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5678:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5447, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5704:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5448, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "5704:22:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5449, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5740:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5450, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5782:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5451, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5440, + "src": "5820:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5445, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "5641:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5641:204:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5453, + "nodeType": "ExpressionStatement", + "src": "5641:204:36" + } + ] + }, + "documentation": { + "id": 5404, + "nodeType": "StructuredDocumentation", + "src": "4919:76:36", + "text": "@dev Moves schedule forward to immediately jump to the nomination period" + }, + "id": 5455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_jumpToNominationPeriod", + "nameLocation": "5009:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5405, + "nodeType": "ParameterList", + "parameters": [], + "src": "5032:2:36" + }, + "returnParameters": { + "id": 5406, + "nodeType": "ParameterList", + "parameters": [], + "src": "5044:0:36" + }, + "scope": 5630, + "src": "5000:852:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5511, + "nodeType": "Block", + "src": "5997:752:36", + "statements": [ + { + "assignments": [ + 5461 + ], + "declarations": [ + { + "constant": false, + "id": 5461, + "mutability": "mutable", + "name": "previousEpoch", + "nameLocation": "6025:13:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6007:31:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5460, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5459, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6007:9:36" + }, + "referencedDeclaration": 4270, + "src": "6007:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5464, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5462, + "name": "_getPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4562, + "src": "6041:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6041:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6007:53:36" + }, + { + "assignments": [ + 5467 + ], + "declarations": [ + { + "constant": false, + "id": 5467, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "6088:12:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6070:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5466, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5465, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6070:9:36" + }, + "referencedDeclaration": 4270, + "src": "6070:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5470, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5468, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "6103:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6103:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6070:51:36" + }, + { + "assignments": [ + 5472 + ], + "declarations": [ + { + "constant": false, + "id": 5472, + "mutability": "mutable", + "name": "currentEpochStartDate", + "nameLocation": "6139:21:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6132:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5471, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6132:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5478, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6170:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "6170:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6163:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5473, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6163:6:36", + "typeDescriptions": {} + } + }, + "id": 5477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6132:54:36" + }, + { + "assignments": [ + 5480 + ], + "declarations": [ + { + "constant": false, + "id": 5480, + "mutability": "mutable", + "name": "currentEpochEndDate", + "nameLocation": "6203:19:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6196:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5479, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6196:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5486, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5481, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6225:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 5483, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6267:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5482, + "name": "_getEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5599, + "src": "6249:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6249:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6225:56:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6196:85:36" + }, + { + "assignments": [ + 5488 + ], + "declarations": [ + { + "constant": false, + "id": 5488, + "mutability": "mutable", + "name": "currentVotingPeriodStartDate", + "nameLocation": "6298:28:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6291:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5487, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6291:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5494, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5489, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6329:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5491, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6376:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5490, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "6351:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:39:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6329:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6291:99:36" + }, + { + "assignments": [ + 5496 + ], + "declarations": [ + { + "constant": false, + "id": 5496, + "mutability": "mutable", + "name": "currentNominationPeriodStartDate", + "nameLocation": "6407:32:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6400:39:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5495, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6400:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5502, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5497, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6442:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5499, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6502:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5498, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "6473:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6473:43:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6442:74:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6400:116:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5504, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5467, + "src": "6564:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 5505, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6590:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5506, + "name": "currentNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "6625:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5507, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6671:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5508, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6713:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5503, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "6527:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6527:215:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5510, + "nodeType": "ExpressionStatement", + "src": "6527:215:36" + } + ] + }, + "documentation": { + "id": 5456, + "nodeType": "StructuredDocumentation", + "src": "5858:83:36", + "text": "@dev Copies the current epoch schedule to the next epoch, maintaining durations" + }, + "id": 5512, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_copyScheduleFromPreviousEpoch", + "nameLocation": "5955:30:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5985:2:36" + }, + "returnParameters": { + "id": 5458, + "nodeType": "ParameterList", + "parameters": [], + "src": "5997:0:36" + }, + "scope": 5630, + "src": "5946:803:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5562, + "nodeType": "Block", + "src": "6991:451:36", + "statements": [ + { + "assignments": [ + 5524 + ], + "declarations": [ + { + "constant": false, + "id": 5524, + "mutability": "mutable", + "name": "settings", + "nameLocation": "7026:8:36", + "nodeType": "VariableDeclaration", + "scope": 5562, + "src": "7001:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5523, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5522, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "7001:16:36" + }, + "referencedDeclaration": 4261, + "src": "7001:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5527, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5525, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7037:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7001:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5528, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7071:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7105:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7071:35:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5531, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7110:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7110:31:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:70:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5535, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7145:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7168:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7145:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:98:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5543, + "nodeType": "IfStatement", + "src": "7067:161:36", + "trueBody": { + "id": 5542, + "nodeType": "Block", + "src": "7171:57:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5539, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "7192:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5541, + "nodeType": "RevertStatement", + "src": "7185:32:36" + } + ] + } + }, + { + "expression": { + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5544, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7238:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "7238:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5547, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7277:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7238:69:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5549, + "nodeType": "ExpressionStatement", + "src": "7238:69:36" + }, + { + "expression": { + "id": 5554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5550, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7317:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5552, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "7317:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5553, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7352:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7317:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5555, + "nodeType": "ExpressionStatement", + "src": "7317:61:36" + }, + { + "expression": { + "id": 5560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5556, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7388:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "7388:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5559, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7416:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7388:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5561, + "nodeType": "ExpressionStatement", + "src": "7388:47:36" + } + ] + }, + "documentation": { + "id": 5513, + "nodeType": "StructuredDocumentation", + "src": "6755:59:36", + "text": "@dev Sets the minimum epoch durations, with validations" + }, + "id": 5563, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setMinEpochDurations", + "nameLocation": "6828:21:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5515, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "6866:30:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6859:37:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5514, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6859:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "6913:26:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6906:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5516, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6906:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5519, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "6956:19:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6949:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5518, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6949:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "6849:132:36" + }, + "returnParameters": { + "id": 5521, + "nodeType": "ParameterList", + "parameters": [], + "src": "6991:0:36" + }, + "scope": 5630, + "src": "6819:623:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5583, + "nodeType": "Block", + "src": "7538:75:36", + "statements": [ + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5572, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5573, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7564:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7555:15:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5578, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7591:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5579, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7600:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7591:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "7555:51:36", + "trueExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5575, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7573:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5576, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7582:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7573:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5571, + "id": 5582, + "nodeType": "Return", + "src": "7548:58:36" + } + ] + }, + "id": 5584, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_uint64AbsDifference", + "nameLocation": "7457:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5565, + "mutability": "mutable", + "name": "valueA", + "nameLocation": "7485:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7478:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5564, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7478:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5567, + "mutability": "mutable", + "name": "valueB", + "nameLocation": "7500:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7493:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5566, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7493:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7477:30:36" + }, + "returnParameters": { + "id": 5571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5570, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7530:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5569, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7530:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7529:8:36" + }, + "scope": 5630, + "src": "7448:165:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5598, + "nodeType": "Block", + "src": "7701:55:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5592, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7718:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7718:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5594, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7734:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "7734:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7718:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5591, + "id": 5597, + "nodeType": "Return", + "src": "7711:38:36" + } + ] + }, + "id": 5599, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochDuration", + "nameLocation": "7628:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5587, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7664:5:36", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7646:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5586, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5585, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7646:9:36" + }, + "referencedDeclaration": 4270, + "src": "7646:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7645:25:36" + }, + "returnParameters": { + "id": 5591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5590, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7693:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5589, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7693:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7692:8:36" + }, + "scope": 5630, + "src": "7619:137:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5613, + "nodeType": "Block", + "src": "7851:67:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5607, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7868:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7868:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5609, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7884:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "7884:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7868:43:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5606, + "id": 5612, + "nodeType": "Return", + "src": "7861:50:36" + } + ] + }, + "id": 5614, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotingPeriodDuration", + "nameLocation": "7771:24:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5602, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7814:5:36", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7796:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5601, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5600, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7796:9:36" + }, + "referencedDeclaration": 4270, + "src": "7796:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7795:25:36" + }, + "returnParameters": { + "id": 5606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5605, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7843:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5604, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7843:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7842:8:36" + }, + "scope": 5630, + "src": "7762:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5628, + "nodeType": "Block", + "src": "8017:85:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5622, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8034:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5623, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "8034:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5624, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8064:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "8064:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "8034:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5621, + "id": 5627, + "nodeType": "Return", + "src": "8027:68:36" + } + ] + }, + "id": 5629, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getNominationPeriodDuration", + "nameLocation": "7933:28:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5617, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7980:5:36", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "7962:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5616, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5615, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7962:9:36" + }, + "referencedDeclaration": 4270, + "src": "7962:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7961:25:36" + }, + "returnParameters": { + "id": 5621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5620, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "8009:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5619, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8009:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "8008:8:36" + }, + "scope": 5630, + "src": "7924:178:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5631, + "src": "227:7877:36", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:8074:36" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\n\n/// @dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()\ncontract ElectionTally is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _evaluateNextBallotBatch(uint numBallots) internal {\n if (numBallots == 0) {\n numBallots = _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n ElectionData storage election = _getCurrentElection();\n uint totalBallots = election.ballotIds.length;\n\n uint firstBallotIndex = election.numEvaluatedBallots;\n\n uint lastBallotIndex = firstBallotIndex + numBallots;\n if (lastBallotIndex > totalBallots) {\n lastBallotIndex = totalBallots;\n }\n\n _evaluateBallotRange(election, firstBallotIndex, lastBallotIndex);\n }\n\n function _evaluateBallotRange(\n ElectionData storage election,\n uint fromIndex,\n uint toIndex\n ) private {\n ElectionSettings storage settings = _electionSettings();\n uint numSeats = settings.nextEpochSeatCount;\n\n for (uint ballotIndex = fromIndex; ballotIndex < toIndex; ballotIndex++) {\n bytes32 ballotId = election.ballotIds[ballotIndex];\n BallotData storage ballot = election.ballotsById[ballotId];\n\n _evaluateBallot(election, ballot, numSeats);\n }\n }\n\n function _evaluateBallot(\n ElectionData storage election,\n BallotData storage ballot,\n uint numSeats\n ) internal {\n uint ballotVotes = ballot.votes;\n\n uint numCandidates = ballot.candidates.length;\n for (uint candidateIndex = 0; candidateIndex < numCandidates; candidateIndex++) {\n address candidate = ballot.candidates[candidateIndex];\n\n uint currentCandidateVotes = election.candidateVotes[candidate];\n uint newCandidateVotes = currentCandidateVotes + ballotVotes;\n election.candidateVotes[candidate] = newCandidateVotes;\n\n _updateWinnerSet(election, candidate, newCandidateVotes, numSeats);\n }\n\n election.numEvaluatedBallots += 1;\n }\n\n function _updateWinnerSet(\n ElectionData storage election,\n address candidate,\n uint candidateVotes,\n uint numSeats\n ) private {\n SetUtil.AddressSet storage winners = election.winners;\n\n // Already a winner?\n if (winners.contains(candidate)) {\n return;\n }\n\n // Just take first empty seat if\n // the set is not complete yet.\n if (winners.length() < numSeats) {\n winners.add(candidate);\n\n return;\n }\n\n // Otherwise, replace the winner with the least votes\n // in the set.\n (address leastVotedWinner, uint leastVotes) = _findWinnerWithLeastVotes(election, winners);\n\n if (candidateVotes > leastVotes) {\n winners.replace(leastVotedWinner, candidate);\n }\n }\n\n function _findWinnerWithLeastVotes(ElectionData storage election, SetUtil.AddressSet storage winners)\n private\n view\n returns (address leastVotedWinner, uint leastVotes)\n {\n leastVotes = type(uint).max;\n\n uint numWinners = winners.length();\n\n for (uint8 winnerPosition = 1; winnerPosition <= numWinners; winnerPosition++) {\n address winner = winners.valueAt(winnerPosition);\n uint winnerVotes = election.candidateVotes[winner];\n\n if (winnerVotes < leastVotes) {\n leastVotes = winnerVotes;\n\n leastVotedWinner = winner;\n }\n }\n\n return (leastVotedWinner, leastVotes);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5962, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5632, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:37" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5633, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5962, + "sourceUnit": 4684, + "src": "56:28:37", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5635, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "211:12:37" + }, + "id": 5636, + "nodeType": "InheritanceSpecifier", + "src": "211:12:37" + } + ], + "canonicalName": "ElectionTally", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5634, + "nodeType": "StructuredDocumentation", + "src": "86:99:37", + "text": "@dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()" + }, + "fullyImplemented": true, + "id": 5961, + "linearizedBaseContracts": [ + 5961, + 4683, + 4331 + ], + "name": "ElectionTally", + "nameLocation": "194:13:37", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5640, + "libraryName": { + "id": 5637, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "236:7:37" + }, + "nodeType": "UsingForDirective", + "src": "230:37:37", + "typeName": { + "id": 5639, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5638, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "248:18:37" + }, + "referencedDeclaration": 1788, + "src": "248:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 5694, + "nodeType": "Block", + "src": "333:548:37", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5645, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "347:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "361:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "347:15:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5655, + "nodeType": "IfStatement", + "src": "343:111:37", + "trueBody": { + "id": 5654, + "nodeType": "Block", + "src": "364:90:37", + "statements": [ + { + "expression": { + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5648, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "378:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5649, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "391:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "391:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5651, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "391:52:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "378:65:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5653, + "nodeType": "ExpressionStatement", + "src": "378:65:37" + } + ] + } + }, + { + "assignments": [ + 5658 + ], + "declarations": [ + { + "constant": false, + "id": 5658, + "mutability": "mutable", + "name": "election", + "nameLocation": "485:8:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "464:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5657, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5656, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "464:12:37" + }, + "referencedDeclaration": 4299, + "src": "464:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 5661, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5659, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "496:19:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 5660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "496:21:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "464:53:37" + }, + { + "assignments": [ + 5663 + ], + "declarations": [ + { + "constant": false, + "id": 5663, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "532:12:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "527:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5662, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "527:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5667, + "initialValue": { + "expression": { + "expression": { + "id": 5664, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "547:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "547:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "547:25:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "527:45:37" + }, + { + "assignments": [ + 5669 + ], + "declarations": [ + { + "constant": false, + "id": 5669, + "mutability": "mutable", + "name": "firstBallotIndex", + "nameLocation": "588:16:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "583:21:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5668, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "583:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5672, + "initialValue": { + "expression": { + "id": 5670, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "607:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "607:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "583:52:37" + }, + { + "assignments": [ + 5674 + ], + "declarations": [ + { + "constant": false, + "id": 5674, + "mutability": "mutable", + "name": "lastBallotIndex", + "nameLocation": "651:15:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "646:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5673, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5678, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5675, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "669:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5676, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "688:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "669:29:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "646:52:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5679, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "712:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5680, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "730:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "712:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5687, + "nodeType": "IfStatement", + "src": "708:91:37", + "trueBody": { + "id": 5686, + "nodeType": "Block", + "src": "744:55:37", + "statements": [ + { + "expression": { + "id": 5684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5682, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "758:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5683, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "776:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "758:30:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5685, + "nodeType": "ExpressionStatement", + "src": "758:30:37" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5689, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "830:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5690, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "840:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5691, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "858:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5688, + "name": "_evaluateBallotRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5750, + "src": "809:20:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,uint256,uint256)" + } + }, + "id": 5692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "809:65:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5693, + "nodeType": "ExpressionStatement", + "src": "809:65:37" + } + ] + }, + "id": 5695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateNextBallotBatch", + "nameLocation": "282:24:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5642, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "312:10:37", + "nodeType": "VariableDeclaration", + "scope": 5695, + "src": "307:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "307:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "306:17:37" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [], + "src": "333:0:37" + }, + "scope": 5961, + "src": "273:608:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5749, + "nodeType": "Block", + "src": "1016:413:37", + "statements": [ + { + "assignments": [ + 5707 + ], + "declarations": [ + { + "constant": false, + "id": 5707, + "mutability": "mutable", + "name": "settings", + "nameLocation": "1051:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1026:33:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5706, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5705, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1026:16:37" + }, + "referencedDeclaration": 4261, + "src": "1026:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5708, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "1062:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1062:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1026:55:37" + }, + { + "assignments": [ + 5712 + ], + "declarations": [ + { + "constant": false, + "id": 5712, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1096:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1091:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1091:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5715, + "initialValue": { + "expression": { + "id": 5713, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5707, + "src": "1107:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5714, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "1107:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1091:43:37" + }, + { + "body": { + "id": 5747, + "nodeType": "Block", + "src": "1218:205:37", + "statements": [ + { + "assignments": [ + 5727 + ], + "declarations": [ + { + "constant": false, + "id": 5727, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1240:8:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1232:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5726, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1232:7:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 5732, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5728, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1251:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1251:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5731, + "indexExpression": { + "id": 5730, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1270:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1251:31:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1232:50:37" + }, + { + "assignments": [ + 5735 + ], + "declarations": [ + { + "constant": false, + "id": 5735, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1315:6:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1296:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5734, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5733, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1296:10:37" + }, + "referencedDeclaration": 4309, + "src": "1296:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 5740, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5736, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1324:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5737, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "1324:20:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 5739, + "indexExpression": { + "id": 5738, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5727, + "src": "1345:8:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1324:30:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1296:58:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5742, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1385:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5743, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5735, + "src": "1395:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + { + "id": 5744, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5712, + "src": "1403:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5741, + "name": "_evaluateBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5826, + "src": "1369:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_BallotData_$4309_storage_ptr_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct ElectionStorage.BallotData storage pointer,uint256)" + } + }, + "id": 5745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1369:43:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5746, + "nodeType": "ExpressionStatement", + "src": "1369:43:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5720, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1180:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5721, + "name": "toIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5702, + "src": "1194:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1180:21:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5748, + "initializationExpression": { + "assignments": [ + 5717 + ], + "declarations": [ + { + "constant": false, + "id": 5717, + "mutability": "mutable", + "name": "ballotIndex", + "nameLocation": "1155:11:37", + "nodeType": "VariableDeclaration", + "scope": 5748, + "src": "1150:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5716, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1150:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5719, + "initialValue": { + "id": 5718, + "name": "fromIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5700, + "src": "1169:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1150:28:37" + }, + "loopExpression": { + "expression": { + "id": 5724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1203:13:37", + "subExpression": { + "id": 5723, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1203:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5725, + "nodeType": "ExpressionStatement", + "src": "1203:13:37" + }, + "nodeType": "ForStatement", + "src": "1145:278:37" + } + ] + }, + "id": 5750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallotRange", + "nameLocation": "896:20:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5698, + "mutability": "mutable", + "name": "election", + "nameLocation": "947:8:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "926:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5697, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5696, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "926:12:37" + }, + "referencedDeclaration": 4299, + "src": "926:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5700, + "mutability": "mutable", + "name": "fromIndex", + "nameLocation": "970:9:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "965:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5699, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "965:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5702, + "mutability": "mutable", + "name": "toIndex", + "nameLocation": "994:7:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "989:12:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "989:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "916:91:37" + }, + "returnParameters": { + "id": 5704, + "nodeType": "ParameterList", + "parameters": [], + "src": "1016:0:37" + }, + "scope": 5961, + "src": "887:542:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5825, + "nodeType": "Block", + "src": "1572:616:37", + "statements": [ + { + "assignments": [ + 5762 + ], + "declarations": [ + { + "constant": false, + "id": 5762, + "mutability": "mutable", + "name": "ballotVotes", + "nameLocation": "1587:11:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1582:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5761, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1582:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5765, + "initialValue": { + "expression": { + "id": 5763, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1601:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5764, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1601:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1582:31:37" + }, + { + "assignments": [ + 5767 + ], + "declarations": [ + { + "constant": false, + "id": 5767, + "mutability": "mutable", + "name": "numCandidates", + "nameLocation": "1629:13:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1624:18:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5766, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1624:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5771, + "initialValue": { + "expression": { + "expression": { + "id": 5768, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1645:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1645:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1645:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1624:45:37" + }, + { + "body": { + "id": 5817, + "nodeType": "Block", + "src": "1759:379:37", + "statements": [ + { + "assignments": [ + 5783 + ], + "declarations": [ + { + "constant": false, + "id": 5783, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1781:9:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1773:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1773:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5788, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5784, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1793:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1793:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5787, + "indexExpression": { + "id": 5786, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1811:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1793:33:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1773:53:37" + }, + { + "assignments": [ + 5790 + ], + "declarations": [ + { + "constant": false, + "id": 5790, + "mutability": "mutable", + "name": "currentCandidateVotes", + "nameLocation": "1846:21:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1841:26:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1841:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5795, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5791, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1870:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1870:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5794, + "indexExpression": { + "id": 5793, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "1894:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1870:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1841:63:37" + }, + { + "assignments": [ + 5797 + ], + "declarations": [ + { + "constant": false, + "id": 5797, + "mutability": "mutable", + "name": "newCandidateVotes", + "nameLocation": "1923:17:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1918:22:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5796, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1918:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5801, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5798, + "name": "currentCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5790, + "src": "1943:21:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5799, + "name": "ballotVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5762, + "src": "1967:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1943:35:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1918:60:37" + }, + { + "expression": { + "id": 5808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5802, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1992:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1992:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5806, + "indexExpression": { + "id": 5804, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2016:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1992:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5807, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2029:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1992:54:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5809, + "nodeType": "ExpressionStatement", + "src": "1992:54:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5811, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2078:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5812, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2088:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5813, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2099:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5814, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5758, + "src": "2118:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5810, + "name": "_updateWinnerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "2061:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,address,uint256,uint256)" + } + }, + "id": 5815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2061:66:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5816, + "nodeType": "ExpressionStatement", + "src": "2061:66:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5776, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1709:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5777, + "name": "numCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "1726:13:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1709:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5818, + "initializationExpression": { + "assignments": [ + 5773 + ], + "declarations": [ + { + "constant": false, + "id": 5773, + "mutability": "mutable", + "name": "candidateIndex", + "nameLocation": "1689:14:37", + "nodeType": "VariableDeclaration", + "scope": 5818, + "src": "1684:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1684:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5775, + "initialValue": { + "hexValue": "30", + "id": 5774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1706:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1684:23:37" + }, + "loopExpression": { + "expression": { + "id": 5780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1741:16:37", + "subExpression": { + "id": 5779, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1741:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5781, + "nodeType": "ExpressionStatement", + "src": "1741:16:37" + }, + "nodeType": "ForStatement", + "src": "1679:459:37" + }, + { + "expression": { + "id": 5823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5819, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2148:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "2148:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 5822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2180:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2148:33:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5824, + "nodeType": "ExpressionStatement", + "src": "2148:33:37" + } + ] + }, + "id": 5826, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallot", + "nameLocation": "1444:15:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5753, + "mutability": "mutable", + "name": "election", + "nameLocation": "1490:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1469:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5751, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1469:12:37" + }, + "referencedDeclaration": 4299, + "src": "1469:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5756, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1527:6:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1508:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5755, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5754, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1508:10:37" + }, + "referencedDeclaration": 4309, + "src": "1508:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5758, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1548:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1543:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5757, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1543:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1459:103:37" + }, + "returnParameters": { + "id": 5760, + "nodeType": "ParameterList", + "parameters": [], + "src": "1572:0:37" + }, + "scope": 5961, + "src": "1435:753:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5888, + "nodeType": "Block", + "src": "2352:663:37", + "statements": [ + { + "assignments": [ + 5842 + ], + "declarations": [ + { + "constant": false, + "id": 5842, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2389:7:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2362:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5841, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5840, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2362:18:37" + }, + "referencedDeclaration": 1788, + "src": "2362:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 5845, + "initialValue": { + "expression": { + "id": 5843, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2399:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2399:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2362:53:37" + }, + { + "condition": { + "arguments": [ + { + "id": 5848, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2476:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5846, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2459:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2459:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 5849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2459:27:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5852, + "nodeType": "IfStatement", + "src": "2455:64:37", + "trueBody": { + "id": 5851, + "nodeType": "Block", + "src": "2488:31:37", + "statements": [ + { + "functionReturnParameters": 5837, + "id": 5850, + "nodeType": "Return", + "src": "2502:7:37" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5853, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2614:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5854, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2614:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2614:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5856, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5835, + "src": "2633:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2614:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5866, + "nodeType": "IfStatement", + "src": "2610:101:37", + "trueBody": { + "id": 5865, + "nodeType": "Block", + "src": "2643:68:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5861, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2669:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5858, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2657:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2657:11:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 5862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2657:22:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5863, + "nodeType": "ExpressionStatement", + "src": "2657:22:37" + }, + { + "functionReturnParameters": 5837, + "id": 5864, + "nodeType": "Return", + "src": "2694:7:37" + } + ] + } + }, + { + "assignments": [ + 5868, + 5870 + ], + "declarations": [ + { + "constant": false, + "id": 5868, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "2815:16:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2807:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2807:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5870, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "2838:10:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2833:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2833:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5875, + "initialValue": { + "arguments": [ + { + "id": 5872, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2878:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5873, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2888:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + ], + "id": 5871, + "name": "_findWinnerWithLeastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5960, + "src": "2852:25:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_address_$_t_uint256_$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct SetUtil.AddressSet storage pointer) view returns (address,uint256)" + } + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2852:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2806:90:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5876, + "name": "candidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5833, + "src": "2911:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5877, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5870, + "src": "2928:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2911:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5887, + "nodeType": "IfStatement", + "src": "2907:102:37", + "trueBody": { + "id": 5886, + "nodeType": "Block", + "src": "2940:69:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5882, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5868, + "src": "2970:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5883, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2988:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5879, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2954:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "replace", + "nodeType": "MemberAccess", + "referencedDeclaration": 1872, + "src": "2954:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address,address)" + } + }, + "id": 5884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2954:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5885, + "nodeType": "ExpressionStatement", + "src": "2954:44:37" + } + ] + } + } + ] + }, + "id": 5889, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateWinnerSet", + "nameLocation": "2203:16:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5836, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5829, + "mutability": "mutable", + "name": "election", + "nameLocation": "2250:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2229:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5828, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5827, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2229:12:37" + }, + "referencedDeclaration": 4299, + "src": "2229:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5831, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2276:9:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2268:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2268:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5833, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2300:14:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2295:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2295:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5835, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "2329:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2324:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5834, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2324:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2219:124:37" + }, + "returnParameters": { + "id": 5837, + "nodeType": "ParameterList", + "parameters": [], + "src": "2352:0:37" + }, + "scope": 5961, + "src": "2194:821:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5959, + "nodeType": "Block", + "src": "3216:508:37", + "statements": [ + { + "expression": { + "id": 5908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5902, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3226:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [ + { + "id": 5905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3244:4:37", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5904, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3244:4:37", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 5903, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3239:4:37", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3239:10:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3239:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3226:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5909, + "nodeType": "ExpressionStatement", + "src": "3226:27:37" + }, + { + "assignments": [ + 5911 + ], + "declarations": [ + { + "constant": false, + "id": 5911, + "mutability": "mutable", + "name": "numWinners", + "nameLocation": "3269:10:37", + "nodeType": "VariableDeclaration", + "scope": 5959, + "src": "3264:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5910, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3264:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5915, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5912, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3282:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5913, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "3282:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3282:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3264:34:37" + }, + { + "body": { + "id": 5953, + "nodeType": "Block", + "src": "3388:282:37", + "statements": [ + { + "assignments": [ + 5927 + ], + "declarations": [ + { + "constant": false, + "id": 5927, + "mutability": "mutable", + "name": "winner", + "nameLocation": "3410:6:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3402:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3402:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5932, + "initialValue": { + "arguments": [ + { + "id": 5930, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3435:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 5928, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3419:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "3419:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 5931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:31:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3402:48:37" + }, + { + "assignments": [ + 5934 + ], + "declarations": [ + { + "constant": false, + "id": 5934, + "mutability": "mutable", + "name": "winnerVotes", + "nameLocation": "3469:11:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3464:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5933, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3464:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5939, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5935, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5892, + "src": "3483:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5936, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "3483:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5938, + "indexExpression": { + "id": 5937, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3507:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3483:31:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3464:50:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5940, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3533:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5941, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3547:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3533:24:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5952, + "nodeType": "IfStatement", + "src": "3529:131:37", + "trueBody": { + "id": 5951, + "nodeType": "Block", + "src": "3559:101:37", + "statements": [ + { + "expression": { + "id": 5945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5943, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3577:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5944, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3590:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3577:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5946, + "nodeType": "ExpressionStatement", + "src": "3577:24:37" + }, + { + "expression": { + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5947, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3620:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5948, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3639:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3620:25:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5950, + "nodeType": "ExpressionStatement", + "src": "3620:25:37" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5920, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3340:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5921, + "name": "numWinners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5911, + "src": "3358:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3340:28:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5954, + "initializationExpression": { + "assignments": [ + 5917 + ], + "declarations": [ + { + "constant": false, + "id": 5917, + "mutability": "mutable", + "name": "winnerPosition", + "nameLocation": "3320:14:37", + "nodeType": "VariableDeclaration", + "scope": 5954, + "src": "3314:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5916, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3314:5:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 5919, + "initialValue": { + "hexValue": "31", + "id": 5918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3337:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3314:24:37" + }, + "loopExpression": { + "expression": { + "id": 5924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3370:16:37", + "subExpression": { + "id": 5923, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3370:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5925, + "nodeType": "ExpressionStatement", + "src": "3370:16:37" + }, + "nodeType": "ForStatement", + "src": "3309:361:37" + }, + { + "expression": { + "components": [ + { + "id": 5955, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3688:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5956, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3706:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5957, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3687:30:37", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "functionReturnParameters": 5901, + "id": 5958, + "nodeType": "Return", + "src": "3680:37:37" + } + ] + }, + "id": 5960, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_findWinnerWithLeastVotes", + "nameLocation": "3030:25:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5892, + "mutability": "mutable", + "name": "election", + "nameLocation": "3077:8:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3056:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5891, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5890, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3056:12:37" + }, + "referencedDeclaration": 4299, + "src": "3056:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5895, + "mutability": "mutable", + "name": "winners", + "nameLocation": "3114:7:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3087:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5894, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5893, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "3087:18:37" + }, + "referencedDeclaration": 1788, + "src": "3087:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "3055:67:37" + }, + "returnParameters": { + "id": 5901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5898, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "3177:16:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3169:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3169:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5900, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "3200:10:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3195:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5899, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3195:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3168:43:37" + }, + "scope": 5961, + "src": "3021:703:37", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5962, + "src": "185:3541:37", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3696:37" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IElectionModule as IBaseElectionModule} from \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\n\ninterface ISynthetixElectionModule is IBaseElectionModule {\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external;\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n /// @notice Sets the Synthetix v2 DebtShare contract that determines vote power\n function setDebtShareContract(address newDebtShareContractAddress) external;\n\n /// @notice Returns the Synthetix v2 DebtShare contract that determines vote power\n function getDebtShareContract() external view returns (address);\n\n /// @notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch\n function setDebtShareSnapshotId(uint snapshotId) external;\n\n /// @notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch\n function getDebtShareSnapshotId() external view returns (uint);\n\n /// @notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot\n function getDebtShare(address user) external view returns (uint);\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n /// @notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) external;\n\n /// @notice Returns the current epoch's merkle root for user debt shares on other chains\n function getCrossChainDebtShareMerkleRoot() external view returns (bytes32);\n\n /// @notice Returns the current epoch's merkle root block number\n function getCrossChainDebtShareMerkleRootBlockNumber() external view returns (uint);\n\n /// @notice Allows users to declare their Synthetix v2 debt shares on other chains\n function declareCrossChainDebtShare(\n address account,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) external;\n\n /// @notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains\n function getDeclaredCrossChainDebtShare(address account) external view returns (uint);\n\n /// @notice Declares cross chain debt shares and casts a vote\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Sets the Optimism cross domain messenger on L2.\n function setCrossDomainMessenger(address messenger) external;\n\n /// @notice Returns the Optimism cross domain messenger on L2.\n function getCrossDomainMessenger() external view returns (address);\n\n /// @notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts.\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Allows L1 non-EOA addresses to vote on an election.\n function castRelayed(address user, address[] calldata candidates) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "exportedSymbols": { + "IBaseElectionModule": [ + 2778 + ], + "ISynthetixElectionModule": [ + 6574 + ] + }, + "id": 6575, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6430, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6432, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6575, + "sourceUnit": 2779, + "src": "56:122:42", + "symbolAliases": [ + { + "foreign": { + "id": 6431, + "name": "IElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:15:42", + "typeDescriptions": {} + }, + "local": "IBaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6433, + "name": "IBaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "218:19:42" + }, + "id": 6434, + "nodeType": "InheritanceSpecifier", + "src": "218:19:42" + } + ], + "canonicalName": "ISynthetixElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6574, + "linearizedBaseContracts": [ + 6574, + 2778 + ], + "name": "ISynthetixElectionModule", + "nameLocation": "190:24:42", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 6435, + "nodeType": "StructuredDocumentation", + "src": "244:73:42", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "0166451a", + "id": 6455, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "331:24:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6437, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "379:16:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "365:30:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6436, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "365:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6439, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "419:18:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "405:32:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6438, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "405:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6442, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "464:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "447:29:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "447:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6441, + "nodeType": "ArrayTypeName", + "src": "447:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "492:20:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "486:26:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6443, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "486:5:42", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6446, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "529:25:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "522:32:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6445, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "522:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6448, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "571:21:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "564:28:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6447, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "564:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "609:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "602:19:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6449, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "602:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6452, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "639:17:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "631:25:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "631:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "355:307:42" + }, + "returnParameters": { + "id": 6454, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:42" + }, + "scope": 6574, + "src": "322:350:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6456, + "nodeType": "StructuredDocumentation", + "src": "792:79:42", + "text": "@notice Sets the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "0ebf4796", + "id": 6461, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareContract", + "nameLocation": "885:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6458, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "914:27:42", + "nodeType": "VariableDeclaration", + "scope": 6461, + "src": "906:35:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6457, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "906:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "905:37:42" + }, + "returnParameters": { + "id": 6460, + "nodeType": "ParameterList", + "parameters": [], + "src": "951:0:42" + }, + "scope": 6574, + "src": "876:76:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "958:82:42", + "text": "@notice Returns the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "aeff252a", + "id": 6467, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "1054:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6463, + "nodeType": "ParameterList", + "parameters": [], + "src": "1074:2:42" + }, + "returnParameters": { + "id": 6466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6465, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6467, + "src": "1100:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1100:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1099:9:42" + }, + "scope": 6574, + "src": "1045:64:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6468, + "nodeType": "StructuredDocumentation", + "src": "1115:94:42", + "text": "@notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch" + }, + "functionSelector": "a0f42837", + "id": 6473, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareSnapshotId", + "nameLocation": "1223:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6471, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "1251:10:42", + "nodeType": "VariableDeclaration", + "scope": 6473, + "src": "1246:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1246:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1245:17:42" + }, + "returnParameters": { + "id": 6472, + "nodeType": "ParameterList", + "parameters": [], + "src": "1271:0:42" + }, + "scope": 6574, + "src": "1214:58:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6474, + "nodeType": "StructuredDocumentation", + "src": "1278:77:42", + "text": "@notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch" + }, + "functionSelector": "dfe7cd3a", + "id": 6479, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "1369:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6475, + "nodeType": "ParameterList", + "parameters": [], + "src": "1391:2:42" + }, + "returnParameters": { + "id": 6478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6477, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6479, + "src": "1417:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1417:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:42" + }, + "scope": 6574, + "src": "1360:63:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6480, + "nodeType": "StructuredDocumentation", + "src": "1429:98:42", + "text": "@notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot" + }, + "functionSelector": "f2e56dea", + "id": 6487, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "1541:12:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "user", + "nameLocation": "1562:4:42", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1554:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1554:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1553:14:42" + }, + "returnParameters": { + "id": 6486, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6485, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1591:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1591:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1590:6:42" + }, + "scope": 6574, + "src": "1532:65:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6488, + "nodeType": "StructuredDocumentation", + "src": "1729:112:42", + "text": "@notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch" + }, + "functionSelector": "33f3f3de", + "id": 6495, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "1855:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6490, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "1896:10:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1888:18:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6489, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1888:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6492, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "1913:11:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1908:16:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6491, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1887:38:42" + }, + "returnParameters": { + "id": 6494, + "nodeType": "ParameterList", + "parameters": [], + "src": "1934:0:42" + }, + "scope": 6574, + "src": "1846:89:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "1941:88:42", + "text": "@notice Returns the current epoch's merkle root for user debt shares on other chains" + }, + "functionSelector": "b55c43d2", + "id": 6501, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "2043:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6497, + "nodeType": "ParameterList", + "parameters": [], + "src": "2075:2:42" + }, + "returnParameters": { + "id": 6500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6499, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6501, + "src": "2101:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6498, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2101:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2100:9:42" + }, + "scope": 6574, + "src": "2034:76:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6502, + "nodeType": "StructuredDocumentation", + "src": "2116:64:42", + "text": "@notice Returns the current epoch's merkle root block number" + }, + "functionSelector": "d9617851", + "id": 6507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2194:43:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6503, + "nodeType": "ParameterList", + "parameters": [], + "src": "2237:2:42" + }, + "returnParameters": { + "id": 6506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6507, + "src": "2263:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6504, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2263:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2262:6:42" + }, + "scope": 6574, + "src": "2185:84:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6508, + "nodeType": "StructuredDocumentation", + "src": "2275:82:42", + "text": "@notice Allows users to declare their Synthetix v2 debt shares on other chains" + }, + "functionSelector": "7d264ccb", + "id": 6518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareCrossChainDebtShare", + "nameLocation": "2371:26:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6510, + "mutability": "mutable", + "name": "account", + "nameLocation": "2415:7:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2407:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6509, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6512, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2440:9:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2432:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6511, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2432:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6515, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2478:11:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2459:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6513, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2459:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6514, + "nodeType": "ArrayTypeName", + "src": "2459:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "2397:98:42" + }, + "returnParameters": { + "id": 6517, + "nodeType": "ParameterList", + "parameters": [], + "src": "2504:0:42" + }, + "scope": 6574, + "src": "2362:143:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6519, + "nodeType": "StructuredDocumentation", + "src": "2511:116:42", + "text": "@notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains" + }, + "functionSelector": "796c5c80", + "id": 6526, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "2641:30:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6521, + "mutability": "mutable", + "name": "account", + "nameLocation": "2680:7:42", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2672:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6520, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2672:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2671:17:42" + }, + "returnParameters": { + "id": 6525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6524, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2712:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2711:6:42" + }, + "scope": 6574, + "src": "2632:86:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6527, + "nodeType": "StructuredDocumentation", + "src": "2724:61:42", + "text": "@notice Declares cross chain debt shares and casts a vote" + }, + "functionSelector": "9a9a8e1a", + "id": 6538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCast", + "nameLocation": "2799:14:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6529, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2831:9:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2823:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2823:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6532, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2869:11:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2850:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6530, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2850:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6531, + "nodeType": "ArrayTypeName", + "src": "2850:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6535, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2909:10:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2890:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2890:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6534, + "nodeType": "ArrayTypeName", + "src": "2890:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2813:112:42" + }, + "returnParameters": { + "id": 6537, + "nodeType": "ParameterList", + "parameters": [], + "src": "2934:0:42" + }, + "scope": 6574, + "src": "2790:145:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6539, + "nodeType": "StructuredDocumentation", + "src": "2941:59:42", + "text": "@notice Sets the Optimism cross domain messenger on L2." + }, + "functionSelector": "211de0b4", + "id": 6544, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossDomainMessenger", + "nameLocation": "3014:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6541, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3046:9:42", + "nodeType": "VariableDeclaration", + "scope": 6544, + "src": "3038:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6540, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3038:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3037:19:42" + }, + "returnParameters": { + "id": 6543, + "nodeType": "ParameterList", + "parameters": [], + "src": "3065:0:42" + }, + "scope": 6574, + "src": "3005:61:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6545, + "nodeType": "StructuredDocumentation", + "src": "3072:62:42", + "text": "@notice Returns the Optimism cross domain messenger on L2." + }, + "functionSelector": "f675fa62", + "id": 6550, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "3148:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [], + "src": "3171:2:42" + }, + "returnParameters": { + "id": 6549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6548, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6550, + "src": "3197:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3197:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3196:9:42" + }, + "scope": 6574, + "src": "3139:67:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6551, + "nodeType": "StructuredDocumentation", + "src": "3212:87:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts." + }, + "functionSelector": "4b144674", + "id": 6564, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCastRelayed", + "nameLocation": "3313:21:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6553, + "mutability": "mutable", + "name": "user", + "nameLocation": "3352:4:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3344:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6552, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3344:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6555, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "3374:9:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3366:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6558, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "3412:11:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3393:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6556, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3393:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6557, + "nodeType": "ArrayTypeName", + "src": "3393:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6561, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3452:10:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3433:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3433:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6560, + "nodeType": "ArrayTypeName", + "src": "3433:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3334:134:42" + }, + "returnParameters": { + "id": 6563, + "nodeType": "ParameterList", + "parameters": [], + "src": "3477:0:42" + }, + "scope": 6574, + "src": "3304:174:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6565, + "nodeType": "StructuredDocumentation", + "src": "3484:63:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election." + }, + "functionSelector": "5a2b3fd7", + "id": 6573, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "castRelayed", + "nameLocation": "3561:11:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6567, + "mutability": "mutable", + "name": "user", + "nameLocation": "3581:4:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3573:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6566, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6570, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3606:10:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3587:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6568, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3587:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6569, + "nodeType": "ArrayTypeName", + "src": "3587:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3572:45:42" + }, + "returnParameters": { + "id": 6572, + "nodeType": "ParameterList", + "parameters": [], + "src": "3626:0:42" + }, + "scope": 6574, + "src": "3552:75:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6575, + "src": "180:3449:42", + "usedErrors": [] + } + ], + "src": "31:3599:42" + } + }, + "contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {UpgradeModule as BaseUpgradeModule} from \"@synthetixio/core-modules/contracts/modules/UpgradeModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract UpgradeModule is BaseUpgradeModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "BaseUpgradeModule": [ + 4218 + ], + "UpgradeModule": [ + 7165 + ] + }, + "id": 7166, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7160, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:49" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "id": 7162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7166, + "sourceUnit": 4219, + "src": "56:113:49", + "symbolAliases": [ + { + "foreign": { + "id": 7161, + "name": "UpgradeModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:13:49", + "typeDescriptions": {} + }, + "local": "BaseUpgradeModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7163, + "name": "BaseUpgradeModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4218, + "src": "242:17:49" + }, + "id": 7164, + "nodeType": "InheritanceSpecifier", + "src": "242:17:49" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7165, + "linearizedBaseContracts": [ + 7165, + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "225:13:49", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7166, + "src": "216:48:49", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:234:49" + } + }, + "contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {OwnerModule as BaseOwnerModule} from \"@synthetixio/core-modules/contracts/modules/OwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is BaseOwnerModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "BaseOwnerModule": [ + 4196 + ], + "OwnerModule": [ + 7158 + ] + }, + "id": 7159, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7153, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:48" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "id": 7155, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7159, + "sourceUnit": 4197, + "src": "56:107:48", + "symbolAliases": [ + { + "foreign": { + "id": 7154, + "name": "OwnerModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:11:48", + "typeDescriptions": {} + }, + "local": "BaseOwnerModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7156, + "name": "BaseOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4196, + "src": "234:15:48" + }, + "id": 7157, + "nodeType": "InheritanceSpecifier", + "src": "234:15:48" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7158, + "linearizedBaseContracts": [ + 7158, + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "219:11:48", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7159, + "src": "210:44:48", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:224:48" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IElectionInspectorModule.sol\";\nimport \"../submodules/election/ElectionBase.sol\";\n\ncontract ElectionInspectorModule is IElectionInspectorModule, ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function getEpochStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).startDate;\n }\n\n function getEpochEndDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).endDate;\n }\n\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).votingPeriodStartDate;\n }\n\n function wasNominated(address candidate, uint epochIndex) external view override returns (bool) {\n return _getElectionAtIndex(epochIndex).nominees.contains(candidate);\n }\n\n function getNomineesAtEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).nominees.values();\n }\n\n function getBallotVotedAtEpoch(address user, uint epochIndex) public view override returns (bytes32) {\n return _getElectionAtIndex(epochIndex).ballotIdsByAddress[user];\n }\n\n function hasVotedInEpoch(address user, uint epochIndex) external view override returns (bool) {\n return getBallotVotedAtEpoch(user, epochIndex) != bytes32(0);\n }\n\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view override returns (uint) {\n return _getBallotInEpoch(ballotId, epochIndex).votes;\n }\n\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex)\n external\n view\n override\n returns (address[] memory)\n {\n return _getBallotInEpoch(ballotId, epochIndex).candidates;\n }\n\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view override returns (uint) {\n return _getElectionAtIndex(epochIndex).candidateVotes[candidate];\n }\n\n function getElectionWinnersInEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).winners.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionInspectorModule": [ + 3005 + ], + "ElectionStorage": [ + 4331 + ], + "IElectionInspectorModule": [ + 2484 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 3006, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2793, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:29" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "file": "../interfaces/IElectionInspectorModule.sol", + "id": 2794, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 2485, + "src": "56:52:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "../submodules/election/ElectionBase.sol", + "id": 2795, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 4684, + "src": "109:49:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2796, + "name": "IElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2484, + "src": "196:24:29" + }, + "id": 2797, + "nodeType": "InheritanceSpecifier", + "src": "196:24:29" + }, + { + "baseName": { + "id": 2798, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "222:12:29" + }, + "id": 2799, + "nodeType": "InheritanceSpecifier", + "src": "222:12:29" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3005, + "linearizedBaseContracts": [ + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "169:23:29", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2803, + "libraryName": { + "id": 2800, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "247:7:29" + }, + "nodeType": "UsingForDirective", + "src": "241:37:29", + "typeName": { + "id": 2802, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2801, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "259:18:29" + }, + "referencedDeclaration": 1788, + "src": "259:18:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2380 + ], + "body": { + "id": 2816, + "nodeType": "Block", + "src": "376:62:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2812, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2805, + "src": "410:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2811, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "393:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "393:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "393:38:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2810, + "id": 2815, + "nodeType": "Return", + "src": "386:45:29" + } + ] + }, + "functionSelector": "714d8d0e", + "id": 2817, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "293:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2807, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "350:8:29" + }, + "parameters": { + "id": 2806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2805, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "324:10:29", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "319:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2804, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "319:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "318:17:29" + }, + "returnParameters": { + "id": 2810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "368:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2808, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "368:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "367:8:29" + }, + "scope": 3005, + "src": "284:154:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2388 + ], + "body": { + "id": 2830, + "nodeType": "Block", + "src": "534:60:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2826, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2819, + "src": "568:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2825, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "551:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "551:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "551:36:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2824, + "id": 2829, + "nodeType": "Return", + "src": "544:43:29" + } + ] + }, + "functionSelector": "ba9a5b25", + "id": 2831, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "453:23:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2821, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "508:8:29" + }, + "parameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2819, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "482:10:29", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "477:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2818, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "477:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "476:17:29" + }, + "returnParameters": { + "id": 2824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "526:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2822, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "526:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "525:8:29" + }, + "scope": 3005, + "src": "444:150:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2396 + ], + "body": { + "id": 2844, + "nodeType": "Block", + "src": "703:78:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2840, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2833, + "src": "737:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2839, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "720:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "720:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2842, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "720:54:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2838, + "id": 2843, + "nodeType": "Return", + "src": "713:61:29" + } + ] + }, + "functionSelector": "b749be55", + "id": 2845, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "609:36:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2835, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "677:8:29" + }, + "parameters": { + "id": 2834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2833, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "651:10:29", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "646:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "645:17:29" + }, + "returnParameters": { + "id": 2838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "695:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2836, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "695:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "694:8:29" + }, + "scope": 3005, + "src": "600:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2404 + ], + "body": { + "id": 2858, + "nodeType": "Block", + "src": "886:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2854, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "920:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2853, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "903:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "903:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "903:50:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2852, + "id": 2857, + "nodeType": "Return", + "src": "896:57:29" + } + ] + }, + "functionSelector": "82e28473", + "id": 2859, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "796:32:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "860:8:29" + }, + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2847, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "834:10:29", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "829:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2846, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "829:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "828:17:29" + }, + "returnParameters": { + "id": 2852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "878:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "878:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "877:8:29" + }, + "scope": 3005, + "src": "787:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2414 + ], + "body": { + "id": 2877, + "nodeType": "Block", + "src": "1062:84:29", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2874, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2861, + "src": "1129:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [ + { + "id": 2870, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2863, + "src": "1099:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2869, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1079:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1079:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "1079:49:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:60:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2868, + "id": 2876, + "nodeType": "Return", + "src": "1072:67:29" + } + ] + }, + "functionSelector": "205569c2", + "id": 2878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "975:12:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2865, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1038:8:29" + }, + "parameters": { + "id": 2864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2861, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "996:9:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "988:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2860, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "988:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1012:10:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1007:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1007:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "987:36:29" + }, + "returnParameters": { + "id": 2868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1056:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2866, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1056:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1055:6:29" + }, + "scope": 3005, + "src": "966:180:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2423 + ], + "body": { + "id": 2894, + "nodeType": "Block", + "src": "1247:73:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2888, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2880, + "src": "1284:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2887, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1264:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1264:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "1264:47:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 2892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:49:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2886, + "id": 2893, + "nodeType": "Return", + "src": "1257:56:29" + } + ] + }, + "functionSelector": "ca80a2ed", + "id": 2895, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1161:18:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1211:8:29" + }, + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2880, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1185:10:29", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1180:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2879, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1180:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1179:17:29" + }, + "returnParameters": { + "id": 2886, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2885, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1229:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2884, + "nodeType": "ArrayTypeName", + "src": "1229:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1228:18:29" + }, + "scope": 3005, + "src": "1152:168:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2433 + ], + "body": { + "id": 2912, + "nodeType": "Block", + "src": "1427:80:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2906, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2899, + "src": "1464:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2905, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1444:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1444:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "1444:50:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 2910, + "indexExpression": { + "id": 2909, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "1495:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1444:56:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2904, + "id": 2911, + "nodeType": "Return", + "src": "1437:63:29" + } + ] + }, + "functionSelector": "49aed35c", + "id": 2913, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1335:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2901, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1400:8:29" + }, + "parameters": { + "id": 2900, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "mutability": "mutable", + "name": "user", + "nameLocation": "1365:4:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1357:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2899, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1376:10:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1371:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2898, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1371:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1356:31:29" + }, + "returnParameters": { + "id": 2904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2903, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1418:7:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2902, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1418:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1417:9:29" + }, + "scope": 3005, + "src": "1326:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2443 + ], + "body": { + "id": 2933, + "nodeType": "Block", + "src": "1607:77:29", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2924, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2915, + "src": "1646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2925, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2917, + "src": "1652:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2923, + "name": "getBallotVotedAtEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2913, + "src": "1624:21:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) view returns (bytes32)" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1624:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:1:29", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1667:7:29", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2927, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1667:7:29", + "typeDescriptions": {} + } + }, + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1667:10:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1624:53:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2922, + "id": 2932, + "nodeType": "Return", + "src": "1617:60:29" + } + ] + }, + "functionSelector": "1209644e", + "id": 2934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1522:15:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2919, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:29" + }, + "parameters": { + "id": 2918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2915, + "mutability": "mutable", + "name": "user", + "nameLocation": "1546:4:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1538:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2914, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2917, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1557:10:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1552:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1552:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:31:29" + }, + "returnParameters": { + "id": 2922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2921, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1601:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2920, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1601:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1600:6:29" + }, + "scope": 3005, + "src": "1513:171:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2453 + ], + "body": { + "id": 2950, + "nodeType": "Block", + "src": "1794:69:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2945, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1829:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2946, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2938, + "src": "1839:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2944, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "1811:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1811:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1811:45:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2943, + "id": 2949, + "nodeType": "Return", + "src": "1804:52:29" + } + ] + }, + "functionSelector": "2c3c5ba3", + "id": 2951, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1699:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2940, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1770:8:29" + }, + "parameters": { + "id": 2939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2936, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1729:8:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1721:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2935, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1721:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2938, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1744:10:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1739:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2937, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1739:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1720:35:29" + }, + "returnParameters": { + "id": 2943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2942, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1788:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2941, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1788:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1787:6:29" + }, + "scope": 3005, + "src": "1690:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2464 + ], + "body": { + "id": 2968, + "nodeType": "Block", + "src": "2026:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2963, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2953, + "src": "2061:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2964, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2955, + "src": "2071:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2962, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "2043:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2043:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "2043:50:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 2961, + "id": 2967, + "nodeType": "Return", + "src": "2036:57:29" + } + ] + }, + "functionSelector": "0a8b471a", + "id": 2969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "1878:26:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2957, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1978:8:29" + }, + "parameters": { + "id": 2956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2953, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1913:8:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1905:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2952, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1905:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2955, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1928:10:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1923:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2954, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1923:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1904:35:29" + }, + "returnParameters": { + "id": 2961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2960, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "2004:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2958, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2004:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2959, + "nodeType": "ArrayTypeName", + "src": "2004:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2003:18:29" + }, + "scope": 3005, + "src": "1869:231:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2474 + ], + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2214:81:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2980, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2251:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2979, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2231:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2231:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "2231:46:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2984, + "indexExpression": { + "id": 2983, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "2278:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2231:57:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2978, + "id": 2985, + "nodeType": "Return", + "src": "2224:64:29" + } + ] + }, + "functionSelector": "793b9a9d", + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2115:24:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2975, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2190:8:29" + }, + "parameters": { + "id": 2974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2148:9:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2140:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2140:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2973, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2164:10:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2159:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2972, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2159:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2139:36:29" + }, + "returnParameters": { + "id": 2978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2208:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2976, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2208:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2207:6:29" + }, + "scope": 3005, + "src": "2106:189:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2483 + ], + "body": { + "id": 3003, + "nodeType": "Block", + "src": "2403:72:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2997, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2440:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2996, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2420:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2999, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2420:39:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "2420:46:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:48:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2995, + "id": 3002, + "nodeType": "Return", + "src": "2413:55:29" + } + ] + }, + "functionSelector": "cce32c52", + "id": 3004, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2310:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2991, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2367:8:29" + }, + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2341:10:29", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2336:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2988, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2336:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2335:17:29" + }, + "returnParameters": { + "id": 2995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2994, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2385:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2992, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2385:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2993, + "nodeType": "ArrayTypeName", + "src": "2385:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2384:18:29" + }, + "scope": 3005, + "src": "2301:174:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3006, + "src": "160:2317:29", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:2447:29" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n/// @dev View functions add to contract size, since they bloat the Solidity function dispatcher\ninterface IElectionInspectorModule {\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Returns the date in which the given epoch started\n function getEpochStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the given epoch ended\n function getEpochEndDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the given epoch started\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the given epoch started\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Shows if a candidate was nominated in the given epoch\n function wasNominated(address candidate, uint epochIndex) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the given epoch\n function getNomineesAtEpoch(uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the ballot id that user voted on in the given election\n function getBallotVotedAtEpoch(address user, uint epochIndex) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the given election\n function hasVotedInEpoch(address user, uint epochIndex) external view returns (bool);\n\n /// @notice Returns the number of votes given to a particular ballot in a given epoch\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has in a given epoch\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the number of votes a candidate received in a given epoch\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the winners of the given election\n function getElectionWinnersInEpoch(uint epochIndex) external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "exportedSymbols": { + "IElectionInspectorModule": [ + 2484 + ] + }, + "id": 2485, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2371, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:26" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionInspectorModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2372, + "nodeType": "StructuredDocumentation", + "src": "56:233:26", + "text": "@title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n @dev View functions add to contract size, since they bloat the Solidity function dispatcher" + }, + "fullyImplemented": false, + "id": 2484, + "linearizedBaseContracts": [ + 2484 + ], + "name": "IElectionInspectorModule", + "nameLocation": "299:24:26", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2373, + "nodeType": "StructuredDocumentation", + "src": "447:61:26", + "text": "@notice Returns the date in which the given epoch started" + }, + "functionSelector": "714d8d0e", + "id": 2380, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "522:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2375, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "553:10:26", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "548:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2374, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "548:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "547:17:26" + }, + "returnParameters": { + "id": 2379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2378, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "588:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2377, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "588:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "587:8:26" + }, + "scope": 2484, + "src": "513:83:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2381, + "nodeType": "StructuredDocumentation", + "src": "602:59:26", + "text": "@notice Returns the date in which the given epoch ended" + }, + "functionSelector": "ba9a5b25", + "id": 2388, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "675:23:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "704:10:26", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "699:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2382, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "699:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "698:17:26" + }, + "returnParameters": { + "id": 2387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2386, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "739:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2385, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "739:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "738:8:26" + }, + "scope": 2484, + "src": "666:81:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2389, + "nodeType": "StructuredDocumentation", + "src": "753:86:26", + "text": "@notice Returns the date in which the Nomination period in the given epoch started" + }, + "functionSelector": "b749be55", + "id": 2396, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "853:36:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2391, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "895:10:26", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "890:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2390, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "890:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "889:17:26" + }, + "returnParameters": { + "id": 2395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "930:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2393, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "930:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "929:8:26" + }, + "scope": 2484, + "src": "844:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2397, + "nodeType": "StructuredDocumentation", + "src": "944:82:26", + "text": "@notice Returns the date in which the Voting period in the given epoch started" + }, + "functionSelector": "82e28473", + "id": 2404, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "1040:32:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1078:10:26", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1073:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2398, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1073:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1072:17:26" + }, + "returnParameters": { + "id": 2403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2402, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1113:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2401, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1113:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1112:8:26" + }, + "scope": 2484, + "src": "1031:90:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2405, + "nodeType": "StructuredDocumentation", + "src": "1127:65:26", + "text": "@notice Shows if a candidate was nominated in the given epoch" + }, + "functionSelector": "205569c2", + "id": 2414, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "1206:12:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2407, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1227:9:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1219:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1219:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2409, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1243:10:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1238:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1238:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1218:36:26" + }, + "returnParameters": { + "id": 2413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2412, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1278:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2411, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1278:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1277:6:26" + }, + "scope": 2484, + "src": "1197:87:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2415, + "nodeType": "StructuredDocumentation", + "src": "1290:73:26", + "text": "@notice Returns a list of all nominated candidates in the given epoch" + }, + "functionSelector": "ca80a2ed", + "id": 2423, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1377:18:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2417, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1401:10:26", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1396:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2416, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1396:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1395:17:26" + }, + "returnParameters": { + "id": 2422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2421, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1436:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1436:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2420, + "nodeType": "ArrayTypeName", + "src": "1436:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1435:18:26" + }, + "scope": 2484, + "src": "1368:86:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2424, + "nodeType": "StructuredDocumentation", + "src": "1460:74:26", + "text": "@notice Returns the ballot id that user voted on in the given election" + }, + "functionSelector": "49aed35c", + "id": 2433, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1548:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2426, + "mutability": "mutable", + "name": "user", + "nameLocation": "1578:4:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1570:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1570:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2428, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1589:10:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1584:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2427, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1584:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1569:31:26" + }, + "returnParameters": { + "id": 2432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2431, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1624:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2430, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1624:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1623:9:26" + }, + "scope": 2484, + "src": "1539:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2434, + "nodeType": "StructuredDocumentation", + "src": "1639:59:26", + "text": "@notice Returns if user has voted in the given election" + }, + "functionSelector": "1209644e", + "id": 2443, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1712:15:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2436, + "mutability": "mutable", + "name": "user", + "nameLocation": "1736:4:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1728:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1728:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2438, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1747:10:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1742:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2437, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1742:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1727:31:26" + }, + "returnParameters": { + "id": 2442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1782:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2440, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1782:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1781:6:26" + }, + "scope": 2484, + "src": "1703:85:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2444, + "nodeType": "StructuredDocumentation", + "src": "1794:85:26", + "text": "@notice Returns the number of votes given to a particular ballot in a given epoch" + }, + "functionSelector": "2c3c5ba3", + "id": 2453, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1893:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2446, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1923:8:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1915:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1915:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2448, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1938:10:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1933:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1933:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1914:35:26" + }, + "returnParameters": { + "id": 2452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2451, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1973:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2450, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1973:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1972:6:26" + }, + "scope": 2484, + "src": "1884:95:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2454, + "nodeType": "StructuredDocumentation", + "src": "1985:88:26", + "text": "@notice Returns the list of candidates that a particular ballot has in a given epoch" + }, + "functionSelector": "0a8b471a", + "id": 2464, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "2087:26:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2456, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2122:8:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2114:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2455, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2114:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2458, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2137:10:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2132:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2457, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2113:35:26" + }, + "returnParameters": { + "id": 2463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2172:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2172:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2461, + "nodeType": "ArrayTypeName", + "src": "2172:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2171:18:26" + }, + "scope": 2484, + "src": "2078:112:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2465, + "nodeType": "StructuredDocumentation", + "src": "2196:77:26", + "text": "@notice Returns the number of votes a candidate received in a given epoch" + }, + "functionSelector": "793b9a9d", + "id": 2474, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2287:24:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2467, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2320:9:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2312:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2312:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2469, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2336:10:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2331:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2468, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2331:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2311:36:26" + }, + "returnParameters": { + "id": 2473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2472, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2371:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2471, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2371:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2370:6:26" + }, + "scope": 2484, + "src": "2278:99:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2475, + "nodeType": "StructuredDocumentation", + "src": "2383:53:26", + "text": "@notice Returns the winners of the given election" + }, + "functionSelector": "cce32c52", + "id": 2483, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2450:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2477, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2481:10:26", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2476:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2476:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2475:17:26" + }, + "returnParameters": { + "id": 2482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2516:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2516:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2480, + "nodeType": "ArrayTypeName", + "src": "2516:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2515:18:26" + }, + "scope": 2484, + "src": "2441:93:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2485, + "src": "289:2247:26", + "usedErrors": [] + } + ], + "src": "31:2506:26" + } + }, + "contracts/modules/ElectionInspectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionInspectorModule as BaseElectionInspectorModule} from \"@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionInspectorModule is BaseElectionInspectorModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionInspectionModule.sol", + "exportedSymbols": { + "BaseElectionInspectorModule": [ + 3005 + ], + "ElectionInspectorModule": [ + 7151 + ] + }, + "id": 7152, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7146, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:47" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "id": 7148, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7152, + "sourceUnit": 3006, + "src": "56:143:47", + "symbolAliases": [ + { + "foreign": { + "id": 7147, + "name": "ElectionInspectorModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:23:47", + "typeDescriptions": {} + }, + "local": "BaseElectionInspectorModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7149, + "name": "BaseElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3005, + "src": "282:27:47" + }, + "id": 7150, + "nodeType": "InheritanceSpecifier", + "src": "282:27:47" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7151, + "linearizedBaseContracts": [ + 7151, + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "255:23:47", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7152, + "src": "246:68:47", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:284:47" + } + }, + "contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as SynthetixElectionModule} from \"@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionModule is SynthetixElectionModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "ElectionModule": [ + 7190 + ], + "SynthetixElectionModule": [ + 6628 + ] + }, + "id": 7191, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7185, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "id": 7187, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7191, + "sourceUnit": 6629, + "src": "56:129:42", + "symbolAliases": [ + { + "foreign": { + "id": 7186, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:42", + "typeDescriptions": {} + }, + "local": "SynthetixElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7188, + "name": "SynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6628, + "src": "259:23:42" + }, + "id": 7189, + "nodeType": "InheritanceSpecifier", + "src": "259:23:42" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7190, + "linearizedBaseContracts": [ + 7190, + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "241:14:42", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7191, + "src": "232:55:42", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:257:42" + } + }, + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as BaseElectionModule} from \"@synthetixio/core-modules/contracts/modules/ElectionModule.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\nimport \"../interfaces/ISynthetixElectionModule.sol\";\nimport \"../submodules/election/DebtShareManager.sol\";\nimport \"../submodules/election/CrossChainDebtShareManager.sol\";\n\n/// @title Module for electing a council, represented by a set of NFT holders\n/// @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n/// @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n/// @dev A snapshot must be set to determine the debt share id to use.\n/// @dev The merkle proof must also be provided for L1 debt shares before an election.\n/// @dev L1 EOA debt share holders can use declareAndCast to vote.\n/// @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers.\ncontract ElectionModule is ISynthetixElectionModule, BaseElectionModule, DebtShareManager, CrossChainDebtShareManager {\n error TooManyCandidates();\n error WrongInitializer();\n\n /// @dev The BaseElectionModule initializer should not be called, and this one must be called instead\n function initializeElectionModule(\n string memory,\n string memory,\n address[] memory,\n uint8,\n uint64,\n uint64,\n uint64\n ) external view override(BaseElectionModule, IElectionModule) onlyOwner onlyIfNotInitialized {\n revert WrongInitializer();\n }\n\n /// @dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external override onlyOwner onlyIfNotInitialized {\n _setDebtShareContract(debtShareContract);\n\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n /// @dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n /// @dev This function is all that needs to be called by L2 debt share holders to vote.\n function cast(address[] calldata candidates)\n public\n override(BaseElectionModule, IElectionModule)\n onlyInPeriod(ElectionPeriod.Vote)\n {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n _cast(msg.sender, candidates);\n }\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n function setDebtShareContract(address debtShareContract)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Administration)\n {\n _setDebtShareContract(debtShareContract);\n\n emit DebtShareContractSet(debtShareContract);\n }\n\n function getDebtShareContract() external view override returns (address) {\n return address(_debtShareStore().debtShareContract);\n }\n\n function setDebtShareSnapshotId(uint snapshotId) external override onlyOwner onlyInPeriod(ElectionPeriod.Nomination) {\n _setDebtShareSnapshotId(snapshotId);\n }\n\n function getDebtShareSnapshotId() external view override returns (uint) {\n return _getDebtShareSnapshotId();\n }\n\n function getDebtShare(address user) external view override returns (uint) {\n return _getDebtShare(user);\n }\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Nomination)\n {\n _setCrossChainDebtShareMerkleRoot(merkleRoot, blocknumber);\n\n emit CrossChainDebtShareMerkleRootSet(merkleRoot, blocknumber, _getCurrentEpochIndex());\n }\n\n function getCrossChainDebtShareMerkleRoot() external view override returns (bytes32) {\n return _getCrossChainDebtShareMerkleRoot();\n }\n\n function getCrossChainDebtShareMerkleRootBlockNumber() external view override returns (uint) {\n return _getCrossChainDebtShareMerkleRootBlockNumber();\n }\n\n function declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n _declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n emit CrossChainDebtShareDeclared(user, debtShare);\n }\n\n /// @dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls.\n function getDeclaredCrossChainDebtShare(address user) external view override returns (uint) {\n return _getDeclaredCrossChainDebtShare(user);\n }\n\n /// @dev L1 EOA debt share holders can call this single function to vote.\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n declareCrossChainDebtShare(msg.sender, debtShare, merkleProof);\n\n cast(candidates);\n }\n\n function setCrossDomainMessenger(address messenger) external onlyOwner {\n _setCrossDomainMessenger(messenger);\n\n emit CrossDomainMessengerSet(messenger);\n }\n\n function getCrossDomainMessenger() external view returns (address) {\n return _getCrossDomainMessenger();\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000).\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n _cast(user, candidates);\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000).\n function castRelayed(address user, address[] calldata candidates) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n _cast(user, candidates);\n }\n\n // ---------------------------------------\n // Internal\n // ---------------------------------------\n\n /// @dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered\n function _getVotePower(address user) internal view virtual override returns (uint) {\n uint votePower = _getDebtShare(user) + _getDeclaredCrossChainDebtShare(user);\n\n return MathUtil.sqrt(votePower);\n }\n\n function _createNewEpoch() internal virtual override {\n super._createNewEpoch();\n\n DebtShareStore storage store = _debtShareStore();\n\n store.debtShareIds.push();\n store.crossChainDebtShareData.push();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "BaseElectionModule": [ + 3799 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 7004 + ], + "DebtShareManager": [ + 7183 + ], + "DebtShareStorage": [ + 6665 + ], + "ElectionBase": [ + 4264 + ], + "ElectionModule": [ + 6628 + ], + "ElectionStorage": [ + 3912 + ], + "IBaseElectionModule": [ + 2663 + ], + "ICrossDomainMessenger": [ + 5997 + ], + "IDebtShare": [ + 6009 + ], + "IElectionModule": [ + 2663 + ], + "ISynthetixElectionModule": [ + 6155 + ], + "MathUtil": [ + 1708 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6629, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6157, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "id": 6159, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 3800, + "src": "56:116:38", + "symbolAliases": [ + { + "foreign": { + "id": 6158, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:38", + "typeDescriptions": {} + }, + "local": "BaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 6160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 1709, + "src": "173:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6161, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 2664, + "src": "240:76:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "file": "../interfaces/ISynthetixElectionModule.sol", + "id": 6162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 6156, + "src": "317:52:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "file": "../submodules/election/DebtShareManager.sol", + "id": 6163, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7184, + "src": "370:53:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "file": "../submodules/election/CrossChainDebtShareManager.sol", + "id": 6164, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7005, + "src": "424:63:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6166, + "name": "ISynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6155, + "src": "1206:24:38" + }, + "id": 6167, + "nodeType": "InheritanceSpecifier", + "src": "1206:24:38" + }, + { + "baseName": { + "id": 6168, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1232:18:38" + }, + "id": 6169, + "nodeType": "InheritanceSpecifier", + "src": "1232:18:38" + }, + { + "baseName": { + "id": 6170, + "name": "DebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7183, + "src": "1252:16:38" + }, + "id": 6171, + "nodeType": "InheritanceSpecifier", + "src": "1252:16:38" + }, + { + "baseName": { + "id": 6172, + "name": "CrossChainDebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7004, + "src": "1270:26:38" + }, + "id": 6173, + "nodeType": "InheritanceSpecifier", + "src": "1270:26:38" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "documentation": { + "id": 6165, + "nodeType": "StructuredDocumentation", + "src": "489:690:38", + "text": "@title Module for electing a council, represented by a set of NFT holders\n @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n @dev A snapshot must be set to determine the debt share id to use.\n @dev The merkle proof must also be provided for L1 debt shares before an election.\n @dev L1 EOA debt share holders can use declareAndCast to vote.\n @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers." + }, + "fullyImplemented": true, + "id": 6628, + "linearizedBaseContracts": [ + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "1188:14:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6175, + "name": "TooManyCandidates", + "nameLocation": "1309:17:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6174, + "nodeType": "ParameterList", + "parameters": [], + "src": "1326:2:38" + }, + "src": "1303:26:38" + }, + { + "id": 6177, + "name": "WrongInitializer", + "nameLocation": "1340:16:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6176, + "nodeType": "ParameterList", + "parameters": [], + "src": "1356:2:38" + }, + "src": "1334:25:38" + }, + { + "baseFunctions": [ + 2391, + 2725 + ], + "body": { + "id": 6206, + "nodeType": "Block", + "src": "1737:42:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6203, + "name": "WrongInitializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6177, + "src": "1754:16:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1754:18:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6205, + "nodeType": "RevertStatement", + "src": "1747:25:38" + } + ] + }, + "documentation": { + "id": 6178, + "nodeType": "StructuredDocumentation", + "src": "1365:101:38", + "text": "@dev The BaseElectionModule initializer should not be called, and this one must be called instead" + }, + "functionSelector": "ee695137", + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6199, + "kind": "modifierInvocation", + "modifierName": { + "id": 6198, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1706:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "1706:9:38" + }, + { + "id": 6201, + "kind": "modifierInvocation", + "modifierName": { + "id": 6200, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1716:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "1716:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1480:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6197, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6195, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1669:18:38" + }, + { + "id": 6196, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "1689:15:38" + } + ], + "src": "1660:45:38" + }, + "parameters": { + "id": 6194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1514:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6179, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1514:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1537:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6181, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1537:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6185, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1560:16:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1560:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6184, + "nodeType": "ArrayTypeName", + "src": "1560:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6187, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1586:5:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6186, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1586:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1601:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6188, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1601:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1617:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6190, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1617:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1633:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6192, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1504:141:38" + }, + "returnParameters": { + "id": 6202, + "nodeType": "ParameterList", + "parameters": [], + "src": "1737:0:38" + }, + "scope": 6628, + "src": "1471:308:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6036 + ], + "body": { + "id": 6247, + "nodeType": "Block", + "src": "2290:325:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6234, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6225, + "src": "2322:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6233, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "2300:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2300:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6236, + "nodeType": "ExpressionStatement", + "src": "2300:40:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6238, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6210, + "src": "2390:16:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6239, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "2420:18:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6240, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2452:12:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 6241, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6217, + "src": "2478:20:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6242, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "2512:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6243, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2551:21:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6244, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "2586:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 6237, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2871, + "src": "2351:25:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2351:257:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6246, + "nodeType": "ExpressionStatement", + "src": "2351:257:38" + } + ] + }, + "documentation": { + "id": 6208, + "nodeType": "StructuredDocumentation", + "src": "1785:110:38", + "text": "@dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract" + }, + "functionSelector": "0166451a", + "id": 6248, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6229, + "kind": "modifierInvocation", + "modifierName": { + "id": 6228, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "2259:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "2259:9:38" + }, + { + "id": 6231, + "kind": "modifierInvocation", + "modifierName": { + "id": 6230, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "2269:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "2269:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1909:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6227, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2250:8:38" + }, + "parameters": { + "id": 6226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6210, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1957:16:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1943:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6209, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1943:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1997:18:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1983:32:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6211, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1983:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "2042:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2025:29:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2025:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2025:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6217, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2070:20:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2064:26:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6216, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2064:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2107:25:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2100:32:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2100:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2149:21:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2142:28:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6220, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2142:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2187:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2180:19:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6222, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2180:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6225, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "2217:17:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2209:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2209:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1933:307:38" + }, + "returnParameters": { + "id": 6232, + "nodeType": "ParameterList", + "parameters": [], + "src": "2290:0:38" + }, + "scope": 6628, + "src": "1900:715:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2479, + 3273 + ], + "body": { + "id": 6277, + "nodeType": "Block", + "src": "2972:134:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6262, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "2986:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2986:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3006:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2986:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6270, + "nodeType": "IfStatement", + "src": "2982:78:38", + "trueBody": { + "id": 6269, + "nodeType": "Block", + "src": "3009:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6266, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "3030:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3030:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6268, + "nodeType": "RevertStatement", + "src": "3023:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6272, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3076:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3076:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6274, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "3088:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6271, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "3070:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3070:29:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6276, + "nodeType": "ExpressionStatement", + "src": "3070:29:38" + } + ] + }, + "documentation": { + "id": 6249, + "nodeType": "StructuredDocumentation", + "src": "2621:186:38", + "text": "@dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n @dev This function is all that needs to be called by L2 debt share holders to vote." + }, + "functionSelector": "84ae670c", + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6258, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "2947:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "2947:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6260, + "kind": "modifierInvocation", + "modifierName": { + "id": 6257, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "2934:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "2934:33:38" + } + ], + "name": "cast", + "nameLocation": "2821:4:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6256, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6254, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "2889:18:38" + }, + { + "id": 6255, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "2909:15:38" + } + ], + "src": "2880:45:38" + }, + "parameters": { + "id": 6253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6252, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2845:10:38", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "2826:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2826:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6251, + "nodeType": "ArrayTypeName", + "src": "2826:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2825:31:38" + }, + "returnParameters": { + "id": 6261, + "nodeType": "ParameterList", + "parameters": [], + "src": "2972:0:38" + }, + "scope": 6628, + "src": "2812:294:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6042 + ], + "body": { + "id": 6298, + "nodeType": "Block", + "src": "3391:112:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6291, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3423:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6290, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "3401:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3401:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6293, + "nodeType": "ExpressionStatement", + "src": "3401:40:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6295, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3478:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6294, + "name": "DebtShareContractSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7024, + "src": "3457:20:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3457:39:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6297, + "nodeType": "EmitStatement", + "src": "3452:44:38" + } + ] + }, + "functionSelector": "0ebf4796", + "id": 6299, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6284, + "kind": "modifierInvocation", + "modifierName": { + "id": 6283, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3325:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3325:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6286, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3356:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 3919, + "src": "3356:29:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6288, + "kind": "modifierInvocation", + "modifierName": { + "id": 6285, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3343:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3343:43:38" + } + ], + "name": "setDebtShareContract", + "nameLocation": "3235:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6282, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3308:8:38" + }, + "parameters": { + "id": 6281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6280, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "3264:17:38", + "nodeType": "VariableDeclaration", + "scope": 6299, + "src": "3256:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3256:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3255:27:38" + }, + "returnParameters": { + "id": 6289, + "nodeType": "ParameterList", + "parameters": [], + "src": "3391:0:38" + }, + "scope": 6628, + "src": "3226:277:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6048 + ], + "body": { + "id": 6312, + "nodeType": "Block", + "src": "3582:68:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6307, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "3607:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3607:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6636, + "src": "3607:35:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + ], + "id": 6306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3599:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3599:7:38", + "typeDescriptions": {} + } + }, + "id": 6310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3599:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6304, + "id": 6311, + "nodeType": "Return", + "src": "3592:51:38" + } + ] + }, + "functionSelector": "aeff252a", + "id": 6313, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "3518:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6301, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3555:8:38" + }, + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "3538:2:38" + }, + "returnParameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6313, + "src": "3573:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3572:9:38" + }, + "scope": 6628, + "src": "3509:141:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6054 + ], + "body": { + "id": 6329, + "nodeType": "Block", + "src": "3773:52:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6326, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3807:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6325, + "name": "_setDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7060, + "src": "3783:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3783:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6328, + "nodeType": "ExpressionStatement", + "src": "3783:35:38" + } + ] + }, + "functionSelector": "a0f42837", + "id": 6330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6319, + "kind": "modifierInvocation", + "modifierName": { + "id": 6318, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3723:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3723:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6321, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3746:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "3746:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6323, + "kind": "modifierInvocation", + "modifierName": { + "id": 6320, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3733:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3733:39:38" + } + ], + "name": "setDebtShareSnapshotId", + "nameLocation": "3665:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6317, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3714:8:38" + }, + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6315, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "3693:10:38", + "nodeType": "VariableDeclaration", + "scope": 6330, + "src": "3688:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3688:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3687:17:38" + }, + "returnParameters": { + "id": 6324, + "nodeType": "ParameterList", + "parameters": [], + "src": "3773:0:38" + }, + "scope": 6628, + "src": "3656:169:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6060 + ], + "body": { + "id": 6339, + "nodeType": "Block", + "src": "3903:49:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6336, + "name": "_getDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7090, + "src": "3920:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3920:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6335, + "id": 6338, + "nodeType": "Return", + "src": "3913:32:38" + } + ] + }, + "functionSelector": "dfe7cd3a", + "id": 6340, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "3840:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6332, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3879:8:38" + }, + "parameters": { + "id": 6331, + "nodeType": "ParameterList", + "parameters": [], + "src": "3862:2:38" + }, + "returnParameters": { + "id": 6335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6334, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6340, + "src": "3897:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6333, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3897:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3896:6:38" + }, + "scope": 6628, + "src": "3831:121:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6068 + ], + "body": { + "id": 6352, + "nodeType": "Block", + "src": "4032:43:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6349, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6342, + "src": "4063:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6348, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "4049:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4049:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6347, + "id": 6351, + "nodeType": "Return", + "src": "4042:26:38" + } + ] + }, + "functionSelector": "f2e56dea", + "id": 6353, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "3967:12:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6344, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4008:8:38" + }, + "parameters": { + "id": 6343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6342, + "mutability": "mutable", + "name": "user", + "nameLocation": "3988:4:38", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "3980:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6341, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3980:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3979:14:38" + }, + "returnParameters": { + "id": 6347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6346, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "4026:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6345, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4026:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4025:6:38" + }, + "scope": 6628, + "src": "3958:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6076 + ], + "body": { + "id": 6379, + "nodeType": "Block", + "src": "4391:173:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6368, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6369, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4447:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6367, + "name": "_setCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6728, + "src": "4401:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256)" + } + }, + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4401:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6371, + "nodeType": "ExpressionStatement", + "src": "4401:58:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6373, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4508:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6374, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4520:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6375, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4117, + "src": "4533:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4533:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6372, + "name": "CrossChainDebtShareMerkleRootSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6692, + "src": "4475:32:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,uint256)" + } + }, + "id": 6377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:82:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6378, + "nodeType": "EmitStatement", + "src": "4470:87:38" + } + ] + }, + "functionSelector": "33f3f3de", + "id": 6380, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6361, + "kind": "modifierInvocation", + "modifierName": { + "id": 6360, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4329:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "4329:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6363, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "4360:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "4360:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6365, + "kind": "modifierInvocation", + "modifierName": { + "id": 6362, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "4347:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "4347:39:38" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "4216:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6359, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4312:8:38" + }, + "parameters": { + "id": 6358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6355, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "4257:10:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4249:18:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6354, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4249:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6357, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "4274:11:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4269:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6356, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4269:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4248:38:38" + }, + "returnParameters": { + "id": 6366, + "nodeType": "ParameterList", + "parameters": [], + "src": "4391:0:38" + }, + "scope": 6628, + "src": "4207:357:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6082 + ], + "body": { + "id": 6389, + "nodeType": "Block", + "src": "4655:59:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6386, + "name": "_getCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6828, + "src": "4672:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4672:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6385, + "id": 6388, + "nodeType": "Return", + "src": "4665:42:38" + } + ] + }, + "functionSelector": "b55c43d2", + "id": 6390, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "4579:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6382, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4628:8:38" + }, + "parameters": { + "id": 6381, + "nodeType": "ParameterList", + "parameters": [], + "src": "4611:2:38" + }, + "returnParameters": { + "id": 6385, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6384, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6390, + "src": "4646:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6383, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4646:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4645:9:38" + }, + "scope": 6628, + "src": "4570:144:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6088 + ], + "body": { + "id": 6399, + "nodeType": "Block", + "src": "4813:70:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6396, + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6856, + "src": "4830:44:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4830:46:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6395, + "id": 6398, + "nodeType": "Return", + "src": "4823:53:38" + } + ] + }, + "functionSelector": "d9617851", + "id": 6400, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "4729:43:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6392, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4789:8:38" + }, + "parameters": { + "id": 6391, + "nodeType": "ParameterList", + "parameters": [], + "src": "4772:2:38" + }, + "returnParameters": { + "id": 6395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6400, + "src": "4807:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4807:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4806:6:38" + }, + "scope": 6628, + "src": "4720:163:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6099 + ], + "body": { + "id": 6426, + "nodeType": "Block", + "src": "5070:134:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6416, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5108:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6417, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5114:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6418, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6407, + "src": "5125:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6415, + "name": "_declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6800, + "src": "5080:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5080:57:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6420, + "nodeType": "ExpressionStatement", + "src": "5080:57:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6422, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5181:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6423, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5187:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6421, + "name": "CrossChainDebtShareDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6698, + "src": "5153:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5153:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6425, + "nodeType": "EmitStatement", + "src": "5148:49:38" + } + ] + }, + "functionSelector": "7d264ccb", + "id": 6427, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5049:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5049:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6413, + "kind": "modifierInvocation", + "modifierName": { + "id": 6410, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5036:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5036:33:38" + } + ], + "name": "declareCrossChainDebtShare", + "nameLocation": "4898:26:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6409, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5027:8:38" + }, + "parameters": { + "id": 6408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6402, + "mutability": "mutable", + "name": "user", + "nameLocation": "4942:4:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4934:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4934:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "4964:9:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4956:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4956:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6407, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5002:11:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4983:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6405, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4983:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6406, + "nodeType": "ArrayTypeName", + "src": "4983:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4924:95:38" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "5070:0:38" + }, + "scope": 6628, + "src": "4889:315:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6107 + ], + "body": { + "id": 6440, + "nodeType": "Block", + "src": "5451:61:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6437, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5500:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6436, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "5468:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5468:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6435, + "id": 6439, + "nodeType": "Return", + "src": "5461:44:38" + } + ] + }, + "documentation": { + "id": 6428, + "nodeType": "StructuredDocumentation", + "src": "5210:144:38", + "text": "@dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls." + }, + "functionSelector": "796c5c80", + "id": 6441, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "5368:30:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6432, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5427:8:38" + }, + "parameters": { + "id": 6431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6430, + "mutability": "mutable", + "name": "user", + "nameLocation": "5407:4:38", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5399:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5399:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5398:14:38" + }, + "returnParameters": { + "id": 6435, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6434, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5445:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6433, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5445:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5444:6:38" + }, + "scope": 6628, + "src": "5359:153:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6119 + ], + "body": { + "id": 6469, + "nodeType": "Block", + "src": "5782:106:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6459, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5819:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5819:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6461, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "5831:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6462, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6447, + "src": "5842:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6458, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "5792:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:62:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6464, + "nodeType": "ExpressionStatement", + "src": "5792:62:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6466, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6450, + "src": "5870:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6465, + "name": "cast", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6278 + ], + "referencedDeclaration": 6278, + "src": "5865:4:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 6467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5865:16:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6468, + "nodeType": "ExpressionStatement", + "src": "5865:16:38" + } + ] + }, + "documentation": { + "id": 6442, + "nodeType": "StructuredDocumentation", + "src": "5518:73:38", + "text": "@dev L1 EOA debt share holders can call this single function to vote." + }, + "functionSelector": "9a9a8e1a", + "id": 6470, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6454, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5761:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5761:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6456, + "kind": "modifierInvocation", + "modifierName": { + "id": 6453, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5748:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5748:33:38" + } + ], + "name": "declareAndCast", + "nameLocation": "5605:14:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6452, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5739:8:38" + }, + "parameters": { + "id": 6451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "5637:9:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5629:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5629:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6447, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5675:11:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5656:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5656:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6446, + "nodeType": "ArrayTypeName", + "src": "5656:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "5715:10:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5696:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5696:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6449, + "nodeType": "ArrayTypeName", + "src": "5696:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5619:112:38" + }, + "returnParameters": { + "id": 6457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5782:0:38" + }, + "scope": 6628, + "src": "5596:292:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6125 + ], + "body": { + "id": 6485, + "nodeType": "Block", + "src": "5965:102:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6478, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6000:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6477, + "name": "_setCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6939, + "src": "5975:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5975:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6480, + "nodeType": "ExpressionStatement", + "src": "5975:35:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6482, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6050:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6481, + "name": "CrossDomainMessengerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4080, + "src": "6026:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:34:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6484, + "nodeType": "EmitStatement", + "src": "6021:39:38" + } + ] + }, + "functionSelector": "211de0b4", + "id": 6486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6475, + "kind": "modifierInvocation", + "modifierName": { + "id": 6474, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5955:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "5955:9:38" + } + ], + "name": "setCrossDomainMessenger", + "nameLocation": "5903:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "5935:9:38", + "nodeType": "VariableDeclaration", + "scope": 6486, + "src": "5927:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5927:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5926:19:38" + }, + "returnParameters": { + "id": 6476, + "nodeType": "ParameterList", + "parameters": [], + "src": "5965:0:38" + }, + "scope": 6628, + "src": "5894:173:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6131 + ], + "body": { + "id": 6494, + "nodeType": "Block", + "src": "6140:50:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6491, + "name": "_getCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6952, + "src": "6157:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 6492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6157:26:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6490, + "id": 6493, + "nodeType": "Return", + "src": "6150:33:38" + } + ] + }, + "functionSelector": "f675fa62", + "id": 6495, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "6082:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6487, + "nodeType": "ParameterList", + "parameters": [], + "src": "6105:2:38" + }, + "returnParameters": { + "id": 6490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6489, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "6131:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6131:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6130:9:38" + }, + "scope": 6628, + "src": "6073:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6145 + ], + "body": { + "id": 6538, + "nodeType": "Block", + "src": "6870:377:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6514, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "6884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6884:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6904:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6884:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6522, + "nodeType": "IfStatement", + "src": "6880:78:38", + "trueBody": { + "id": 6521, + "nodeType": "Block", + "src": "6907:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6518, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "6928:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6928:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6520, + "nodeType": "RevertStatement", + "src": "6921:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6524, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7134:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6523, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "7107:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7107:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6526, + "nodeType": "ExpressionStatement", + "src": "7107:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6528, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7177:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6529, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6500, + "src": "7183:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6530, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6503, + "src": "7194:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6527, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "7150:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7150:56:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6532, + "nodeType": "ExpressionStatement", + "src": "7150:56:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6534, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7223:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6535, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "7229:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6533, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "7217:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7217:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6537, + "nodeType": "ExpressionStatement", + "src": "7217:23:38" + } + ] + }, + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "6196:454:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000)." + }, + "functionSelector": "4b144674", + "id": 6539, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6510, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "6849:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "6849:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6512, + "kind": "modifierInvocation", + "modifierName": { + "id": 6509, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "6836:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "6836:33:38" + } + ], + "name": "declareAndCastRelayed", + "nameLocation": "6664:21:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6508, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6827:8:38" + }, + "parameters": { + "id": 6507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6498, + "mutability": "mutable", + "name": "user", + "nameLocation": "6703:4:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6695:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6500, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "6725:9:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6717:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6499, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6717:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6503, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "6763:11:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6744:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6744:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6502, + "nodeType": "ArrayTypeName", + "src": "6744:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6506, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6803:10:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6784:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6784:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6505, + "nodeType": "ArrayTypeName", + "src": "6784:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6685:134:38" + }, + "returnParameters": { + "id": 6513, + "nodeType": "ParameterList", + "parameters": [], + "src": "6870:0:38" + }, + "scope": 6628, + "src": "6655:592:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6154 + ], + "body": { + "id": 6571, + "nodeType": "Block", + "src": "7776:310:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6553, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "7790:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7790:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7810:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "7790:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6561, + "nodeType": "IfStatement", + "src": "7786:78:38", + "trueBody": { + "id": 6560, + "nodeType": "Block", + "src": "7813:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6557, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "7834:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7834:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6559, + "nodeType": "RevertStatement", + "src": "7827:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6563, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8040:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6562, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "8013:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8013:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6565, + "nodeType": "ExpressionStatement", + "src": "8013:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6567, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8062:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "8068:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6566, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "8056:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8056:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6570, + "nodeType": "ExpressionStatement", + "src": "8056:23:38" + } + ] + }, + "documentation": { + "id": 6540, + "nodeType": "StructuredDocumentation", + "src": "7253:402:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000)." + }, + "functionSelector": "5a2b3fd7", + "id": 6572, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6549, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "7755:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "7755:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6551, + "kind": "modifierInvocation", + "modifierName": { + "id": 6548, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "7742:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "7742:33:38" + } + ], + "name": "castRelayed", + "nameLocation": "7669:11:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6547, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7733:8:38" + }, + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6542, + "mutability": "mutable", + "name": "user", + "nameLocation": "7689:4:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7681:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7681:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6545, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "7714:10:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7695:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6544, + "nodeType": "ArrayTypeName", + "src": "7695:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7680:45:38" + }, + "returnParameters": { + "id": 6552, + "nodeType": "ParameterList", + "parameters": [], + "src": "7776:0:38" + }, + "scope": 6628, + "src": "7660:426:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 5859 + ], + "body": { + "id": 6596, + "nodeType": "Block", + "src": "8426:135:38", + "statements": [ + { + "assignments": [ + 6582 + ], + "declarations": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8441:9:38", + "nodeType": "VariableDeclaration", + "scope": 6596, + "src": "8436:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6581, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8436:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6590, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6584, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8467:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6583, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "8453:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8453:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 6587, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8507:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6586, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "8475:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8475:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8453:59:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8436:76:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6593, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6582, + "src": "8544:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6591, + "name": "MathUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1708, + "src": "8530:8:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathUtil_$1708_$", + "typeString": "type(library MathUtil)" + } + }, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sqrt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1707, + "src": "8530:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8530:24:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6580, + "id": 6595, + "nodeType": "Return", + "src": "8523:31:38" + } + ] + }, + "documentation": { + "id": 6573, + "nodeType": "StructuredDocumentation", + "src": "8203:135:38", + "text": "@dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered" + }, + "id": 6597, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "8352:13:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6577, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8402:8:38" + }, + "parameters": { + "id": 6576, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6575, + "mutability": "mutable", + "name": "user", + "nameLocation": "8374:4:38", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8366:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8366:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "8365:14:38" + }, + "returnParameters": { + "id": 6580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8420:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6578, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8420:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8419:6:38" + }, + "scope": 6628, + "src": "8343:218:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 4104 + ], + "body": { + "id": 6626, + "nodeType": "Block", + "src": "8620:181:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6601, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "8630:5:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_ElectionModule_$6628_$", + "typeString": "type(contract super ElectionModule)" + } + }, + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_createNewEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 4104, + "src": "8630:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8630:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6605, + "nodeType": "ExpressionStatement", + "src": "8630:23:38" + }, + { + "assignments": [ + 6608 + ], + "declarations": [ + { + "constant": false, + "id": 6608, + "mutability": "mutable", + "name": "store", + "nameLocation": "8687:5:38", + "nodeType": "VariableDeclaration", + "scope": 6626, + "src": "8664:28:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6607, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6606, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6647, + "src": "8664:14:38" + }, + "referencedDeclaration": 6647, + "src": "8664:14:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6611, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6609, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "8695:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8695:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8664:48:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6612, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8723:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6639, + "src": "8723:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8723:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint128_$dyn_storage_ptr_$returns$_t_uint128_$bound_to$_t_array$_t_uint128_$dyn_storage_ptr_$", + "typeString": "function (uint128[] storage pointer) returns (uint128)" + } + }, + "id": 6617, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8723:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "8723:25:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6619, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8758:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6622, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6643, + "src": "8758:29:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8758:34:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$returns$_t_struct$_CrossChainDebtShareData_$6656_storage_$bound_to$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$", + "typeString": "function (struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage pointer) returns (struct DebtShareStorage.CrossChainDebtShareData storage ref)" + } + }, + "id": 6624, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8758:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6656_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "id": 6625, + "nodeType": "ExpressionStatement", + "src": "8758:36:38" + } + ] + }, + "id": 6627, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "8576:15:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6599, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8611:8:38" + }, + "parameters": { + "id": 6598, + "nodeType": "ParameterList", + "parameters": [], + "src": "8591:2:38" + }, + "returnParameters": { + "id": 6600, + "nodeType": "ParameterList", + "parameters": [], + "src": "8620:0:38" + }, + "scope": 6628, + "src": "8567:234:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6629, + "src": "1179:7624:38", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:8773:38" + } + }, + "contracts/Router.sol": { + "sourceCode": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n// GENERATED CODE - do not edit manually!!\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n\ncontract Router {\n error UnknownSelector(bytes4 sel);\n\n address private constant _ELECTION_INSPECTOR_MODULE = 0x6EABf41D76756D6973DFd3D034333D4F4FFd5B4e;\n address private constant _ELECTION_MODULE = 0xB5e9F6Be3A03F881018E51b59A2B1f2856D181fE;\n address private constant _OWNER_MODULE = 0x45eFa1587820488b4f3c0F06a08b3aA871E7B42C;\n address private constant _UPGRADE_MODULE = 0x028Cc633432a98b42e05A1175Ae9c19EFBb88237;\n\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n // Lookup table: Function selector => implementation contract\n bytes4 sig4 = msg.sig;\n address implementation;\n\n assembly {\n let sig32 := shr(224, sig4)\n\n function findImplementation(sig) -> result {\n if lt(sig,0x85160425) {\n if lt(sig,0x447068ef) {\n if lt(sig,0x211de0b4) {\n if lt(sig,0x0ebf4796) {\n switch sig\n case 0x0166451a { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0x0438d06e { result := _ELECTION_MODULE } // ElectionModule.setMinimumActiveMembers()\n case 0x086146d2 { result := _ELECTION_MODULE } // ElectionModule.getCurrentPeriod()\n case 0x09eef43e { result := _ELECTION_MODULE } // ElectionModule.hasVoted()\n case 0x0a8b471a { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotCandidatesInEpoch()\n leave\n }\n switch sig\n case 0x0ebf4796 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareContract()\n case 0x0f98dfba { result := _ELECTION_MODULE } // ElectionModule.getDefaultBallotEvaluationBatchSize()\n case 0x1209644e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.hasVotedInEpoch()\n case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n case 0x205569c2 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.wasNominated()\n leave\n }\n if lt(sig,0x362c906d) {\n switch sig\n case 0x211de0b4 { result := _ELECTION_MODULE } // ElectionModule.setCrossDomainMessenger()\n case 0x2810e1d6 { result := _ELECTION_MODULE } // ElectionModule.resolve()\n case 0x2c3c5ba3 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotesInEpoch()\n case 0x33f3f3de { result := _ELECTION_MODULE } // ElectionModule.setCrossChainDebtShareMerkleRoot()\n case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n leave\n }\n switch sig\n case 0x362c906d { result := _ELECTION_MODULE } // ElectionModule.getEpochEndDate()\n case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n case 0x37143233 { result := _ELECTION_MODULE } // ElectionModule.evaluate()\n case 0x3a3e6c81 { result := _ELECTION_MODULE } // ElectionModule.isNominated()\n case 0x3ac1c5fe { result := _ELECTION_MODULE } // ElectionModule.setMaxDateAdjustmentTolerance()\n leave\n }\n if lt(sig,0x655aaaca) {\n if lt(sig,0x54520478) {\n switch sig\n case 0x447068ef { result := _ELECTION_MODULE } // ElectionModule.getNextEpochSeatCount()\n case 0x49aed35c { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotedAtEpoch()\n case 0x4b144674 { result := _ELECTION_MODULE } // ElectionModule.declareAndCastRelayed()\n case 0x4b5dacac { result := _ELECTION_MODULE } // ElectionModule.setNextEpochSeatCount()\n case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n leave\n }\n switch sig\n case 0x54520478 { result := _ELECTION_MODULE } // ElectionModule.upgradeCouncilToken()\n case 0x5a2b3fd7 { result := _ELECTION_MODULE } // ElectionModule.castRelayed()\n case 0x606a6b76 { result := _ELECTION_MODULE } // ElectionModule.getCouncilMembers()\n case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n case 0x64deab73 { result := _ELECTION_MODULE } // ElectionModule.setDefaultBallotEvaluationBatchSize()\n leave\n }\n if lt(sig,0x79ba5097) {\n switch sig\n case 0x655aaaca { result := _ELECTION_MODULE } // ElectionModule.getBallotCandidates()\n case 0x714d8d0e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochStartDateForIndex()\n case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n case 0x793b9a9d { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getCandidateVotesInEpoch()\n case 0x796c5c80 { result := _ELECTION_MODULE } // ElectionModule.getDeclaredCrossChainDebtShare()\n leave\n }\n switch sig\n case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n case 0x7a3bc0ee { result := _ELECTION_MODULE } // ElectionModule.getBallotVotes()\n case 0x7d264ccb { result := _ELECTION_MODULE } // ElectionModule.declareCrossChainDebtShare()\n case 0x82e28473 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getVotingPeriodStartDateForIndex()\n case 0x84ae670c { result := _ELECTION_MODULE } // ElectionModule.cast()\n leave\n }\n if lt(sig,0xca80a2ed) {\n if lt(sig,0xaaf10f42) {\n if lt(sig,0x9636f67c) {\n switch sig\n case 0x85160425 { result := _ELECTION_MODULE } // ElectionModule.getMinimumActiveMembers()\n case 0x8625c053 { result := _ELECTION_MODULE } // ElectionModule.getMinEpochDurations()\n case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n case 0x8f701997 { result := _ELECTION_MODULE } // ElectionModule.tweakEpochSchedule()\n case 0x95ff6584 { result := _ELECTION_MODULE } // ElectionModule.getBallotVoted()\n leave\n }\n switch sig\n case 0x9636f67c { result := _ELECTION_MODULE } // ElectionModule.getNominees()\n case 0x9a25eaf3 { result := _ELECTION_MODULE } // ElectionModule.dismissMembers()\n case 0x9a9a8e1a { result := _ELECTION_MODULE } // ElectionModule.declareAndCast()\n case 0xa0f42837 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareSnapshotId()\n case 0xa25a9f3a { result := _ELECTION_MODULE } // ElectionModule.setMinEpochDurations()\n leave\n }\n if lt(sig,0xbb9c0920) {\n switch sig\n case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n case 0xaeff252a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareContract()\n case 0xb55c43d2 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRoot()\n case 0xb749be55 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNominationPeriodStartDateForIndex()\n case 0xba9a5b25 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochEndDateForIndex()\n leave\n }\n switch sig\n case 0xbb9c0920 { result := _ELECTION_MODULE } // ElectionModule.getVotePower()\n case 0xc07de0d3 { result := _ELECTION_MODULE } // ElectionModule.getCouncilToken()\n case 0xc14d0528 { result := _ELECTION_MODULE } // ElectionModule.modifyEpochSchedule()\n case 0xc5798523 { result := _ELECTION_MODULE } // ElectionModule.isElectionModuleInitialized()\n case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n leave\n }\n if lt(sig,0xe420d7f9) {\n if lt(sig,0xd83eb231) {\n switch sig\n case 0xca80a2ed { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNomineesAtEpoch()\n case 0xcce32c52 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getElectionWinnersInEpoch()\n case 0xce04e44c { result := _ELECTION_MODULE } // ElectionModule.getEpochStartDate()\n case 0xd11801cf { result := _ELECTION_MODULE } // ElectionModule.withdrawNomination()\n case 0xd82f25f0 { result := _ELECTION_MODULE } // ElectionModule.getCandidateVotes()\n leave\n }\n switch sig\n case 0xd83eb231 { result := _ELECTION_MODULE } // ElectionModule.withdrawVote()\n case 0xd9617851 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRootBlockNumber()\n case 0xdfe7cd3a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareSnapshotId()\n case 0xe1509015 { result := _ELECTION_MODULE } // ElectionModule.getVotingPeriodStartDate()\n case 0xe327b585 { result := _ELECTION_MODULE } // ElectionModule.isElectionEvaluated()\n leave\n }\n switch sig\n case 0xe420d7f9 { result := _ELECTION_MODULE } // ElectionModule.getNominationPeriodStartDate()\n case 0xe9544a51 { result := _ELECTION_MODULE } // ElectionModule.getMaxDateAdjustmentTolerance()\n case 0xedc968ba { result := _ELECTION_MODULE } // ElectionModule.calculateBallotId()\n case 0xee695137 { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0xf2516dbf { result := _ELECTION_MODULE } // ElectionModule.getElectionWinners()\n case 0xf2e56dea { result := _ELECTION_MODULE } // ElectionModule.getDebtShare()\n case 0xf675fa62 { result := _ELECTION_MODULE } // ElectionModule.getCrossDomainMessenger()\n case 0xfcd7e1d7 { result := _ELECTION_MODULE } // ElectionModule.nominate()\n case 0xffe7f643 { result := _ELECTION_MODULE } // ElectionModule.getEpochIndex()\n leave\n }\n\n implementation := findImplementation(sig32)\n }\n\n if (implementation == address(0)) {\n revert UnknownSelector(sig4);\n }\n\n // Delegatecall to the implementation contract\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "contracts/Router.sol", + "exportedSymbols": { + "Router": [ + 58 + ] + }, + "id": 59, + "license": "Unlicense", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "37:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Router", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 58, + "linearizedBaseContracts": [ + 58 + ], + "name": "Router", + "nameLocation": "451:6:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "UnknownSelector", + "nameLocation": "470:15:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "sel", + "nameLocation": "493:3:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "486:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "486:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "485:12:0" + }, + "src": "464:34:0" + }, + { + "constant": true, + "id": 8, + "mutability": "constant", + "name": "_ELECTION_INSPECTOR_MODULE", + "nameLocation": "529:26:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "504:96:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "504:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307836454142663431443736373536443639373344466433443033343333334434463446466435423465", + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x6EABf41D76756D6973DFd3D034333D4F4FFd5B4e" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 11, + "mutability": "constant", + "name": "_ELECTION_MODULE", + "nameLocation": "631:16:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "606:86:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "606:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307842356539463642653341303346383831303138453531623539413242316632383536443138316645", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "650:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xB5e9F6Be3A03F881018E51b59A2B1f2856D181fE" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 14, + "mutability": "constant", + "name": "_OWNER_MODULE", + "nameLocation": "723:13:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "698:83:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "698:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307834356546613135383738323034383862346633633046303661303862336141383731453742343243", + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "739:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x45eFa1587820488b4f3c0F06a08b3aA871E7B42C" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 17, + "mutability": "constant", + "name": "_UPGRADE_MODULE", + "nameLocation": "812:15:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "787:85:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "787:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307830323843633633333433326139386234326530354131313735416539633139454642623838323337", + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x028Cc633432a98b42e05A1175Ae9c19EFBb88237" + }, + "visibility": "private" + }, + { + "body": { + "id": 23, + "nodeType": "Block", + "src": "907:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 20, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "917:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "917:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22, + "nodeType": "ExpressionStatement", + "src": "917:10:0" + } + ] + }, + "id": 24, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "887:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:0:0" + }, + "scope": 58, + "src": "879:55:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 30, + "nodeType": "Block", + "src": "967:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "977:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "977:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 29, + "nodeType": "ExpressionStatement", + "src": "977:10:0" + } + ] + }, + "id": 31, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 25, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:2:0" + }, + "returnParameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:0" + }, + "scope": 58, + "src": "940:54:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 56, + "nodeType": "Block", + "src": "1029:11808:0", + "statements": [ + { + "assignments": [ + 35 + ], + "declarations": [ + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "sig4", + "nameLocation": "1116:4:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1109:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 34, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1109:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 38, + "initialValue": { + "expression": { + "id": 36, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1123:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "1123:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1109:21:0" + }, + { + "assignments": [ + 40 + ], + "declarations": [ + { + "constant": false, + "id": 40, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1148:14:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1140:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1140:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 41, + "nodeType": "VariableDeclarationStatement", + "src": "1140:22:0" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1182:11095:0", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1196:27:0", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1213:3:0", + "type": "", + "value": "224" + }, + { + "name": "sig4", + "nodeType": "YulIdentifier", + "src": "1218:4:0" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1209:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "1209:14:0" + }, + "variables": [ + { + "name": "sig32", + "nodeType": "YulTypedName", + "src": "1200:5:0", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1280:10930:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1320:5729:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1364:2901:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1412:1489:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1464:728:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1557:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1559:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1569:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1559:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1541:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1546:10:0", + "type": "", + "value": "0x0166451a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1681:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1683:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1693:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1683:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1665:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1670:10:0", + "type": "", + "value": "0x0438d06e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1804:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1806:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1816:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1806:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1788:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1793:10:0", + "type": "", + "value": "0x086146d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1920:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1922:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1932:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1922:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1904:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1909:10:0", + "type": "", + "value": "0x09eef43e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2028:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2030:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2040:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2030:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2012:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2017:10:0", + "type": "", + "value": "0x0a8b471a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1505:3:0" + }, + "nodeType": "YulSwitch", + "src": "1498:570:0" + }, + { + "nodeType": "YulLeave", + "src": "2157:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1448:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1452:10:0", + "type": "", + "value": "0x0ebf4796" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1445:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1445:18:0" + }, + "nodeType": "YulIf", + "src": "1442:750:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2276:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2278:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2288:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2278:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2260:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2265:10:0", + "type": "", + "value": "0x0ebf4796" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2392:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2394:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2404:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2394:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2376:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2381:10:0", + "type": "", + "value": "0x0f98dfba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2523:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2525:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2535:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2525:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2507:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2512:10:0", + "type": "", + "value": "0x1209644e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2653:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2655:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "2665:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2655:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2637:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2642:10:0", + "type": "", + "value": "0x1627540c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2759:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2761:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2771:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2761:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2743:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2748:10:0", + "type": "", + "value": "0x205569c2" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2228:3:0" + }, + "nodeType": "YulSwitch", + "src": "2221:578:0" + }, + { + "nodeType": "YulLeave", + "src": "2870:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1396:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1400:10:0", + "type": "", + "value": "0x211de0b4" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1393:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1393:18:0" + }, + "nodeType": "YulIf", + "src": "1390:1511:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2948:700:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3033:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3035:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3045:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3035:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3017:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3022:10:0", + "type": "", + "value": "0x211de0b4" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3152:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3154:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3164:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3154:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3136:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3141:10:0", + "type": "", + "value": "0x2810e1d6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3255:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3257:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "3267:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3257:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3239:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3244:10:0", + "type": "", + "value": "0x2c3c5ba3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3380:10:0", + "type": "", + "value": "0x33f3f3de" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3519:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3521:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "3531:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3521:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3503:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3508:10:0", + "type": "", + "value": "0x35eb2824" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2985:3:0" + }, + "nodeType": "YulSwitch", + "src": "2978:568:0" + }, + { + "nodeType": "YulLeave", + "src": "3617:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2932:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2936:10:0", + "type": "", + "value": "0x362c906d" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2929:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "2929:18:0" + }, + "nodeType": "YulIf", + "src": "2926:722:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3724:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3726:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3736:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3726:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3708:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3713:10:0", + "type": "", + "value": "0x362c906d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3831:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3833:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "3843:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3833:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3815:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3820:10:0", + "type": "", + "value": "0x3659cfe6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3930:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3932:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3942:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3932:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3914:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3919:10:0", + "type": "", + "value": "0x37143233" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4030:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4032:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4042:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4032:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4014:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4019:10:0", + "type": "", + "value": "0x3a3e6c81" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4133:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4135:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4145:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4135:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4117:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4122:10:0", + "type": "", + "value": "0x3ac1c5fe" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "3680:3:0" + }, + "nodeType": "YulSwitch", + "src": "3673:490:0" + }, + { + "nodeType": "YulLeave", + "src": "4238:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1348:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1352:10:0", + "type": "", + "value": "0x447068ef" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1345:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1345:18:0" + }, + "nodeType": "YulIf", + "src": "1342:2923:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4308:1383:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4356:691:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4441:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4443:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4453:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4443:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4425:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4430:10:0", + "type": "", + "value": "0x447068ef" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4558:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4560:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "4570:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4560:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4542:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4547:10:0", + "type": "", + "value": "0x49aed35c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4694:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4696:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4706:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4696:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4678:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4683:10:0", + "type": "", + "value": "0x4b144674" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4800:10:0", + "type": "", + "value": "0x4b5dacac" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4928:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4930:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "4940:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4930:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4912:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4917:10:0", + "type": "", + "value": "0x53a47bb7" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4393:3:0" + }, + "nodeType": "YulSwitch", + "src": "4386:569:0" + }, + { + "nodeType": "YulLeave", + "src": "5016:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4340:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4344:10:0", + "type": "", + "value": "0x54520478" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4337:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4337:18:0" + }, + "nodeType": "YulIf", + "src": "4334:713:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5123:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5125:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5135:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5125:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5107:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5112:10:0", + "type": "", + "value": "0x54520478" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5234:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5236:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5246:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5236:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5218:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5223:10:0", + "type": "", + "value": "0x5a2b3fd7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5337:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5339:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5349:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5339:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5321:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5326:10:0", + "type": "", + "value": "0x606a6b76" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5446:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5448:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "5458:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5448:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5430:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5435:10:0", + "type": "", + "value": "0x624bd96d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5553:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5555:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5565:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5555:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5537:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5542:10:0", + "type": "", + "value": "0x64deab73" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5079:3:0" + }, + "nodeType": "YulSwitch", + "src": "5072:511:0" + }, + { + "nodeType": "YulLeave", + "src": "5664:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4292:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4296:10:0", + "type": "", + "value": "0x655aaaca" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4289:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4289:18:0" + }, + "nodeType": "YulIf", + "src": "4286:1405:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5734:696:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5800:10:0", + "type": "", + "value": "0x655aaaca" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5922:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5924:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "5934:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5924:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5906:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5911:10:0", + "type": "", + "value": "0x714d8d0e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6058:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6060:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6070:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6060:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6042:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6047:10:0", + "type": "", + "value": "0x718fe928" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6162:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6164:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6174:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6164:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6146:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6151:10:0", + "type": "", + "value": "0x793b9a9d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6297:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6299:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6309:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6299:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6281:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6286:10:0", + "type": "", + "value": "0x796c5c80" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5767:3:0" + }, + "nodeType": "YulSwitch", + "src": "5760:567:0" + }, + { + "nodeType": "YulLeave", + "src": "6403:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5718:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5722:10:0", + "type": "", + "value": "0x79ba5097" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "5715:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "5715:18:0" + }, + "nodeType": "YulIf", + "src": "5712:718:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "6498:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6500:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6510:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6500:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6482:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6487:10:0", + "type": "", + "value": "0x79ba5097" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6584:10:0", + "type": "", + "value": "0x7a3bc0ee" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6697:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6699:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6709:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6699:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6681:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6686:10:0", + "type": "", + "value": "0x7d264ccb" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6811:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6813:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6823:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6795:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6800:10:0", + "type": "", + "value": "0x82e28473" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6950:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6952:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6962:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6952:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6934:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6939:10:0", + "type": "", + "value": "0x84ae670c" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "6458:3:0" + }, + "nodeType": "YulSwitch", + "src": "6451:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7026:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1304:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1308:10:0", + "type": "", + "value": "0x85160425" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1301:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1301:18:0" + }, + "nodeType": "YulIf", + "src": "1298:5751:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7088:2732:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7132:1330:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7180:654:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7265:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7267:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7277:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7267:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7249:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7254:10:0", + "type": "", + "value": "0x85160425" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7384:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7386:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7396:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7386:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7368:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7373:10:0", + "type": "", + "value": "0x8625c053" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7500:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7502:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "7512:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7502:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7484:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7489:10:0", + "type": "", + "value": "0x8da5cb5b" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7584:10:0", + "type": "", + "value": "0x8f701997" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7709:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7711:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7721:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7711:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7693:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7698:10:0", + "type": "", + "value": "0x95ff6584" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7217:3:0" + }, + "nodeType": "YulSwitch", + "src": "7210:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7803:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7164:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7168:10:0", + "type": "", + "value": "0x9636f67c" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7161:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7161:18:0" + }, + "nodeType": "YulIf", + "src": "7158:676:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7910:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7912:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7922:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7912:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7894:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7899:10:0", + "type": "", + "value": "0x9636f67c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8013:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8015:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8025:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8015:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7997:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8002:10:0", + "type": "", + "value": "0x9a25eaf3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8119:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8121:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8131:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8121:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8103:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8108:10:0", + "type": "", + "value": "0x9a9a8e1a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8225:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8227:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8237:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8227:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8209:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8214:10:0", + "type": "", + "value": "0xa0f42837" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8339:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8341:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8351:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8341:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8323:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8328:10:0", + "type": "", + "value": "0xa25a9f3a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7866:3:0" + }, + "nodeType": "YulSwitch", + "src": "7859:510:0" + }, + { + "nodeType": "YulLeave", + "src": "8435:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7116:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7120:10:0", + "type": "", + "value": "0xaaf10f42" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7113:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7113:18:0" + }, + "nodeType": "YulIf", + "src": "7110:1352:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8505:712:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "8582:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8584:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "8594:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8584:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8566:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8571:10:0", + "type": "", + "value": "0xaaf10f42" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8689:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8691:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8701:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8691:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8673:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8678:10:0", + "type": "", + "value": "0xaeff252a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8801:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8803:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8813:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8803:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8785:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8790:10:0", + "type": "", + "value": "0xb55c43d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8925:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8927:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "8937:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8927:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8909:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8914:10:0", + "type": "", + "value": "0xb749be55" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9072:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9074:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9084:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9074:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9056:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9061:10:0", + "type": "", + "value": "0xba9a5b25" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8538:3:0" + }, + "nodeType": "YulSwitch", + "src": "8531:581:0" + }, + { + "nodeType": "YulLeave", + "src": "9190:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8489:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8493:10:0", + "type": "", + "value": "0xbb9c0920" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8486:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "8486:18:0" + }, + "nodeType": "YulIf", + "src": "8483:734:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9285:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9287:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9297:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9287:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9269:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9274:10:0", + "type": "", + "value": "0xbb9c0920" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9385:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9387:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9397:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9387:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9369:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9374:10:0", + "type": "", + "value": "0xc07de0d3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9488:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9490:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9500:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9490:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9472:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9477:10:0", + "type": "", + "value": "0xc14d0528" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9584:10:0", + "type": "", + "value": "0xc5798523" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9710:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9712:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "9722:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9712:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9694:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9699:10:0", + "type": "", + "value": "0xc7f62cda" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9245:3:0" + }, + "nodeType": "YulSwitch", + "src": "9238:501:0" + }, + { + "nodeType": "YulLeave", + "src": "9797:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7072:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7076:10:0", + "type": "", + "value": "0xca80a2ed" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7069:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7069:18:0" + }, + "nodeType": "YulIf", + "src": "7066:2754:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9859:1360:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9903:681:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9980:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9982:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9992:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9982:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9964:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9969:10:0", + "type": "", + "value": "0xca80a2ed" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10109:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10111:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "10121:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10111:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10093:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10098:10:0", + "type": "", + "value": "0xcce32c52" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10245:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10247:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10257:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10247:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10229:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10234:10:0", + "type": "", + "value": "0xce04e44c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10354:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10356:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10366:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10356:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10338:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10343:10:0", + "type": "", + "value": "0xd11801cf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10464:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10466:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10476:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10466:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10448:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10453:10:0", + "type": "", + "value": "0xd82f25f0" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9936:3:0" + }, + "nodeType": "YulSwitch", + "src": "9929:565:0" + }, + { + "nodeType": "YulLeave", + "src": "10557:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9887:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9891:10:0", + "type": "", + "value": "0xd83eb231" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9884:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9884:18:0" + }, + "nodeType": "YulIf", + "src": "9881:703:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "10652:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10654:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10664:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10654:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10636:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10641:10:0", + "type": "", + "value": "0xd83eb231" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10752:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10754:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10764:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10754:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10736:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10741:10:0", + "type": "", + "value": "0xd9617851" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10883:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10885:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10895:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10885:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10867:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10872:10:0", + "type": "", + "value": "0xdfe7cd3a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10993:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10995:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11005:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10995:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10977:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10982:10:0", + "type": "", + "value": "0xe1509015" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11105:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11107:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11117:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11107:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11089:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11094:10:0", + "type": "", + "value": "0xe327b585" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "10612:3:0" + }, + "nodeType": "YulSwitch", + "src": "10605:530:0" + }, + { + "nodeType": "YulLeave", + "src": "11196:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9843:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9847:10:0", + "type": "", + "value": "0xe420d7f9" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9840:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9840:18:0" + }, + "nodeType": "YulIf", + "src": "9837:1382:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "11279:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11281:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11291:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11281:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11263:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11268:10:0", + "type": "", + "value": "0xe420d7f9" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11380:10:0", + "type": "", + "value": "0xe9544a51" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11504:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11506:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11516:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11506:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11488:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11493:10:0", + "type": "", + "value": "0xedc968ba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11605:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11607:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11617:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11607:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11589:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11594:10:0", + "type": "", + "value": "0xee695137" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11713:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11715:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11725:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11715:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11697:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11702:10:0", + "type": "", + "value": "0xf2516dbf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11815:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11817:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11827:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11817:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11799:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11804:10:0", + "type": "", + "value": "0xf2e56dea" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11911:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11913:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11923:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11913:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11895:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11900:10:0", + "type": "", + "value": "0xf675fa62" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12018:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12020:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12030:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12020:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12002:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12007:10:0", + "type": "", + "value": "0xfcd7e1d7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12110:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12112:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12122:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12112:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12094:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12099:10:0", + "type": "", + "value": "0xffe7f643" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "11243:3:0" + }, + "nodeType": "YulSwitch", + "src": "11236:904:0" + }, + { + "nodeType": "YulLeave", + "src": "12191:5:0" + } + ] + }, + "name": "findImplementation", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "sig", + "nodeType": "YulTypedName", + "src": "1265:3:0", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "1273:6:0", + "type": "" + } + ], + "src": "1237:10973:0" + }, + { + "nodeType": "YulAssignment", + "src": "12224:43:0", + "value": { + "arguments": [ + { + "name": "sig32", + "nodeType": "YulIdentifier", + "src": "12261:5:0" + } + ], + "functionName": { + "name": "findImplementation", + "nodeType": "YulIdentifier", + "src": "12242:18:0" + }, + "nodeType": "YulFunctionCall", + "src": "12242:25:0" + }, + "variableNames": [ + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12224:14:0" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "10121:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2040:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2535:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2771:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "3267:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "4570:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "5934:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6174:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6823:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "8937:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9084:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9992:26:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10257:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10366:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10476:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10664:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10764:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10895:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11005:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11117:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11291:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11516:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11617:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11725:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11827:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11923:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12030:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12122:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1569:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1693:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1816:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1932:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2288:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2404:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3045:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3164:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3736:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3942:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4042:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4145:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4453:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4706:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5135:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5246:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5349:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5565:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6309:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6709:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6962:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7277:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7396:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7721:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7922:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8025:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8131:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8237:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8351:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8701:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8813:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9297:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9397:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9500:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9607:16:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "2665:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "3531:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "4940:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "5458:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6070:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6510:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "7512:13:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "3843:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "8594:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "9722:15:0", + "valueSize": 1 + }, + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12224:14:0", + "valueSize": 1 + }, + { + "declaration": 35, + "isOffset": false, + "isSlot": false, + "src": "1218:4:0", + "valueSize": 1 + } + ], + "id": 42, + "nodeType": "InlineAssembly", + "src": "1173:11104:0" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 43, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "12291:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12317:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 44, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12309:7:0", + "typeDescriptions": {} + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12309:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12291:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 54, + "nodeType": "IfStatement", + "src": "12287:87:0", + "trueBody": { + "id": 53, + "nodeType": "Block", + "src": "12321:53:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 50, + "name": "sig4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12358:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 49, + "name": "UnknownSelector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "12342:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_bytes4_$returns$__$", + "typeString": "function (bytes4) pure" + } + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12342:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 52, + "nodeType": "RevertStatement", + "src": "12335:28:0" + } + ] + } + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "12448:383:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12475:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12478:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12481:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12481:14:0" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "12462:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12462:34:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12462:34:0" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "12510:74:0", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "12537:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "12537:5:0" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12544:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12560:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12563:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12563:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12579:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12582:1:0", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "12524:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12524:60:0" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "12514:6:0", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12612:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12615:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12618:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12618:16:0" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "12597:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12597:38:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12597:38:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "12682:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12707:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12710:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12710:16:0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "12700:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12700:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12700:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12675:66:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12680:1:0", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12762:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12787:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12790:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12790:16:0" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "12780:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12780:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12780:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12754:67:0", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12656:6:0" + }, + "nodeType": "YulSwitch", + "src": "12649:172:0" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12544:14:0", + "valueSize": 1 + } + ], + "id": 55, + "nodeType": "InlineAssembly", + "src": "12439:392:0" + } + ] + }, + "id": 57, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "1009:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1017:2:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [], + "src": "1029:0:0" + }, + "scope": 58, + "src": "1000:11837:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 59, + "src": "442:12397:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "37:12803:0" + } + } +} \ No newline at end of file diff --git a/packages/core-modules/contracts/modules/ElectionModule.sol b/packages/core-modules/contracts/modules/ElectionModule.sol index 702e25c906..227e3fd1af 100644 --- a/packages/core-modules/contracts/modules/ElectionModule.sol +++ b/packages/core-modules/contracts/modules/ElectionModule.sol @@ -99,7 +99,7 @@ contract ElectionModule is uint64 newNominationPeriodStartDate, uint64 newVotingPeriodStartDate, uint64 newEpochEndDate - ) external override onlyOwner onlyInPeriod(ElectionPeriod.Administration) { + ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) { _adjustEpochSchedule( _getCurrentEpoch(), newNominationPeriodStartDate, @@ -115,7 +115,7 @@ contract ElectionModule is uint64 newNominationPeriodStartDate, uint64 newVotingPeriodStartDate, uint64 newEpochEndDate - ) external override onlyOwner onlyInPeriod(ElectionPeriod.Administration) { + ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) { _adjustEpochSchedule( _getCurrentEpoch(), newNominationPeriodStartDate, diff --git a/packages/core-modules/contracts/submodules/election/ElectionSchedule.sol b/packages/core-modules/contracts/submodules/election/ElectionSchedule.sol index 1ab3ff3f4b..db47be66bd 100644 --- a/packages/core-modules/contracts/submodules/election/ElectionSchedule.sol +++ b/packages/core-modules/contracts/submodules/election/ElectionSchedule.sol @@ -114,6 +114,7 @@ contract ElectionSchedule is ElectionBase { bool ensureChangesAreSmall ) internal { uint64 maxDateAdjustmentTolerance = _electionSettings().maxDateAdjustmentTolerance; + ElectionPeriod initialPeriod = _getCurrentPeriod(); if (ensureChangesAreSmall) { if ( @@ -134,7 +135,7 @@ contract ElectionSchedule is ElectionBase { newEpochEndDate ); - if (_getCurrentPeriod() != ElectionPeriod.Administration) { + if (_getCurrentPeriod() != initialPeriod) { revert ChangesCurrentPeriod(); } } diff --git a/packages/core-modules/test/contracts/modules/ElectionModule/Schedule.test.js b/packages/core-modules/test/contracts/modules/ElectionModule/Schedule.test.js index 3447937b43..5bdb798708 100644 --- a/packages/core-modules/test/contracts/modules/ElectionModule/Schedule.test.js +++ b/packages/core-modules/test/contracts/modules/ElectionModule/Schedule.test.js @@ -129,7 +129,7 @@ describe('ElectionModule (schedule)', () => { }; // ---------------------------------- - // Evaluation behaviors + // Adjustments behaviors // ---------------------------------- const itRejectsAdjustments = () => { @@ -155,17 +155,13 @@ describe('ElectionModule (schedule)', () => { const itAcceptsAdjustments = () => { describe('when trying to adjust the epoch schedule', function () { before('fast forward', async function () { - await fastForwardTo( - (await ElectionModule.getNominationPeriodStartDate()) - daysToSeconds(1), - ethers.provider - ); - }); + const currentPeriod = (await ElectionModule.getCurrentPeriod()).toNumber(); + const targetTimestamp = + currentPeriod === ElectionPeriod.Administration + ? await ElectionModule.getNominationPeriodStartDate() + : await ElectionModule.getVotingPeriodStartDate(); - before('fast forward', async function () { - await fastForwardTo( - (await ElectionModule.getNominationPeriodStartDate()) - daysToSeconds(1), - ethers.provider - ); + await fastForwardTo(targetTimestamp.toNumber() - daysToSeconds(1), ethers.provider); }); before('take snapshot', async function () { @@ -230,7 +226,7 @@ describe('ElectionModule (schedule)', () => { ElectionModule.tweakEpochSchedule( (await ElectionModule.getNominationPeriodStartDate()).toNumber() - daysToSeconds(2), - (await ElectionModule.getVotingPeriodStartDate()).toNumber() + daysToSeconds(0.5), + (await ElectionModule.getVotingPeriodStartDate()).toNumber() - daysToSeconds(2), (await ElectionModule.getEpochEndDate()).toNumber() + daysToSeconds(4) ), 'ChangesCurrentPeriod' @@ -240,13 +236,16 @@ describe('ElectionModule (schedule)', () => { describe('which dont change the current period type', function () { before('adjust', async function () { - newEpochEndDate = - (await ElectionModule.getEpochEndDate()).toNumber() + daysToSeconds(4); - newNominationPeriodStartDate = - (await ElectionModule.getNominationPeriodStartDate()).toNumber() - - daysToSeconds(0.5); + const currentPeriod = await ElectionModule.getCurrentPeriod(); + + newNominationPeriodStartDate = currentPeriod.eq(ElectionPeriod.Administration) + ? (await ElectionModule.getNominationPeriodStartDate()).toNumber() + + daysToSeconds(0.5) + : (await ElectionModule.getNominationPeriodStartDate()).toNumber(); newVotingPeriodStartDate = (await ElectionModule.getVotingPeriodStartDate()).toNumber() + daysToSeconds(0.5); + newEpochEndDate = + (await ElectionModule.getEpochEndDate()).toNumber() + daysToSeconds(4); const tx = await ElectionModule.tweakEpochSchedule( newNominationPeriodStartDate, @@ -288,7 +287,7 @@ describe('ElectionModule (schedule)', () => { ElectionModule.modifyEpochSchedule( (await ElectionModule.getNominationPeriodStartDate()).toNumber() - daysToSeconds(2), - (await ElectionModule.getVotingPeriodStartDate()).toNumber() + daysToSeconds(100), + (await ElectionModule.getVotingPeriodStartDate()).toNumber() - daysToSeconds(2), (await ElectionModule.getEpochEndDate()).toNumber() + daysToSeconds(100) ), 'ChangesCurrentPeriod' @@ -298,13 +297,15 @@ describe('ElectionModule (schedule)', () => { describe('which dont change the current period type', function () { before('adjust', async function () { - newEpochEndDate = - (await ElectionModule.getEpochEndDate()).toNumber() + daysToSeconds(100); + const currentPeriod = await ElectionModule.getCurrentPeriod(); + newNominationPeriodStartDate = (await ElectionModule.getNominationPeriodStartDate()).toNumber() + - daysToSeconds(100); + (currentPeriod.eq(ElectionPeriod.Administration) ? daysToSeconds(100) : 0); newVotingPeriodStartDate = (await ElectionModule.getVotingPeriodStartDate()).toNumber() + daysToSeconds(100); + newEpochEndDate = + (await ElectionModule.getEpochEndDate()).toNumber() + daysToSeconds(100); const tx = await ElectionModule.modifyEpochSchedule( newNominationPeriodStartDate, @@ -416,7 +417,7 @@ describe('ElectionModule (schedule)', () => { itAcceptsWithdrawals(); itRejectsVotes(); itRejectsEvaluations(); - itRejectsAdjustments(); + itAcceptsAdjustments(); }); // ---------------------------------- diff --git a/packages/grants-council/deployments/optimistic-mainnet/official/2023-12-18-00.json b/packages/grants-council/deployments/optimistic-mainnet/official/2023-12-18-00.json new file mode 100644 index 0000000000..c25e51d097 --- /dev/null +++ b/packages/grants-council/deployments/optimistic-mainnet/official/2023-12-18-00.json @@ -0,0 +1,90 @@ +{ + "properties": { + "completed": true, + "totalGasUsed": "5631462" + }, + "transactions": { + "0x2169751d14e458434715bde431d087702b094f0dea21078f6a2d00951c25b599": { + "status": "confirmed", + "block": 113670521, + "description": "Deployment of contracts/modules/ElectionModule.sol:ElectionModule" + }, + "0xdf4ce82ed79392796b8ad1dd5dad49e02f47094b44983b56794bada887d7e93d": { + "status": "confirmed", + "block": 113670529, + "description": "Deployment of contracts/Router.sol:Router" + } + }, + "contracts": { + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": { + "deployedAddress": "0xaB4C5e5bE3E0609f5f5490621F61edf377949370", + "deployTransaction": "0xd249330bccdb2d7d8eb1e97d1116b47322b05deab4470be0e1c0dff2e249c979", + "isModule": true, + "deployedBytecodeHash": "0x1480c7a338366f52aa5d5edb9181e25dc7eefbdb1e7ab7447580d325fe9c7fc8", + "contractFullyQualifiedName": "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule", + "contractName": "ElectionInspectorModule", + "sourceName": "contracts/modules/ElectionInspectionModule.sol", + "deploymentBlock": 90348045, + "deploymentCommit": "04fea879760768de665ce4962aa381d67d6024b6", + "proxyAddress": "0x6891FfAA59c0Ce04b4E3C6eaa50CFc5E2fc77b77" + }, + "contracts/modules/ElectionModule.sol:ElectionModule": { + "deployedAddress": "0x2F00Fb36CE2BC3c7D90407A5399038Ef5118a0C9", + "deployTransaction": "0x2169751d14e458434715bde431d087702b094f0dea21078f6a2d00951c25b599", + "isModule": true, + "deployedBytecodeHash": "0x23f7d5ec07a95228bb2fdb862b484ee783377f724f5043a02d7efc23eb2e518d", + "contractFullyQualifiedName": "contracts/modules/ElectionModule.sol:ElectionModule", + "contractName": "ElectionModule", + "sourceName": "contracts/modules/ElectionModule.sol", + "deploymentBlock": 113670521, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67", + "proxyAddress": "0x6891FfAA59c0Ce04b4E3C6eaa50CFc5E2fc77b77" + }, + "contracts/modules/OwnerModule.sol:OwnerModule": { + "deployedAddress": "0xFCED732308759375fDDD853FC680A69B2C483dFA", + "deployTransaction": "0xdd408dcca559e1c910c54cae1ffbb311264f4f8d15571f89d76a4e4a08479409", + "isModule": true, + "deployedBytecodeHash": "0xfa5f32d34a9b72a207fe290a3bf7e6b506da8df11503cbd781d4a0e85e99fa75", + "contractFullyQualifiedName": "contracts/modules/OwnerModule.sol:OwnerModule", + "contractName": "OwnerModule", + "sourceName": "contracts/modules/OwnerModule.sol", + "deploymentBlock": 9313375, + "deploymentCommit": "517d6387b9272e3e56c4236944e9a22fa5809f7d", + "proxyAddress": "0x6891FfAA59c0Ce04b4E3C6eaa50CFc5E2fc77b77" + }, + "contracts/modules/UpgradeModule.sol:UpgradeModule": { + "deployedAddress": "0x235B51DD2D0F45f20f5B42E84A45aAC9Ea90B20D", + "deployTransaction": "0x679c8226de83cb35f4f1396622dd41d28a145a2fb76bc6123a598de069b8b378", + "isModule": true, + "deployedBytecodeHash": "0xb0900efdf426a3b3737cd397b332e658d9cc4155b64d64965a40b3324676d56b", + "contractFullyQualifiedName": "contracts/modules/UpgradeModule.sol:UpgradeModule", + "contractName": "UpgradeModule", + "sourceName": "contracts/modules/UpgradeModule.sol", + "deploymentBlock": 9313379, + "deploymentCommit": "517d6387b9272e3e56c4236944e9a22fa5809f7d", + "proxyAddress": "0x6891FfAA59c0Ce04b4E3C6eaa50CFc5E2fc77b77" + }, + "contracts/GrantsCouncil.sol:GrantsCouncil": { + "deployedAddress": "0x6891FfAA59c0Ce04b4E3C6eaa50CFc5E2fc77b77", + "deployTransaction": "0xfde14dff497e84894789d288905c964d3356d3451e2e3215753ccd93dba79219", + "isProxy": true, + "deployedBytecodeHash": "0x4f5767967171a16ba0a419f416f6512655db2288302d0c2cd2e61a8db9d6e2bc", + "contractFullyQualifiedName": "contracts/GrantsCouncil.sol:GrantsCouncil", + "contractName": "GrantsCouncil", + "sourceName": "contracts/GrantsCouncil.sol", + "deploymentBlock": 9313419, + "deploymentCommit": "517d6387b9272e3e56c4236944e9a22fa5809f7d" + }, + "contracts/Router.sol:Router": { + "deployedAddress": "0xefcd5c68616A0f686413f4B58A4A66ff4898970e", + "deployTransaction": "0xdf4ce82ed79392796b8ad1dd5dad49e02f47094b44983b56794bada887d7e93d", + "isRouter": true, + "deployedBytecodeHash": "0x06ea6a1a56195c54ea19d48feeec5292e91afc693d37c10d217a2c9f1c7ecd01", + "contractFullyQualifiedName": "contracts/Router.sol:Router", + "contractName": "Router", + "sourceName": "contracts/Router.sol", + "deploymentBlock": 113670529, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67" + } + } +} \ No newline at end of file diff --git a/packages/grants-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json b/packages/grants-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json new file mode 100644 index 0000000000..86df58cfd7 --- /dev/null +++ b/packages/grants-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json @@ -0,0 +1,13443 @@ +{ + "@synthetixio/core-contracts/contracts/errors/AccessError.sol:AccessError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/AddressError.sol:AddressError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol:ArrayError": [ + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol:ChangeError": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/InitError.sol:InitError": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol:InitializableMixin": [], + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol:IERC165": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol:IERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol:IERC721Metadata": [ + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol:IERC721Receiver": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol:IOwnable": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol:IUUPSImplementation": [ + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol:Ownable": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol:OwnableMixin": [], + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol:OwnableStorage": [], + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol:AbstractProxy": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol:ProxyStorage": [], + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol:UUPSImplementation": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol:UUPSProxy": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721.sol:ERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol:ERC721Storage": [], + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol:AddressUtil": [], + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol:MathUtil": [], + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol:MerkleProof": [], + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol:SetUtil": [ + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol:StringUtil": [], + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol:IElectionInspectorModule": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol:IElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol:IOwnerModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol:ElectionStorage": [], + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol:ElectionBase": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol:ElectionCredentials": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol:ElectionSchedule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol:ElectionTally": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol:ElectionVotes": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol:CouncilToken": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "TokenIsNotTransferable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "tokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol:ICrossDomainMessenger": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "gasLimit", + "type": "uint32" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol:IDebtShare": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "periodId", + "type": "uint256" + } + ], + "name": "balanceOfOnPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol:ISynthetixElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDebtShareContractAddress", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol:DebtShareStorage": [], + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol:CrossChainDebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol:DebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "contracts/GrantsCouncil.sol:GrantsCouncil": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/Router.sol:Router": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "sel", + "type": "bytes4" + } + ], + "name": "UnknownSelector", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/packages/grants-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json b/packages/grants-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json new file mode 100644 index 0000000000..06667eaf32 --- /dev/null +++ b/packages/grants-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json @@ -0,0 +1,98749 @@ +{ + "contracts/GrantsCouncil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\n\ncontract GrantsCouncil is UUPSProxy {\n // solhint-disable-next-line no-empty-blocks\n constructor(address firstImplementation) UUPSProxy(firstImplementation) {}\n}\n", + "ast": { + "absolutePath": "contracts/GrantsCouncil.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "GrantsCouncil": [ + 7144 + ], + "ProxyStorage": [ + 542 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 7145, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7131, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:46" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 7132, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7145, + "sourceUnit": 817, + "src": "56:67:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7133, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "151:9:46" + }, + "id": 7134, + "nodeType": "InheritanceSpecifier", + "src": "151:9:46" + } + ], + "canonicalName": "GrantsCouncil", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7144, + "linearizedBaseContracts": [ + 7144, + 816, + 542, + 526 + ], + "name": "GrantsCouncil", + "nameLocation": "134:13:46", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 7142, + "nodeType": "Block", + "src": "288:2:46", + "statements": [] + }, + "id": 7143, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "id": 7139, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7136, + "src": "267:19:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7140, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 7138, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "257:9:46" + }, + "nodeType": "ModifierInvocation", + "src": "257:30:46" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7136, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "236:19:46", + "nodeType": "VariableDeclaration", + "scope": 7143, + "src": "228:27:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "228:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "227:29:46" + }, + "returnParameters": { + "id": 7141, + "nodeType": "ParameterList", + "parameters": [], + "src": "288:0:46" + }, + "scope": 7144, + "src": "216:74:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 7145, + "src": "125:167:46", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:262:46" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./AbstractProxy.sol\";\nimport \"./ProxyStorage.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../utils/AddressUtil.sol\";\n\ncontract UUPSProxy is AbstractProxy, ProxyStorage {\n constructor(address firstImplementation) {\n if (firstImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(firstImplementation)) {\n revert AddressError.NotAContract(firstImplementation);\n }\n\n _proxyStore().implementation = firstImplementation;\n }\n\n function _getImplementation() internal view virtual override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ProxyStorage": [ + 542 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 817, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 758, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:18" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "file": "./AbstractProxy.sol", + "id": 759, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 527, + "src": "56:29:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 760, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 543, + "src": "86:28:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 761, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 16, + "src": "115:36:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 762, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 1697, + "src": "152:34:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 763, + "name": "AbstractProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 526, + "src": "210:13:18" + }, + "id": 764, + "nodeType": "InheritanceSpecifier", + "src": "210:13:18" + }, + { + "baseName": { + "id": 765, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "225:12:18" + }, + "id": 766, + "nodeType": "InheritanceSpecifier", + "src": "225:12:18" + } + ], + "canonicalName": "UUPSProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 816, + "linearizedBaseContracts": [ + 816, + 542, + 526 + ], + "name": "UUPSProxy", + "nameLocation": "197:9:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 803, + "nodeType": "Block", + "src": "285:312:18", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 771, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "299:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "322:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 772, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "322:7:18", + "typeDescriptions": {} + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "322:10:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "299:33:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 783, + "nodeType": "IfStatement", + "src": "295:97:18", + "trueBody": { + "id": 782, + "nodeType": "Block", + "src": "334:58:18", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 777, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "355:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "355:24:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "355:26:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 781, + "nodeType": "RevertStatement", + "src": "348:33:18" + } + ] + } + }, + { + "condition": { + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "406:44:18", + "subExpression": { + "arguments": [ + { + "id": 786, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "430:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 784, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "407:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "407:22:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "407:43:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 796, + "nodeType": "IfStatement", + "src": "402:128:18", + "trueBody": { + "id": 795, + "nodeType": "Block", + "src": "452:78:18", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 792, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "499:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 789, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "473:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "473:25:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:46:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 794, + "nodeType": "RevertStatement", + "src": "466:53:18" + } + ] + } + }, + { + "expression": { + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 797, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "540:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "540:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "540:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 800, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "571:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "540:50:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 802, + "nodeType": "ExpressionStatement", + "src": "540:50:18" + } + ] + }, + "id": 804, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "264:19:18", + "nodeType": "VariableDeclaration", + "scope": 804, + "src": "256:27:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "255:29:18" + }, + "returnParameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [], + "src": "285:0:18" + }, + "scope": 816, + "src": "244:353:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 525 + ], + "body": { + "id": 814, + "nodeType": "Block", + "src": "682:52:18", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 810, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "699:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "699:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 812, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "699:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 809, + "id": 813, + "nodeType": "Return", + "src": "692:35:18" + } + ] + }, + "id": 815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "612:18:18", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 806, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "655:8:18" + }, + "parameters": { + "id": 805, + "nodeType": "ParameterList", + "parameters": [], + "src": "630:2:18" + }, + "returnParameters": { + "id": 809, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 808, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 815, + "src": "673:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "673:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "672:9:18" + }, + "scope": 816, + "src": "603:131:18", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 817, + "src": "188:548:18", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:706:18" + } + }, + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nabstract contract AbstractProxy {\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n address implementation = _getImplementation();\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _getImplementation() internal view virtual returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ] + }, + "id": 527, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 496, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:15" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "AbstractProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 526, + "linearizedBaseContracts": [ + 526 + ], + "name": "AbstractProxy", + "nameLocation": "74:13:15", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "122:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 499, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "132:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "132:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "132:10:15" + } + ] + }, + "id": 503, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 497, + "nodeType": "ParameterList", + "parameters": [], + "src": "102:2:15" + }, + "returnParameters": { + "id": 498, + "nodeType": "ParameterList", + "parameters": [], + "src": "122:0:15" + }, + "scope": 526, + "src": "94:55:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "182:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 506, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "192:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "192:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 508, + "nodeType": "ExpressionStatement", + "src": "192:10:15" + } + ] + }, + "id": 510, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 504, + "nodeType": "ParameterList", + "parameters": [], + "src": "162:2:15" + }, + "returnParameters": { + "id": 505, + "nodeType": "ParameterList", + "parameters": [], + "src": "182:0:15" + }, + "scope": 526, + "src": "155:54:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 519, + "nodeType": "Block", + "src": "244:521:15", + "statements": [ + { + "assignments": [ + 514 + ], + "declarations": [ + { + "constant": false, + "id": 514, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "262:14:15", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "254:22:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "254:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 517, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 515, + "name": "_getImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "279:18:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "279:20:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "254:45:15" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "375:384:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "402:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "405:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "408:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "408:14:15" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "389:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "389:34:15" + }, + "nodeType": "YulExpressionStatement", + "src": "389:34:15" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "437:74:15", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "464:3:15" + }, + "nodeType": "YulFunctionCall", + "src": "464:5:15" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "471:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "487:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "490:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "490:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "506:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "509:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "451:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "451:60:15" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "441:6:15", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "540:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "543:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "546:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "546:16:15" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "525:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "525:38:15" + }, + "nodeType": "YulExpressionStatement", + "src": "525:38:15" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "610:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "635:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "638:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "638:16:15" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "628:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "628:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "628:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "603:66:15", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "608:1:15", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "690:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "715:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "718:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "718:16:15" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "708:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "708:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "708:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "682:67:15", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "584:6:15" + }, + "nodeType": "YulSwitch", + "src": "577:172:15" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 514, + "isOffset": false, + "isSlot": false, + "src": "471:14:15", + "valueSize": 1 + } + ], + "id": 518, + "nodeType": "InlineAssembly", + "src": "366:393:15" + } + ] + }, + "id": 520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "224:8:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "232:2:15" + }, + "returnParameters": { + "id": 512, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:0:15" + }, + "scope": 526, + "src": "215:550:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 525, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "780:18:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 521, + "nodeType": "ParameterList", + "parameters": [], + "src": "798:2:15" + }, + "returnParameters": { + "id": 524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 525, + "src": "832:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "832:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "831:9:15" + }, + "scope": 526, + "src": "771:70:15", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 527, + "src": "56:787:15", + "usedErrors": [] + } + ], + "src": "31:813:15" + } + }, + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ProxyStorage {\n struct ProxyStore {\n address implementation;\n bool simulatingUpgrade;\n }\n\n function _proxyStore() internal pure returns (ProxyStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.v3.proxy\")) - 1)\n store.slot := 0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "exportedSymbols": { + "ProxyStorage": [ + 542 + ] + }, + "id": 543, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 528, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:16" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ProxyStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 542, + "linearizedBaseContracts": [ + 542 + ], + "name": "ProxyStorage", + "nameLocation": "65:12:16", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ProxyStorage.ProxyStore", + "id": 533, + "members": [ + { + "constant": false, + "id": 530, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "120:14:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "112:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "112:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 532, + "mutability": "mutable", + "name": "simulatingUpgrade", + "nameLocation": "149:17:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "144:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 531, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "144:4:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "name": "ProxyStore", + "nameLocation": "91:10:16", + "nodeType": "StructDefinition", + "scope": 542, + "src": "84:89:16", + "visibility": "public" + }, + { + "body": { + "id": 540, + "nodeType": "Block", + "src": "251:198:16", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "270:173:16", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "353:80:16", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "367:66:16", + "type": "", + "value": "0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "353:10:16" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 537, + "isOffset": false, + "isSlot": true, + "src": "353:10:16", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 539, + "nodeType": "InlineAssembly", + "src": "261:182:16" + } + ] + }, + "id": 541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_proxyStore", + "nameLocation": "188:11:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:16" + }, + "returnParameters": { + "id": 538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 537, + "mutability": "mutable", + "name": "store", + "nameLocation": "244:5:16", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "225:24:16", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 536, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 535, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "225:10:16" + }, + "referencedDeclaration": 533, + "src": "225:10:16", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "src": "224:26:16" + }, + "scope": 542, + "src": "179:270:16", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 543, + "src": "56:395:16", + "usedErrors": [] + } + ], + "src": "31:421:16" + } + }, + "@synthetixio/core-contracts/contracts/errors/AddressError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressError {\n error ZeroAddress();\n error NotAContract(address contr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ] + }, + "id": 16, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:1" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 15, + "linearizedBaseContracts": [ + 15 + ], + "name": "AddressError", + "nameLocation": "64:12:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 10, + "name": "ZeroAddress", + "nameLocation": "89:11:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "100:2:1" + }, + "src": "83:20:1" + }, + { + "id": 14, + "name": "NotAContract", + "nameLocation": "114:12:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12, + "mutability": "mutable", + "name": "contr", + "nameLocation": "135:5:1", + "nodeType": "VariableDeclaration", + "scope": 14, + "src": "127:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "127:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "126:15:1" + }, + "src": "108:34:1" + } + ], + "scope": 16, + "src": "56:88:1", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:114:1" + } + }, + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressUtil {\n function isContract(address account) internal view returns (bool) {\n uint256 size;\n\n assembly {\n size := extcodesize(account)\n }\n\n return size > 0;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "exportedSymbols": { + "AddressUtil": [ + 1696 + ] + }, + "id": 1697, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1679, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:21" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1696, + "linearizedBaseContracts": [ + 1696 + ], + "name": "AddressUtil", + "nameLocation": "64:11:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1694, + "nodeType": "Block", + "src": "148:126:21", + "statements": [ + { + "assignments": [ + 1687 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "size", + "nameLocation": "166:4:21", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "158:12:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "158:7:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1688, + "nodeType": "VariableDeclarationStatement", + "src": "158:12:21" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "190:52:21", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "204:28:21", + "value": { + "arguments": [ + { + "name": "account", + "nodeType": "YulIdentifier", + "src": "224:7:21" + } + ], + "functionName": { + "name": "extcodesize", + "nodeType": "YulIdentifier", + "src": "212:11:21" + }, + "nodeType": "YulFunctionCall", + "src": "212:20:21" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "204:4:21" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1681, + "isOffset": false, + "isSlot": false, + "src": "224:7:21", + "valueSize": 1 + }, + { + "declaration": 1687, + "isOffset": false, + "isSlot": false, + "src": "204:4:21", + "valueSize": 1 + } + ], + "id": 1689, + "nodeType": "InlineAssembly", + "src": "181:61:21" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1690, + "name": "size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "259:4:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "266:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "259:8:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1685, + "id": 1693, + "nodeType": "Return", + "src": "252:15:21" + } + ] + }, + "id": 1695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isContract", + "nameLocation": "91:10:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1681, + "mutability": "mutable", + "name": "account", + "nameLocation": "110:7:21", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "102:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "101:17:21" + }, + "returnParameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "142:4:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "142:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "141:6:21" + }, + "scope": 1696, + "src": "82:192:21", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1697, + "src": "56:220:21", + "usedErrors": [] + } + ], + "src": "31:246:21" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ArrayError.sol\";\nimport \"../../tokens/CouncilToken.sol\";\nimport \"./ElectionBase.sol\";\n\n/// @dev Core functionality for keeping track of council members with an NFT token\ncontract ElectionCredentials is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _createCouncilToken(string memory tokenName, string memory tokenSymbol) internal {\n CouncilToken implementation = new CouncilToken();\n\n UUPSProxy proxy = new UUPSProxy(address(implementation));\n\n CouncilToken token = CouncilToken(address(proxy));\n\n token.nominateNewOwner(address(this));\n token.acceptOwnership();\n\n token.initialize(tokenName, tokenSymbol);\n\n _electionStore().councilToken = address(token);\n\n emit CouncilTokenCreated(address(proxy), address(implementation));\n }\n\n function _removeAllCouncilMembers(uint epochIndex) internal {\n SetUtil.AddressSet storage members = _electionStore().councilMembers;\n\n uint numMembers = members.length();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n // Always removes the first element in the array\n // until none are left.\n _removeCouncilMember(members.valueAt(1), epochIndex);\n }\n }\n\n function _addCouncilMembers(address[] memory membersToAdd, uint epochIndex) internal {\n uint numMembers = membersToAdd.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _addCouncilMember(membersToAdd[memberIndex], epochIndex);\n }\n }\n\n function _removeCouncilMembers(address[] memory membersToRemove, uint epochIndex) internal {\n uint numMembers = membersToRemove.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _removeCouncilMember(membersToRemove[memberIndex], epochIndex);\n }\n }\n\n function _addCouncilMember(address newMember, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (members.contains(newMember)) {\n revert AlreadyACouncilMember();\n }\n\n members.add(newMember);\n\n // Note that tokenId = 0 will not be used.\n uint tokenId = members.length();\n _getCouncilToken().mint(newMember, tokenId);\n\n store.councilTokenIds[newMember] = tokenId;\n\n emit CouncilMemberAdded(newMember, epochIndex);\n }\n\n function _removeCouncilMember(address member, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (!members.contains(member)) {\n revert NotACouncilMember();\n }\n\n members.remove(member);\n\n uint tokenId = _getCouncilMemberTokenId(member);\n _getCouncilToken().burn(tokenId);\n\n // tokenId = 0 means no associated token.\n store.councilTokenIds[member] = 0;\n\n emit CouncilMemberRemoved(member, epochIndex);\n }\n\n function _getCouncilToken() private view returns (CouncilToken) {\n return CouncilToken(_electionStore().councilToken);\n }\n\n function _getCouncilMemberTokenId(address member) private view returns (uint) {\n uint tokenId = _electionStore().councilTokenIds[member];\n\n if (tokenId == 0) revert NotACouncilMember();\n\n return tokenId;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionStorage": [ + 4331 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 5066, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4685, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:35" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 4686, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 817, + "src": "56:67:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "id": 4687, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 21, + "src": "124:69:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "file": "../../tokens/CouncilToken.sol", + "id": 4688, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 6380, + "src": "194:39:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 4689, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 4684, + "src": "234:28:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4691, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "379:12:35" + }, + "id": 4692, + "nodeType": "InheritanceSpecifier", + "src": "379:12:35" + } + ], + "canonicalName": "ElectionCredentials", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4690, + "nodeType": "StructuredDocumentation", + "src": "264:83:35", + "text": "@dev Core functionality for keeping track of council members with an NFT token" + }, + "fullyImplemented": true, + "id": 5065, + "linearizedBaseContracts": [ + 5065, + 4683, + 4331 + ], + "name": "ElectionCredentials", + "nameLocation": "356:19:35", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4696, + "libraryName": { + "id": 4693, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "404:7:35" + }, + "nodeType": "UsingForDirective", + "src": "398:37:35", + "typeName": { + "id": 4695, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4694, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "416:18:35" + }, + "referencedDeclaration": 1788, + "src": "416:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 4774, + "nodeType": "Block", + "src": "531:457:35", + "statements": [ + { + "assignments": [ + 4705 + ], + "declarations": [ + { + "constant": false, + "id": 4705, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "554:14:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "541:27:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4704, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4703, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "541:12:35" + }, + "referencedDeclaration": 6379, + "src": "541:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "571:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () returns (contract CouncilToken)" + }, + "typeName": { + "id": 4707, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4706, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "575:12:35" + }, + "referencedDeclaration": 6379, + "src": "575:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + }, + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "571:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "541:48:35" + }, + { + "assignments": [ + 4713 + ], + "declarations": [ + { + "constant": false, + "id": 4713, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "610:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "600:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + }, + "typeName": { + "id": 4712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4711, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "600:9:35" + }, + "referencedDeclaration": 816, + "src": "600:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "visibility": "internal" + } + ], + "id": 4722, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4719, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "640:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "632:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:35", + "typeDescriptions": {} + } + }, + "id": 4720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "618:13:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_UUPSProxy_$816_$", + "typeString": "function (address) returns (contract UUPSProxy)" + }, + "typeName": { + "id": 4715, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4714, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "622:9:35" + }, + "referencedDeclaration": 816, + "src": "622:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + }, + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "618:38:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "600:56:35" + }, + { + "assignments": [ + 4725 + ], + "declarations": [ + { + "constant": false, + "id": 4725, + "mutability": "mutable", + "name": "token", + "nameLocation": "680:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "667:18:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4724, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4723, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "667:12:35" + }, + "referencedDeclaration": 6379, + "src": "667:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4732, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4729, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "709:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "701:7:35", + "typeDescriptions": {} + } + }, + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4726, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "688:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 4731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "688:28:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "667:49:35" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4738, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "758:4:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + ], + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "750:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "750:7:35", + "typeDescriptions": {} + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "750:13:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4733, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "727:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "nominateNewOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 359, + "src": "727:22:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "727:37:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4741, + "nodeType": "ExpressionStatement", + "src": "727:37:35" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4742, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "774:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 310, + "src": "774:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "774:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4746, + "nodeType": "ExpressionStatement", + "src": "774:23:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4750, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4698, + "src": "825:9:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 4751, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4700, + "src": "836:11:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 4747, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "808:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 6308, + "src": "808:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory) external" + } + }, + "id": 4752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "808:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4753, + "nodeType": "ExpressionStatement", + "src": "808:40:35" + }, + { + "expression": { + "id": 4761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4754, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "859:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "859:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "859:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4759, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "899:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "891:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:35", + "typeDescriptions": {} + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "891:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "859:46:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4762, + "nodeType": "ExpressionStatement", + "src": "859:46:35" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 4766, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "949:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "941:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "941:7:35", + "typeDescriptions": {} + } + }, + "id": 4767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "941:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 4770, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "965:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "957:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "957:7:35", + "typeDescriptions": {} + } + }, + "id": 4771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "957:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4763, + "name": "CouncilTokenCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4390, + "src": "921:19:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:60:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4773, + "nodeType": "EmitStatement", + "src": "916:65:35" + } + ] + }, + "id": 4775, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createCouncilToken", + "nameLocation": "450:19:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4698, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "484:9:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "470:23:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "470:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4700, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "509:11:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "495:25:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4699, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "495:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "469:52:35" + }, + "returnParameters": { + "id": 4702, + "nodeType": "ParameterList", + "parameters": [], + "src": "531:0:35" + }, + "scope": 5065, + "src": "441:547:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4815, + "nodeType": "Block", + "src": "1054:382:35", + "statements": [ + { + "assignments": [ + 4784 + ], + "declarations": [ + { + "constant": false, + "id": 4784, + "mutability": "mutable", + "name": "members", + "nameLocation": "1091:7:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1064:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4783, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4782, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1064:18:35" + }, + "referencedDeclaration": 1788, + "src": "1064:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4788, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4785, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1101:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1101:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "1101:31:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1064:68:35" + }, + { + "assignments": [ + 4790 + ], + "declarations": [ + { + "constant": false, + "id": 4790, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1148:10:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1143:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1143:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4794, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1161:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "1161:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1161:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1143:34:35" + }, + { + "body": { + "id": 4813, + "nodeType": "Block", + "src": "1256:174:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "31", + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1404:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 4806, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1388:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "1388:15:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1388:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4810, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4777, + "src": "1408:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4805, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "1367:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1367:52:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4812, + "nodeType": "ExpressionStatement", + "src": "1367:52:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4799, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1215:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4800, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4790, + "src": "1229:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1215:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4814, + "initializationExpression": { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1198:11:35", + "nodeType": "VariableDeclaration", + "scope": 4814, + "src": "1193:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4795, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1193:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4798, + "initialValue": { + "hexValue": "30", + "id": 4797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1212:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1193:20:35" + }, + "loopExpression": { + "expression": { + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1241:13:35", + "subExpression": { + "id": 4802, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1241:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4804, + "nodeType": "ExpressionStatement", + "src": "1241:13:35" + }, + "nodeType": "ForStatement", + "src": "1188:242:35" + } + ] + }, + "id": 4816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeAllCouncilMembers", + "nameLocation": "1003:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4777, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1033:10:35", + "nodeType": "VariableDeclaration", + "scope": 4816, + "src": "1028:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1028:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1027:17:35" + }, + "returnParameters": { + "id": 4779, + "nodeType": "ParameterList", + "parameters": [], + "src": "1054:0:35" + }, + "scope": 5065, + "src": "994:442:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4857, + "nodeType": "Block", + "src": "1527:274:35", + "statements": [ + { + "assignments": [ + 4825 + ], + "declarations": [ + { + "constant": false, + "id": 4825, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1542:10:35", + "nodeType": "VariableDeclaration", + "scope": 4857, + "src": "1537:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1537:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4828, + "initialValue": { + "expression": { + "id": 4826, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1555:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1555:19:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1537:37:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4829, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1588:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1602:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1588:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4837, + "nodeType": "IfStatement", + "src": "1584:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4832, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1612:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1612:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1612:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4836, + "nodeType": "RevertStatement", + "src": "1605:30:35" + } + }, + { + "body": { + "id": 4855, + "nodeType": "Block", + "src": "1714:81:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4849, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1746:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4851, + "indexExpression": { + "id": 4850, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1759:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1746:25:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4852, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4821, + "src": "1773:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4848, + "name": "_addCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4963, + "src": "1728:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:56:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4854, + "nodeType": "ExpressionStatement", + "src": "1728:56:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4842, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1673:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4843, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1687:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1673:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4856, + "initializationExpression": { + "assignments": [ + 4839 + ], + "declarations": [ + { + "constant": false, + "id": 4839, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1656:11:35", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "1651:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1651:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4841, + "initialValue": { + "hexValue": "30", + "id": 4840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1670:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1651:20:35" + }, + "loopExpression": { + "expression": { + "id": 4846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1699:13:35", + "subExpression": { + "id": 4845, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1699:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4847, + "nodeType": "ExpressionStatement", + "src": "1699:13:35" + }, + "nodeType": "ForStatement", + "src": "1646:149:35" + } + ] + }, + "id": 4858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMembers", + "nameLocation": "1451:18:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4819, + "mutability": "mutable", + "name": "membersToAdd", + "nameLocation": "1487:12:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1470:29:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1470:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4818, + "nodeType": "ArrayTypeName", + "src": "1470:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4821, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1506:10:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1501:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4820, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1501:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1469:48:35" + }, + "returnParameters": { + "id": 4823, + "nodeType": "ParameterList", + "parameters": [], + "src": "1527:0:35" + }, + "scope": 5065, + "src": "1442:359:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4899, + "nodeType": "Block", + "src": "1898:283:35", + "statements": [ + { + "assignments": [ + 4867 + ], + "declarations": [ + { + "constant": false, + "id": 4867, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1913:10:35", + "nodeType": "VariableDeclaration", + "scope": 4899, + "src": "1908:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4866, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4870, + "initialValue": { + "expression": { + "id": 4868, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "1926:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1926:22:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1908:40:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4871, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "1962:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1962:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4879, + "nodeType": "IfStatement", + "src": "1958:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4874, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1986:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1986:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4878, + "nodeType": "RevertStatement", + "src": "1979:30:35" + } + }, + { + "body": { + "id": 4897, + "nodeType": "Block", + "src": "2088:87:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4891, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "2123:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4893, + "indexExpression": { + "id": 4892, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2139:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2123:28:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4894, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4863, + "src": "2153:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4890, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "2102:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:62:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4896, + "nodeType": "ExpressionStatement", + "src": "2102:62:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4884, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2047:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4885, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "2061:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2047:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4898, + "initializationExpression": { + "assignments": [ + 4881 + ], + "declarations": [ + { + "constant": false, + "id": 4881, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "2030:11:35", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "2025:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4880, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2025:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4883, + "initialValue": { + "hexValue": "30", + "id": 4882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2044:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2025:20:35" + }, + "loopExpression": { + "expression": { + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2073:13:35", + "subExpression": { + "id": 4887, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2073:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4889, + "nodeType": "ExpressionStatement", + "src": "2073:13:35" + }, + "nodeType": "ForStatement", + "src": "2020:155:35" + } + ] + }, + "id": 4900, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMembers", + "nameLocation": "1816:21:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4861, + "mutability": "mutable", + "name": "membersToRemove", + "nameLocation": "1855:15:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1838:32:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1838:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4860, + "nodeType": "ArrayTypeName", + "src": "1838:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1877:10:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1872:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1872:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1837:51:35" + }, + "returnParameters": { + "id": 4865, + "nodeType": "ParameterList", + "parameters": [], + "src": "1898:0:35" + }, + "scope": 5065, + "src": "1807:374:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4962, + "nodeType": "Block", + "src": "2259:517:35", + "statements": [ + { + "assignments": [ + 4909 + ], + "declarations": [ + { + "constant": false, + "id": 4909, + "mutability": "mutable", + "name": "store", + "nameLocation": "2291:5:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2269:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4908, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4907, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2269:13:35" + }, + "referencedDeclaration": 4246, + "src": "2269:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4912, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4910, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2299:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2299:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2269:46:35" + }, + { + "assignments": [ + 4917 + ], + "declarations": [ + { + "constant": false, + "id": 4917, + "mutability": "mutable", + "name": "members", + "nameLocation": "2352:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2325:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4916, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4915, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2325:18:35" + }, + "referencedDeclaration": 1788, + "src": "2325:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4920, + "initialValue": { + "expression": { + "id": 4918, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2362:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2362:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2325:57:35" + }, + { + "condition": { + "arguments": [ + { + "id": 4923, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2414:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4921, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2397:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4922, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2397:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:27:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4929, + "nodeType": "IfStatement", + "src": "2393:88:35", + "trueBody": { + "id": 4928, + "nodeType": "Block", + "src": "2426:55:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4925, + "name": "AlreadyACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4368, + "src": "2447:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2447:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4927, + "nodeType": "RevertStatement", + "src": "2440:30:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4933, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2503:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4930, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2491:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4932, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2491:11:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2491:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4935, + "nodeType": "ExpressionStatement", + "src": "2491:22:35" + }, + { + "assignments": [ + 4937 + ], + "declarations": [ + { + "constant": false, + "id": 4937, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2580:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2575:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4936, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2575:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4941, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4938, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2590:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2590:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2590:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2575:31:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4945, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2640:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4946, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2651:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4942, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "2616:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 6336, + "src": "2616:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4948, + "nodeType": "ExpressionStatement", + "src": "2616:43:35" + }, + { + "expression": { + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 4949, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2670:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4952, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "2670:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4953, + "indexExpression": { + "id": 4951, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2692:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2670:32:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4954, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2705:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2670:42:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4956, + "nodeType": "ExpressionStatement", + "src": "2670:42:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4958, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2747:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4959, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4904, + "src": "2758:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4957, + "name": "CouncilMemberAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "2728:18:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2728:41:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4961, + "nodeType": "EmitStatement", + "src": "2723:46:35" + } + ] + }, + "id": 4963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMember", + "nameLocation": "2196:17:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4902, + "mutability": "mutable", + "name": "newMember", + "nameLocation": "2222:9:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2214:17:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4901, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2214:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4904, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2238:10:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2233:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2233:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2213:36:35" + }, + "returnParameters": { + "id": 4906, + "nodeType": "ParameterList", + "parameters": [], + "src": "2259:0:35" + }, + "scope": 5065, + "src": "2187:589:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5025, + "nodeType": "Block", + "src": "2854:505:35", + "statements": [ + { + "assignments": [ + 4972 + ], + "declarations": [ + { + "constant": false, + "id": 4972, + "mutability": "mutable", + "name": "store", + "nameLocation": "2886:5:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2864:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4971, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4970, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2864:13:35" + }, + "referencedDeclaration": 4246, + "src": "2864:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4975, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4973, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2894:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2894:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2864:46:35" + }, + { + "assignments": [ + 4980 + ], + "declarations": [ + { + "constant": false, + "id": 4980, + "mutability": "mutable", + "name": "members", + "nameLocation": "2947:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2920:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4979, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4978, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2920:18:35" + }, + "referencedDeclaration": 1788, + "src": "2920:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4983, + "initialValue": { + "expression": { + "id": 4981, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "2957:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2957:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2920:57:35" + }, + { + "condition": { + "id": 4988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2992:25:35", + "subExpression": { + "arguments": [ + { + "id": 4986, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3010:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4984, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "2993:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2993:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:24:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4993, + "nodeType": "IfStatement", + "src": "2988:82:35", + "trueBody": { + "id": 4992, + "nodeType": "Block", + "src": "3019:51:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4989, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3040:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4991, + "nodeType": "RevertStatement", + "src": "3033:26:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4997, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3095:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4994, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "3080:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4996, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "3080:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3080:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4999, + "nodeType": "ExpressionStatement", + "src": "3080:22:35" + }, + { + "assignments": [ + 5001 + ], + "declarations": [ + { + "constant": false, + "id": 5001, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3118:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "3113:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5000, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3113:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5005, + "initialValue": { + "arguments": [ + { + "id": 5003, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3153:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5002, + "name": "_getCouncilMemberTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5064, + "src": "3128:24:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 5004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3128:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3113:47:35" + }, + { + "expression": { + "arguments": [ + { + "id": 5009, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5001, + "src": "3194:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5006, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "3170:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 5008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 6348, + "src": "3170:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5011, + "nodeType": "ExpressionStatement", + "src": "3170:32:35" + }, + { + "expression": { + "id": 5018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5012, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "3263:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5015, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3263:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5016, + "indexExpression": { + "id": 5014, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3285:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3263:29:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 5017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3295:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3263:33:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5019, + "nodeType": "ExpressionStatement", + "src": "3263:33:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5021, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3333:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5022, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4967, + "src": "3341:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5020, + "name": "CouncilMemberRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4406, + "src": "3312:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3312:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5024, + "nodeType": "EmitStatement", + "src": "3307:45:35" + } + ] + }, + "id": 5026, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMember", + "nameLocation": "2791:20:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4965, + "mutability": "mutable", + "name": "member", + "nameLocation": "2820:6:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2812:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4964, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2812:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4967, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2833:10:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2828:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4966, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2828:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2811:33:35" + }, + "returnParameters": { + "id": 4969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2854:0:35" + }, + "scope": 5065, + "src": "2782:577:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5038, + "nodeType": "Block", + "src": "3429:67:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5033, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3459:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3459:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3459:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5032, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3446:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 5036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3446:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "functionReturnParameters": 5031, + "id": 5037, + "nodeType": "Return", + "src": "3439:50:35" + } + ] + }, + "id": 5039, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilToken", + "nameLocation": "3374:16:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5027, + "nodeType": "ParameterList", + "parameters": [], + "src": "3390:2:35" + }, + "returnParameters": { + "id": 5031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5030, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5039, + "src": "3415:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 5029, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5028, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "3415:12:35" + }, + "referencedDeclaration": 6379, + "src": "3415:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "src": "3414:14:35" + }, + "scope": 5065, + "src": "3365:131:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5063, + "nodeType": "Block", + "src": "3580:152:35", + "statements": [ + { + "assignments": [ + 5047 + ], + "declarations": [ + { + "constant": false, + "id": 5047, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3595:7:35", + "nodeType": "VariableDeclaration", + "scope": 5063, + "src": "3590:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3590:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5053, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5048, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3605:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3605:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5050, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3605:32:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5052, + "indexExpression": { + "id": 5051, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5041, + "src": "3638:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3605:40:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3590:55:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5054, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3660:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3660:12:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5060, + "nodeType": "IfStatement", + "src": "3656:44:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5057, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3681:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3681:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5059, + "nodeType": "RevertStatement", + "src": "3674:26:35" + } + }, + { + "expression": { + "id": 5061, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3718:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5045, + "id": 5062, + "nodeType": "Return", + "src": "3711:14:35" + } + ] + }, + "id": 5064, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilMemberTokenId", + "nameLocation": "3511:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5041, + "mutability": "mutable", + "name": "member", + "nameLocation": "3544:6:35", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3536:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3536:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3535:16:35" + }, + "returnParameters": { + "id": 5045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5044, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3574:4:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5043, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3574:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3573:6:35" + }, + "scope": 5065, + "src": "3502:230:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5066, + "src": "347:3387:35", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3704:35" + } + }, + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ArrayError {\n error EmptyArray();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "exportedSymbols": { + "ArrayError": [ + 20 + ] + }, + "id": 21, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 17, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:2" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ArrayError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 20, + "linearizedBaseContracts": [ + 20 + ], + "name": "ArrayError", + "nameLocation": "64:10:2", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19, + "name": "EmptyArray", + "nameLocation": "87:10:2", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "97:2:2" + }, + "src": "81:19:2" + } + ], + "scope": 21, + "src": "56:46:2", + "usedErrors": [ + 19 + ] + } + ], + "src": "31:72:2" + } + }, + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/token/ERC721.sol\";\n\ncontract CouncilToken is Ownable, UUPSImplementation, ERC721 {\n error TokenIsNotTransferable();\n\n function initialize(string memory tokenName, string memory tokenSymbol) public onlyOwner {\n _initialize(tokenName, tokenSymbol, \"\");\n }\n\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n\n function mint(address to, uint256 tokenId) public virtual onlyOwner {\n _mint(to, tokenId);\n }\n\n function burn(uint256 tokenId) public virtual onlyOwner {\n _burn(tokenId);\n }\n\n function transferFrom(\n address,\n address,\n uint256\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n\n function safeTransferFrom(\n address,\n address,\n uint256,\n bytes memory\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 6380, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6281, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:39" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 6282, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 757, + "src": "56:76:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 6283, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 415, + "src": "133:69:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "file": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "id": 6284, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 1642, + "src": "203:64:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6285, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "294:7:39" + }, + "id": 6286, + "nodeType": "InheritanceSpecifier", + "src": "294:7:39" + }, + { + "baseName": { + "id": 6287, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "303:18:39" + }, + "id": 6288, + "nodeType": "InheritanceSpecifier", + "src": "303:18:39" + }, + { + "baseName": { + "id": 6289, + "name": "ERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1641, + "src": "323:6:39" + }, + "id": 6290, + "nodeType": "InheritanceSpecifier", + "src": "323:6:39" + } + ], + "canonicalName": "CouncilToken", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6379, + "linearizedBaseContracts": [ + 6379, + 1641, + 1677, + 180, + 157, + 78, + 756, + 542, + 238, + 414, + 476, + 494, + 220 + ], + "name": "CouncilToken", + "nameLocation": "278:12:39", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6292, + "name": "TokenIsNotTransferable", + "nameLocation": "342:22:39", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6291, + "nodeType": "ParameterList", + "parameters": [], + "src": "364:2:39" + }, + "src": "336:31:39" + }, + { + "body": { + "id": 6307, + "nodeType": "Block", + "src": "462:56:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6302, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6294, + "src": "484:9:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6303, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6296, + "src": "495:11:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "", + "id": 6304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "508:2:39", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 6301, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "472:11:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory,string memory)" + } + }, + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "472:39:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6306, + "nodeType": "ExpressionStatement", + "src": "472:39:39" + } + ] + }, + "functionSelector": "4cd88b76", + "id": 6308, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6299, + "kind": "modifierInvocation", + "modifierName": { + "id": 6298, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "452:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "452:9:39" + } + ], + "name": "initialize", + "nameLocation": "382:10:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6294, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "407:9:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "393:23:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6293, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "393:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6296, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "432:11:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "418:25:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6295, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "418:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "392:52:39" + }, + "returnParameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "462:0:39" + }, + "scope": 6379, + "src": "373:145:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 6320, + "nodeType": "Block", + "src": "596:46:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6317, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6310, + "src": "617:17:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6316, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "606:10:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "606:29:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6319, + "nodeType": "ExpressionStatement", + "src": "606:29:39" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 6321, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6314, + "kind": "modifierInvocation", + "modifierName": { + "id": 6313, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "586:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "586:9:39" + } + ], + "name": "upgradeTo", + "nameLocation": "533:9:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6312, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "577:8:39" + }, + "parameters": { + "id": 6311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6310, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "551:17:39", + "nodeType": "VariableDeclaration", + "scope": 6321, + "src": "543:25:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "543:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "542:27:39" + }, + "returnParameters": { + "id": 6315, + "nodeType": "ParameterList", + "parameters": [], + "src": "596:0:39" + }, + "scope": 6379, + "src": "524:118:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 6335, + "nodeType": "Block", + "src": "716:35:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6331, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "732:2:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6332, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6325, + "src": "736:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6330, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1436, + "src": "726:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:18:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6334, + "nodeType": "ExpressionStatement", + "src": "726:18:39" + } + ] + }, + "functionSelector": "40c10f19", + "id": 6336, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6328, + "kind": "modifierInvocation", + "modifierName": { + "id": 6327, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "706:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "706:9:39" + } + ], + "name": "mint", + "nameLocation": "657:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6323, + "mutability": "mutable", + "name": "to", + "nameLocation": "670:2:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "662:10:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6322, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6325, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "682:7:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "674:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "674:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "661:29:39" + }, + "returnParameters": { + "id": 6329, + "nodeType": "ParameterList", + "parameters": [], + "src": "716:0:39" + }, + "scope": 6379, + "src": "648:103:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 6347, + "nodeType": "Block", + "src": "813:31:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6344, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6338, + "src": "829:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6343, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1486, + "src": "823:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:14:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6346, + "nodeType": "ExpressionStatement", + "src": "823:14:39" + } + ] + }, + "functionSelector": "42966c68", + "id": 6348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6341, + "kind": "modifierInvocation", + "modifierName": { + "id": 6340, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "803:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "803:9:39" + } + ], + "name": "burn", + "nameLocation": "766:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6338, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:39", + "nodeType": "VariableDeclaration", + "scope": 6348, + "src": "771:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "770:17:39" + }, + "returnParameters": { + "id": 6342, + "nodeType": "ParameterList", + "parameters": [], + "src": "813:0:39" + }, + "scope": 6379, + "src": "757:87:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1259 + ], + "body": { + "id": 6361, + "nodeType": "Block", + "src": "953:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6358, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "970:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6360, + "nodeType": "RevertStatement", + "src": "963:31:39" + } + ] + }, + "functionSelector": "23b872dd", + "id": 6362, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "859:12:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6356, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "944:8:39" + }, + "parameters": { + "id": 6355, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "881:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "881:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6352, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "898:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "898:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6354, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "915:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "915:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "871:57:39" + }, + "returnParameters": { + "id": 6357, + "nodeType": "ParameterList", + "parameters": [], + "src": "953:0:39" + }, + "scope": 6379, + "src": "850:151:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1324 + ], + "body": { + "id": 6377, + "nodeType": "Block", + "src": "1136:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6374, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "1153:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1153:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6376, + "nodeType": "RevertStatement", + "src": "1146:31:39" + } + ] + }, + "functionSelector": "b88d4fde", + "id": 6378, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "1016:16:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6372, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1127:8:39" + }, + "parameters": { + "id": 6371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6364, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1042:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6363, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1042:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6366, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1059:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1059:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6368, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1076:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6367, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1076:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6370, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1093:12:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6369, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1093:5:39", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1032:79:39" + }, + "returnParameters": { + "id": 6373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1136:0:39" + }, + "scope": 6379, + "src": "1007:177:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 6380, + "src": "269:917:39", + "usedErrors": [ + 5, + 10, + 14, + 24, + 29, + 262, + 561, + 563, + 861, + 865, + 869, + 873, + 6292 + ] + } + ], + "src": "31:1156:39" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/ElectionStorage.sol\";\n\n/// @dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule\ncontract ElectionBase is ElectionStorage {\n // ---------------------------------------\n // Enums\n // ---------------------------------------\n\n enum ElectionPeriod {\n // Council elected and active\n Administration,\n // Accepting nominations for next election\n Nomination,\n // Accepting votes for ongoing election\n Vote,\n // Votes being counted\n Evaluation\n }\n\n // ---------------------------------------\n // Errors\n // ---------------------------------------\n\n error ElectionNotEvaluated();\n error ElectionAlreadyEvaluated();\n error AlreadyNominated();\n error NotNominated();\n error NoCandidates();\n error NoVotePower();\n error VoteNotCasted();\n error DuplicateCandidates();\n error InvalidEpochConfiguration();\n error InvalidElectionSettings();\n error NotCallableInCurrentPeriod();\n error ChangesCurrentPeriod();\n error AlreadyACouncilMember();\n error NotACouncilMember();\n error InvalidMinimumActiveMembers();\n error CrossDomainMessengerNotSet();\n error OnlyCrossDomainMessengerCanInvoke();\n error OnlyCrossDomainUserCanInvoke();\n\n // ---------------------------------------\n // Events\n // ---------------------------------------\n\n event ElectionModuleInitialized();\n event EpochStarted(uint epochIndex);\n event CouncilTokenCreated(address proxy, address implementation);\n event CouncilTokenUpgraded(address newImplementation);\n event CouncilMemberAdded(address indexed member, uint indexed epochIndex);\n event CouncilMemberRemoved(address indexed member, uint indexed epochIndex);\n event CouncilMembersDismissed(address[] members, uint indexed epochIndex);\n event EpochScheduleUpdated(uint64 nominationPeriodStartDate, uint64 votingPeriodStartDate, uint64 epochEndDate);\n event MinimumEpochDurationsChanged(\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n event MaxDateAdjustmentToleranceChanged(uint64 tolerance);\n event DefaultBallotEvaluationBatchSizeChanged(uint size);\n event NextEpochSeatCountChanged(uint8 seatCount);\n event MinimumActiveMembersChanged(uint8 minimumActiveMembers);\n event CandidateNominated(address indexed candidate, uint indexed epochIndex);\n event NominationWithdrawn(address indexed candidate, uint indexed epochIndex);\n event VoteRecorded(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event VoteWithdrawn(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event ElectionEvaluated(uint indexed epochIndex, uint totalBallots);\n event ElectionBatchEvaluated(uint indexed epochIndex, uint evaluatedBallots, uint totalBallots);\n event EmergencyElectionStarted(uint indexed epochIndex);\n event CrossDomainMessengerSet(address messenger);\n\n // ---------------------------------------\n // Helpers\n // ---------------------------------------\n\n function _createNewEpoch() internal virtual {\n ElectionStore storage store = _electionStore();\n\n store.epochs.push();\n store.elections.push();\n }\n\n function _getCurrentEpochIndex() internal view returns (uint) {\n return _electionStore().epochs.length - 1;\n }\n\n function _getCurrentEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex());\n }\n\n function _getPreviousEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex() - 1);\n }\n\n function _getEpochAtIndex(uint epochIndex) internal view returns (EpochData storage) {\n return _electionStore().epochs[epochIndex];\n }\n\n function _getCurrentElection() internal view returns (ElectionData storage) {\n return _getElectionAtIndex(_getCurrentEpochIndex());\n }\n\n function _getElectionAtIndex(uint epochIndex) internal view returns (ElectionData storage) {\n return _electionStore().elections[epochIndex];\n }\n\n function _getBallot(bytes32 ballotId) internal view returns (BallotData storage) {\n return _getCurrentElection().ballotsById[ballotId];\n }\n\n function _getBallotInEpoch(bytes32 ballotId, uint epochIndex) internal view returns (BallotData storage) {\n return _getElectionAtIndex(epochIndex).ballotsById[ballotId];\n }\n\n function _calculateBallotId(address[] memory candidates) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(candidates));\n }\n\n function _ballotExists(BallotData storage ballot) internal view returns (bool) {\n return ballot.candidates.length != 0;\n }\n\n function _getBallotVoted(address user) internal view returns (bytes32) {\n return _getCurrentElection().ballotIdsByAddress[user];\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4684, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4333, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:34" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "file": "../../storage/ElectionStorage.sol", + "id": 4334, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4684, + "sourceUnit": 4332, + "src": "56:43:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4336, + "name": "ElectionStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4331, + "src": "228:15:34" + }, + "id": 4337, + "nodeType": "InheritanceSpecifier", + "src": "228:15:34" + } + ], + "canonicalName": "ElectionBase", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4335, + "nodeType": "StructuredDocumentation", + "src": "101:102:34", + "text": "@dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule" + }, + "fullyImplemented": true, + "id": 4683, + "linearizedBaseContracts": [ + 4683, + 4331 + ], + "name": "ElectionBase", + "nameLocation": "212:12:34", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionBase.ElectionPeriod", + "id": 4342, + "members": [ + { + "id": 4338, + "name": "Administration", + "nameLocation": "426:14:34", + "nodeType": "EnumValue", + "src": "426:14:34" + }, + { + "id": 4339, + "name": "Nomination", + "nameLocation": "501:10:34", + "nodeType": "EnumValue", + "src": "501:10:34" + }, + { + "id": 4340, + "name": "Vote", + "nameLocation": "569:4:34", + "nodeType": "EnumValue", + "src": "569:4:34" + }, + { + "id": 4341, + "name": "Evaluation", + "nameLocation": "614:10:34", + "nodeType": "EnumValue", + "src": "614:10:34" + } + ], + "name": "ElectionPeriod", + "nameLocation": "363:14:34", + "nodeType": "EnumDefinition", + "src": "358:272:34" + }, + { + "id": 4344, + "name": "ElectionNotEvaluated", + "nameLocation": "751:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4343, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:2:34" + }, + "src": "745:29:34" + }, + { + "id": 4346, + "name": "ElectionAlreadyEvaluated", + "nameLocation": "785:24:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4345, + "nodeType": "ParameterList", + "parameters": [], + "src": "809:2:34" + }, + "src": "779:33:34" + }, + { + "id": 4348, + "name": "AlreadyNominated", + "nameLocation": "823:16:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4347, + "nodeType": "ParameterList", + "parameters": [], + "src": "839:2:34" + }, + "src": "817:25:34" + }, + { + "id": 4350, + "name": "NotNominated", + "nameLocation": "853:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4349, + "nodeType": "ParameterList", + "parameters": [], + "src": "865:2:34" + }, + "src": "847:21:34" + }, + { + "id": 4352, + "name": "NoCandidates", + "nameLocation": "879:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4351, + "nodeType": "ParameterList", + "parameters": [], + "src": "891:2:34" + }, + "src": "873:21:34" + }, + { + "id": 4354, + "name": "NoVotePower", + "nameLocation": "905:11:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4353, + "nodeType": "ParameterList", + "parameters": [], + "src": "916:2:34" + }, + "src": "899:20:34" + }, + { + "id": 4356, + "name": "VoteNotCasted", + "nameLocation": "930:13:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4355, + "nodeType": "ParameterList", + "parameters": [], + "src": "943:2:34" + }, + "src": "924:22:34" + }, + { + "id": 4358, + "name": "DuplicateCandidates", + "nameLocation": "957:19:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4357, + "nodeType": "ParameterList", + "parameters": [], + "src": "976:2:34" + }, + "src": "951:28:34" + }, + { + "id": 4360, + "name": "InvalidEpochConfiguration", + "nameLocation": "990:25:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4359, + "nodeType": "ParameterList", + "parameters": [], + "src": "1015:2:34" + }, + "src": "984:34:34" + }, + { + "id": 4362, + "name": "InvalidElectionSettings", + "nameLocation": "1029:23:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4361, + "nodeType": "ParameterList", + "parameters": [], + "src": "1052:2:34" + }, + "src": "1023:32:34" + }, + { + "id": 4364, + "name": "NotCallableInCurrentPeriod", + "nameLocation": "1066:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4363, + "nodeType": "ParameterList", + "parameters": [], + "src": "1092:2:34" + }, + "src": "1060:35:34" + }, + { + "id": 4366, + "name": "ChangesCurrentPeriod", + "nameLocation": "1106:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4365, + "nodeType": "ParameterList", + "parameters": [], + "src": "1126:2:34" + }, + "src": "1100:29:34" + }, + { + "id": 4368, + "name": "AlreadyACouncilMember", + "nameLocation": "1140:21:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4367, + "nodeType": "ParameterList", + "parameters": [], + "src": "1161:2:34" + }, + "src": "1134:30:34" + }, + { + "id": 4370, + "name": "NotACouncilMember", + "nameLocation": "1175:17:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4369, + "nodeType": "ParameterList", + "parameters": [], + "src": "1192:2:34" + }, + "src": "1169:26:34" + }, + { + "id": 4372, + "name": "InvalidMinimumActiveMembers", + "nameLocation": "1206:27:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4371, + "nodeType": "ParameterList", + "parameters": [], + "src": "1233:2:34" + }, + "src": "1200:36:34" + }, + { + "id": 4374, + "name": "CrossDomainMessengerNotSet", + "nameLocation": "1247:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1273:2:34" + }, + "src": "1241:35:34" + }, + { + "id": 4376, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nameLocation": "1287:33:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4375, + "nodeType": "ParameterList", + "parameters": [], + "src": "1320:2:34" + }, + "src": "1281:42:34" + }, + { + "id": 4378, + "name": "OnlyCrossDomainUserCanInvoke", + "nameLocation": "1334:28:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4377, + "nodeType": "ParameterList", + "parameters": [], + "src": "1362:2:34" + }, + "src": "1328:37:34" + }, + { + "anonymous": false, + "id": 4380, + "name": "ElectionModuleInitialized", + "nameLocation": "1486:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4379, + "nodeType": "ParameterList", + "parameters": [], + "src": "1511:2:34" + }, + "src": "1480:34:34" + }, + { + "anonymous": false, + "id": 4384, + "name": "EpochStarted", + "nameLocation": "1525:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4383, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4382, + "indexed": false, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1543:10:34", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "1538:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4381, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1538:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:17:34" + }, + "src": "1519:36:34" + }, + { + "anonymous": false, + "id": 4390, + "name": "CouncilTokenCreated", + "nameLocation": "1566:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4386, + "indexed": false, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "1594:5:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1586:13:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1586:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4388, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1609:14:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1601:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1585:39:34" + }, + "src": "1560:65:34" + }, + { + "anonymous": false, + "id": 4394, + "name": "CouncilTokenUpgraded", + "nameLocation": "1636:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4392, + "indexed": false, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1665:17:34", + "nodeType": "VariableDeclaration", + "scope": 4394, + "src": "1657:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4391, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1657:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1656:27:34" + }, + "src": "1630:54:34" + }, + { + "anonymous": false, + "id": 4400, + "name": "CouncilMemberAdded", + "nameLocation": "1695:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4396, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1730:6:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1714:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1714:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4398, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1751:10:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1738:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4397, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1738:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1713:49:34" + }, + "src": "1689:74:34" + }, + { + "anonymous": false, + "id": 4406, + "name": "CouncilMemberRemoved", + "nameLocation": "1774:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4402, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1811:6:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1795:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1795:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4404, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1832:10:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1819:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4403, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1819:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1794:49:34" + }, + "src": "1768:76:34" + }, + { + "anonymous": false, + "id": 4413, + "name": "CouncilMembersDismissed", + "nameLocation": "1855:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4409, + "indexed": false, + "mutability": "mutable", + "name": "members", + "nameLocation": "1889:7:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1879:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1879:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4408, + "nodeType": "ArrayTypeName", + "src": "1879:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4411, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1911:10:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1898:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4410, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1898:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1878:44:34" + }, + "src": "1849:74:34" + }, + { + "anonymous": false, + "id": 4421, + "name": "EpochScheduleUpdated", + "nameLocation": "1934:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "indexed": false, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1962:25:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1955:32:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4414, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1955:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4417, + "indexed": false, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1996:21:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1989:28:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4416, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1989:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "indexed": false, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2026:12:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "2019:19:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4418, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2019:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1954:85:34" + }, + "src": "1928:112:34" + }, + { + "anonymous": false, + "id": 4429, + "name": "MinimumEpochDurationsChanged", + "nameLocation": "2051:28:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4423, + "indexed": false, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "2096:27:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2089:34:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4422, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2089:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4425, + "indexed": false, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "2140:23:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2133:30:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4424, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2133:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4427, + "indexed": false, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "2180:16:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2173:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4426, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2173:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2079:123:34" + }, + "src": "2045:158:34" + }, + { + "anonymous": false, + "id": 4433, + "name": "MaxDateAdjustmentToleranceChanged", + "nameLocation": "2214:33:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4431, + "indexed": false, + "mutability": "mutable", + "name": "tolerance", + "nameLocation": "2255:9:34", + "nodeType": "VariableDeclaration", + "scope": 4433, + "src": "2248:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4430, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2248:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2247:18:34" + }, + "src": "2208:58:34" + }, + { + "anonymous": false, + "id": 4437, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nameLocation": "2277:39:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4435, + "indexed": false, + "mutability": "mutable", + "name": "size", + "nameLocation": "2322:4:34", + "nodeType": "VariableDeclaration", + "scope": 4437, + "src": "2317:9:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4434, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2317:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2316:11:34" + }, + "src": "2271:57:34" + }, + { + "anonymous": false, + "id": 4441, + "name": "NextEpochSeatCountChanged", + "nameLocation": "2339:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4439, + "indexed": false, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "2371:9:34", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "2365:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4438, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2365:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2364:17:34" + }, + "src": "2333:49:34" + }, + { + "anonymous": false, + "id": 4445, + "name": "MinimumActiveMembersChanged", + "nameLocation": "2393:27:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4443, + "indexed": false, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2427:20:34", + "nodeType": "VariableDeclaration", + "scope": 4445, + "src": "2421:26:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4442, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2421:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2420:28:34" + }, + "src": "2387:62:34" + }, + { + "anonymous": false, + "id": 4451, + "name": "CandidateNominated", + "nameLocation": "2460:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4447, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2495:9:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2479:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4446, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2479:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4449, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2519:10:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2506:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4448, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2506:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2478:52:34" + }, + "src": "2454:77:34" + }, + { + "anonymous": false, + "id": 4457, + "name": "NominationWithdrawn", + "nameLocation": "2542:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4453, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2578:9:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2562:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2562:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4455, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2602:10:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2589:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4454, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2589:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2561:52:34" + }, + "src": "2536:78:34" + }, + { + "anonymous": false, + "id": 4467, + "name": "VoteRecorded", + "nameLocation": "2625:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4459, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2654:5:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2638:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4458, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2638:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4461, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2677:8:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2661:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4460, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2661:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4463, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2700:10:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2687:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4462, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2687:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4465, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2717:9:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2712:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4464, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2637:90:34" + }, + "src": "2619:109:34" + }, + { + "anonymous": false, + "id": 4477, + "name": "VoteWithdrawn", + "nameLocation": "2739:13:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4469, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2769:5:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2753:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2753:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4471, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2792:8:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2776:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4470, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2776:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4473, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2815:10:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2802:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4472, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2802:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4475, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2832:9:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2827:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4474, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2827:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2752:90:34" + }, + "src": "2733:110:34" + }, + { + "anonymous": false, + "id": 4483, + "name": "ElectionEvaluated", + "nameLocation": "2854:17:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4479, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2885:10:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2872:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4478, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2872:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4481, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "2902:12:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2897:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4480, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2897:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2871:44:34" + }, + "src": "2848:68:34" + }, + { + "anonymous": false, + "id": 4491, + "name": "ElectionBatchEvaluated", + "nameLocation": "2927:22:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4485, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2963:10:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2950:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2950:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4487, + "indexed": false, + "mutability": "mutable", + "name": "evaluatedBallots", + "nameLocation": "2980:16:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2975:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4486, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2975:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4489, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "3003:12:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2998:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4488, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2998:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2949:67:34" + }, + "src": "2921:96:34" + }, + { + "anonymous": false, + "id": 4495, + "name": "EmergencyElectionStarted", + "nameLocation": "3028:24:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4493, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3066:10:34", + "nodeType": "VariableDeclaration", + "scope": 4495, + "src": "3053:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3053:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3052:25:34" + }, + "src": "3022:56:34" + }, + { + "anonymous": false, + "id": 4499, + "name": "CrossDomainMessengerSet", + "nameLocation": "3089:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4498, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4497, + "indexed": false, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3121:9:34", + "nodeType": "VariableDeclaration", + "scope": 4499, + "src": "3113:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3113:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3112:19:34" + }, + "src": "3083:49:34" + }, + { + "body": { + "id": 4522, + "nodeType": "Block", + "src": "3292:125:34", + "statements": [ + { + "assignments": [ + 4504 + ], + "declarations": [ + { + "constant": false, + "id": 4504, + "mutability": "mutable", + "name": "store", + "nameLocation": "3324:5:34", + "nodeType": "VariableDeclaration", + "scope": 4522, + "src": "3302:27:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4503, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4502, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3302:13:34" + }, + "referencedDeclaration": 4246, + "src": "3302:13:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4507, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4505, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3332:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3332:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:46:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4508, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3359:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3359:12:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3359:17:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$returns$_t_struct$_EpochData_$4270_storage_$bound_to$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.EpochData storage ref[] storage pointer) returns (struct ElectionStorage.EpochData storage ref)" + } + }, + "id": 4513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:19:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "id": 4514, + "nodeType": "ExpressionStatement", + "src": "3359:19:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4515, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3388:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4518, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "3388:15:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3388:20:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$returns$_t_struct$_ElectionData_$4299_storage_$bound_to$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.ElectionData storage ref[] storage pointer) returns (struct ElectionStorage.ElectionData storage ref)" + } + }, + "id": 4520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3388:22:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "id": 4521, + "nodeType": "ExpressionStatement", + "src": "3388:22:34" + } + ] + }, + "id": 4523, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "3257:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4500, + "nodeType": "ParameterList", + "parameters": [], + "src": "3272:2:34" + }, + "returnParameters": { + "id": 4501, + "nodeType": "ParameterList", + "parameters": [], + "src": "3292:0:34" + }, + "scope": 4683, + "src": "3248:169:34", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 4535, + "nodeType": "Block", + "src": "3485:58:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4528, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3502:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3502:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3502:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3502:30:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3535:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3502:34:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4527, + "id": 4534, + "nodeType": "Return", + "src": "3495:41:34" + } + ] + }, + "id": 4536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpochIndex", + "nameLocation": "3432:21:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4524, + "nodeType": "ParameterList", + "parameters": [], + "src": "3453:2:34" + }, + "returnParameters": { + "id": 4527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4526, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4536, + "src": "3479:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4525, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3479:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3478:6:34" + }, + "scope": 4683, + "src": "3423:120:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4547, + "nodeType": "Block", + "src": "3619:65:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4543, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3653:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3653:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4542, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3636:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3636:41:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4541, + "id": 4546, + "nodeType": "Return", + "src": "3629:48:34" + } + ] + }, + "id": 4548, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpoch", + "nameLocation": "3558:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4537, + "nodeType": "ParameterList", + "parameters": [], + "src": "3574:2:34" + }, + "returnParameters": { + "id": 4541, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4540, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4548, + "src": "3600:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4539, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4538, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3600:9:34" + }, + "referencedDeclaration": 4270, + "src": "3600:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3599:19:34" + }, + "scope": 4683, + "src": "3549:135:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4561, + "nodeType": "Block", + "src": "3761:69:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4555, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3795:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3795:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3795:27:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4554, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3778:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3778:45:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4553, + "id": 4560, + "nodeType": "Return", + "src": "3771:52:34" + } + ] + }, + "id": 4562, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getPreviousEpoch", + "nameLocation": "3699:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4549, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:2:34" + }, + "returnParameters": { + "id": 4553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4552, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4562, + "src": "3742:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4551, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4550, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3742:9:34" + }, + "referencedDeclaration": 4270, + "src": "3742:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3741:19:34" + }, + "scope": 4683, + "src": "3690:140:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4576, + "nodeType": "Block", + "src": "3921:59:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4570, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3938:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3938:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3938:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4574, + "indexExpression": { + "id": 4573, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4564, + "src": "3962:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3938:35:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "functionReturnParameters": 4569, + "id": 4575, + "nodeType": "Return", + "src": "3931:42:34" + } + ] + }, + "id": 4577, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochAtIndex", + "nameLocation": "3845:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4564, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3867:10:34", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3862:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3862:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3861:17:34" + }, + "returnParameters": { + "id": 4569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4568, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3902:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4567, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4566, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3902:9:34" + }, + "referencedDeclaration": 4270, + "src": "3902:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3901:19:34" + }, + "scope": 4683, + "src": "3836:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4588, + "nodeType": "Block", + "src": "4062:68:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4584, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "4099:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4099:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4583, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4079:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4079:44:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "functionReturnParameters": 4582, + "id": 4587, + "nodeType": "Return", + "src": "4072:51:34" + } + ] + }, + "id": 4589, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentElection", + "nameLocation": "3995:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4578, + "nodeType": "ParameterList", + "parameters": [], + "src": "4014:2:34" + }, + "returnParameters": { + "id": 4582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4581, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4589, + "src": "4040:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4580, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4579, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4040:12:34" + }, + "referencedDeclaration": 4299, + "src": "4040:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4039:22:34" + }, + "scope": 4683, + "src": "3986:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4603, + "nodeType": "Block", + "src": "4227:62:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4597, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "4244:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4244:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "4244:26:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4601, + "indexExpression": { + "id": 4600, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4591, + "src": "4271:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4244:38:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "functionReturnParameters": 4596, + "id": 4602, + "nodeType": "Return", + "src": "4237:45:34" + } + ] + }, + "id": 4604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getElectionAtIndex", + "nameLocation": "4145:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4591, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4170:10:34", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4165:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4590, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4165:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4164:17:34" + }, + "returnParameters": { + "id": 4596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4205:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4594, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4593, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4205:12:34" + }, + "referencedDeclaration": 4299, + "src": "4205:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4204:22:34" + }, + "scope": 4683, + "src": "4136:153:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4618, + "nodeType": "Block", + "src": "4376:67:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4612, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "4393:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4393:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4393:33:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4616, + "indexExpression": { + "id": 4615, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "4427:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:43:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4611, + "id": 4617, + "nodeType": "Return", + "src": "4386:50:34" + } + ] + }, + "id": 4619, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallot", + "nameLocation": "4304:10:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4606, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4323:8:34", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4315:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4605, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4315:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4314:18:34" + }, + "returnParameters": { + "id": 4611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4610, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4356:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4609, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4608, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4356:10:34" + }, + "referencedDeclaration": 4309, + "src": "4356:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4355:20:34" + }, + "scope": 4683, + "src": "4295:148:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4636, + "nodeType": "Block", + "src": "4554:77:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 4630, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4623, + "src": "4591:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4629, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4571:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:31:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4571:43:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4634, + "indexExpression": { + "id": 4633, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "4615:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4571:53:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4628, + "id": 4635, + "nodeType": "Return", + "src": "4564:60:34" + } + ] + }, + "id": 4637, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotInEpoch", + "nameLocation": "4458:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4621, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4484:8:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4476:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4620, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4476:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4623, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4499:10:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4494:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4622, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4494:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4475:35:34" + }, + "returnParameters": { + "id": 4628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4627, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4534:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4626, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4625, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4534:10:34" + }, + "referencedDeclaration": 4309, + "src": "4534:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4533:20:34" + }, + "scope": 4683, + "src": "4449:182:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4652, + "nodeType": "Block", + "src": "4726:63:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4648, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4640, + "src": "4770:10:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 4646, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4753:3:34", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "4753:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4753:28:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4645, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "4743:9:34", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4743:39:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4644, + "id": 4651, + "nodeType": "Return", + "src": "4736:46:34" + } + ] + }, + "id": 4653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_calculateBallotId", + "nameLocation": "4646:18:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4640, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "4682:10:34", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4665:27:34", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4638, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4665:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4639, + "nodeType": "ArrayTypeName", + "src": "4665:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "4664:29:34" + }, + "returnParameters": { + "id": 4644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4643, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4717:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4642, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4717:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4716:9:34" + }, + "scope": 4683, + "src": "4637:152:34", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4667, + "nodeType": "Block", + "src": "4874:53:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4661, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4656, + "src": "4891:6:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4662, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "4891:17:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4891:24:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4919:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4891:29:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4660, + "id": 4666, + "nodeType": "Return", + "src": "4884:36:34" + } + ] + }, + "id": 4668, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ballotExists", + "nameLocation": "4804:13:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4656, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "4837:6:34", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4818:25:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4655, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4654, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4818:10:34" + }, + "referencedDeclaration": 4309, + "src": "4818:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4817:27:34" + }, + "returnParameters": { + "id": 4660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4659, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4868:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4658, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4868:4:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4867:6:34" + }, + "scope": 4683, + "src": "4795:132:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4681, + "nodeType": "Block", + "src": "5004:70:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4675, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "5021:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5021:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "5021:40:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 4679, + "indexExpression": { + "id": 4678, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "5062:4:34", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5021:46:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4674, + "id": 4680, + "nodeType": "Return", + "src": "5014:53:34" + } + ] + }, + "id": 4682, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotVoted", + "nameLocation": "4942:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "user", + "nameLocation": "4966:4:34", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4958:12:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4669, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4958:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4957:14:34" + }, + "returnParameters": { + "id": 4674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4673, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4995:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4672, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4995:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4994:9:34" + }, + "scope": 4683, + "src": "4933:141:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4684, + "src": "203:4873:34", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:5046:34" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IUUPSImplementation.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"./ProxyStorage.sol\";\n\nabstract contract UUPSImplementation is IUUPSImplementation, ProxyStorage {\n event Upgraded(address implementation);\n\n error ImplementationIsSterile(address implementation);\n error UpgradeSimulationFailed();\n\n function _upgradeTo(address newImplementation) internal virtual {\n if (newImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(newImplementation)) {\n revert AddressError.NotAContract(newImplementation);\n }\n\n ProxyStore storage store = _proxyStore();\n\n if (newImplementation == store.implementation) {\n revert ChangeError.NoChange();\n }\n\n if (!store.simulatingUpgrade && _implementationIsSterile(newImplementation)) {\n revert ImplementationIsSterile(newImplementation);\n }\n\n store.implementation = newImplementation;\n\n emit Upgraded(newImplementation);\n }\n\n function _implementationIsSterile(address candidateImplementation) internal virtual returns (bool) {\n (bool simulationReverted, bytes memory simulationResponse) = address(this).delegatecall(\n abi.encodeCall(this.simulateUpgradeTo, (candidateImplementation))\n );\n\n return\n !simulationReverted &&\n keccak256(abi.encodePacked(simulationResponse)) == keccak256(abi.encodePacked(UpgradeSimulationFailed.selector));\n }\n\n function simulateUpgradeTo(address newImplementation) public override {\n ProxyStore storage store = _proxyStore();\n\n store.simulatingUpgrade = true;\n\n address currentImplementation = store.implementation;\n store.implementation = newImplementation;\n\n (bool rollbackSuccessful, ) = newImplementation.delegatecall(\n abi.encodeCall(this.upgradeTo, (currentImplementation))\n );\n\n if (!rollbackSuccessful || _proxyStore().implementation != currentImplementation) {\n revert UpgradeSimulationFailed();\n }\n\n store.simulatingUpgrade = false;\n\n // solhint-disable-next-line reason-string\n revert();\n }\n\n function getImplementation() external view override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 757, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 544, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:17" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "file": "../interfaces/IUUPSImplementation.sol", + "id": 545, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 239, + "src": "56:47:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 546, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 16, + "src": "104:36:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 547, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 26, + "src": "141:35:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 548, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 1697, + "src": "177:34:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 549, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 543, + "src": "212:28:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 550, + "name": "IUUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 238, + "src": "282:19:17" + }, + "id": 551, + "nodeType": "InheritanceSpecifier", + "src": "282:19:17" + }, + { + "baseName": { + "id": 552, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "303:12:17" + }, + "id": 553, + "nodeType": "InheritanceSpecifier", + "src": "303:12:17" + } + ], + "canonicalName": "UUPSImplementation", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 756, + "linearizedBaseContracts": [ + 756, + 542, + 238 + ], + "name": "UUPSImplementation", + "nameLocation": "260:18:17", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 557, + "name": "Upgraded", + "nameLocation": "328:8:17", + "nodeType": "EventDefinition", + "parameters": { + "id": 556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 555, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "345:14:17", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "337:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "337:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "336:24:17" + }, + "src": "322:39:17" + }, + { + "id": 561, + "name": "ImplementationIsSterile", + "nameLocation": "373:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "405:14:17", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "397:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 558, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "397:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "396:24:17" + }, + "src": "367:54:17" + }, + { + "id": 563, + "name": "UpgradeSimulationFailed", + "nameLocation": "432:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 562, + "nodeType": "ParameterList", + "parameters": [], + "src": "455:2:17" + }, + "src": "426:32:17" + }, + { + "body": { + "id": 634, + "nodeType": "Block", + "src": "528:662:17", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 568, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "542:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:1:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 569, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "563:7:17", + "typeDescriptions": {} + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "542:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 580, + "nodeType": "IfStatement", + "src": "538:95:17", + "trueBody": { + "id": 579, + "nodeType": "Block", + "src": "575:58:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 574, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "596:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "596:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "596:26:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 578, + "nodeType": "RevertStatement", + "src": "589:33:17" + } + ] + } + }, + { + "condition": { + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "647:42:17", + "subExpression": { + "arguments": [ + { + "id": 583, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "671:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 581, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "648:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "648:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:41:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 593, + "nodeType": "IfStatement", + "src": "643:124:17", + "trueBody": { + "id": 592, + "nodeType": "Block", + "src": "691:76:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 589, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "738:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 586, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "712:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "712:25:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "712:44:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "RevertStatement", + "src": "705:51:17" + } + ] + } + }, + { + "assignments": [ + 596 + ], + "declarations": [ + { + "constant": false, + "id": 596, + "mutability": "mutable", + "name": "store", + "nameLocation": "796:5:17", + "nodeType": "VariableDeclaration", + "scope": 634, + "src": "777:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 595, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 594, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "777:10:17" + }, + "referencedDeclaration": 533, + "src": "777:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 599, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 597, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "804:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "804:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "777:40:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 600, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "832:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 601, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "853:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "853:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "832:41:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 610, + "nodeType": "IfStatement", + "src": "828:101:17", + "trueBody": { + "id": 609, + "nodeType": "Block", + "src": "875:54:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 604, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "896:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "896:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "896:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 608, + "nodeType": "RevertStatement", + "src": "889:29:17" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "943:24:17", + "subExpression": { + "expression": { + "id": 611, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "944:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "944:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "id": 615, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "996:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 614, + "name": "_implementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "971:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", + "typeString": "function (address) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "971:43:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "943:71:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 623, + "nodeType": "IfStatement", + "src": "939:151:17", + "trueBody": { + "id": 622, + "nodeType": "Block", + "src": "1016:74:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 619, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1061:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 618, + "name": "ImplementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "1037:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1037:42:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 621, + "nodeType": "RevertStatement", + "src": "1030:49:17" + } + ] + } + }, + { + "expression": { + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 624, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "1100:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 626, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1100:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 627, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1123:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1100:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 629, + "nodeType": "ExpressionStatement", + "src": "1100:40:17" + }, + { + "eventCall": { + "arguments": [ + { + "id": 631, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1165:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 630, + "name": "Upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "1156:8:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1156:27:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 633, + "nodeType": "EmitStatement", + "src": "1151:32:17" + } + ] + }, + "id": 635, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_upgradeTo", + "nameLocation": "473:10:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 565, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "492:17:17", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "484:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "484:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "483:27:17" + }, + "returnParameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [], + "src": "528:0:17" + }, + "scope": 756, + "src": "464:726:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 678, + "nodeType": "Block", + "src": "1295:370:17", + "statements": [ + { + "assignments": [ + 643, + 645 + ], + "declarations": [ + { + "constant": false, + "id": 643, + "mutability": "mutable", + "name": "simulationReverted", + "nameLocation": "1311:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1306:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1306:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 645, + "mutability": "mutable", + "name": "simulationResponse", + "nameLocation": "1344:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1331:31:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 644, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1331:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 659, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 653, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1421:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "simulateUpgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "1421:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 655, + "name": "candidateImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "1446:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 656, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1445:25:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 651, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1406:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "1406:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1406:65:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 648, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1374:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + ], + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1366:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1366:7:17", + "typeDescriptions": {} + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1366:26:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:115:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1305:176:17" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1511:19:17", + "subExpression": { + "id": 660, + "name": "simulationReverted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "1512:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 665, + "name": "simulationResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "1573:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 663, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1556:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1556:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1556:36:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 662, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1546:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:47:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 671, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "1624:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1624:32:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "id": 669, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1607:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1607:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1607:50:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1597:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:61:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1546:112:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1511:147:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 641, + "id": 677, + "nodeType": "Return", + "src": "1492:166:17" + } + ] + }, + "id": 679, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_implementationIsSterile", + "nameLocation": "1205:24:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 637, + "mutability": "mutable", + "name": "candidateImplementation", + "nameLocation": "1238:23:17", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1230:31:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 636, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1230:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1229:33:17" + }, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1289:4:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 639, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1289:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1288:6:17" + }, + "scope": 756, + "src": "1196:469:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 232 + ], + "body": { + "id": 743, + "nodeType": "Block", + "src": "1741:622:17", + "statements": [ + { + "assignments": [ + 687 + ], + "declarations": [ + { + "constant": false, + "id": 687, + "mutability": "mutable", + "name": "store", + "nameLocation": "1770:5:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1751:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 686, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 685, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "1751:10:17" + }, + "referencedDeclaration": 533, + "src": "1751:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 690, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 688, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "1778:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1778:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1751:40:17" + }, + { + "expression": { + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 691, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1802:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1802:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1828:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1802:30:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 696, + "nodeType": "ExpressionStatement", + "src": "1802:30:17" + }, + { + "assignments": [ + 698 + ], + "declarations": [ + { + "constant": false, + "id": 698, + "mutability": "mutable", + "name": "currentImplementation", + "nameLocation": "1851:21:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1843:29:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1843:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 701, + "initialValue": { + "expression": { + "id": 699, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1875:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 700, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1875:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1843:52:17" + }, + { + "expression": { + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 702, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1905:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1905:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 705, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1928:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1905:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 707, + "nodeType": "ExpressionStatement", + "src": "1905:40:17" + }, + { + "assignments": [ + 709, + null + ], + "declarations": [ + { + "constant": false, + "id": 709, + "mutability": "mutable", + "name": "rollbackSuccessful", + "nameLocation": "1962:18:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1957:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 708, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1957:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 720, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 714, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2045:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 227, + "src": "2045:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 716, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2062:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 717, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2061:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 712, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2030:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "2030:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2030:55:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 710, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1986:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1986:30:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:109:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1956:139:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2110:19:17", + "subExpression": { + "id": 721, + "name": "rollbackSuccessful", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "2111:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 723, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2133:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2133:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 726, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2165:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2133:53:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2110:76:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 733, + "nodeType": "IfStatement", + "src": "2106:139:17", + "trueBody": { + "id": 732, + "nodeType": "Block", + "src": "2188:57:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 729, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "2209:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2209:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "RevertStatement", + "src": "2202:32:17" + } + ] + } + }, + { + "expression": { + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 734, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "2255:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "2255:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2281:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2255:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "2255:31:17" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 740, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "2348:6:17", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2348:8:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 742, + "nodeType": "ExpressionStatement", + "src": "2348:8:17" + } + ] + }, + "functionSelector": "c7f62cda", + "id": 744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "1680:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 683, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1732:8:17" + }, + "parameters": { + "id": 682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 681, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1706:17:17", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "1698:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1698:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1697:27:17" + }, + "returnParameters": { + "id": 684, + "nodeType": "ParameterList", + "parameters": [], + "src": "1741:0:17" + }, + "scope": 756, + "src": "1671:692:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 237 + ], + "body": { + "id": 754, + "nodeType": "Block", + "src": "2439:52:17", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 750, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2456:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2456:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2456:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 749, + "id": 753, + "nodeType": "Return", + "src": "2449:35:17" + } + ] + }, + "functionSelector": "aaf10f42", + "id": 755, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "2378:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 746, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2412:8:17" + }, + "parameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [], + "src": "2395:2:17" + }, + "returnParameters": { + "id": 749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 748, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 755, + "src": "2430:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2430:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2429:9:17" + }, + "scope": 756, + "src": "2369:122:17", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 757, + "src": "242:2251:17", + "usedErrors": [ + 561, + 563 + ] + } + ], + "src": "31:2463:17" + } + }, + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableMixin.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\n\ncontract Ownable is IOwnable, OwnableMixin {\n event OwnerNominated(address newOwner);\n event OwnerChanged(address oldOwner, address newOwner);\n\n error NotNominated(address addr);\n\n function acceptOwnership() public override {\n OwnableStore storage store = _ownableStore();\n\n address currentNominatedOwner = store.nominatedOwner;\n if (msg.sender != currentNominatedOwner) {\n revert NotNominated(msg.sender);\n }\n\n emit OwnerChanged(store.owner, currentNominatedOwner);\n store.owner = currentNominatedOwner;\n\n store.nominatedOwner = address(0);\n }\n\n function nominateNewOwner(address newNominatedOwner) public override onlyOwnerIfSet {\n OwnableStore storage store = _ownableStore();\n\n if (newNominatedOwner == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newNominatedOwner == store.nominatedOwner) {\n revert ChangeError.NoChange();\n }\n\n store.nominatedOwner = newNominatedOwner;\n emit OwnerNominated(newNominatedOwner);\n }\n\n function renounceNomination() external override {\n OwnableStore storage store = _ownableStore();\n\n if (store.nominatedOwner != msg.sender) {\n revert NotNominated(msg.sender);\n }\n\n store.nominatedOwner = address(0);\n }\n\n function owner() external view override returns (address) {\n return _ownableStore().owner;\n }\n\n function nominatedOwner() external view override returns (address) {\n return _ownableStore().nominatedOwner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 415, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 240, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:12" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "./OwnableMixin.sol", + "id": 241, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 477, + "src": "56:28:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "file": "../interfaces/IOwnable.sol", + "id": 242, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 221, + "src": "85:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 243, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 16, + "src": "122:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 244, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 26, + "src": "159:35:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 245, + "name": "IOwnable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 220, + "src": "216:8:12" + }, + "id": 246, + "nodeType": "InheritanceSpecifier", + "src": "216:8:12" + }, + { + "baseName": { + "id": 247, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "226:12:12" + }, + "id": 248, + "nodeType": "InheritanceSpecifier", + "src": "226:12:12" + } + ], + "canonicalName": "Ownable", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 414, + "linearizedBaseContracts": [ + 414, + 476, + 494, + 220 + ], + "name": "Ownable", + "nameLocation": "205:7:12", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 252, + "name": "OwnerNominated", + "nameLocation": "251:14:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "274:8:12", + "nodeType": "VariableDeclaration", + "scope": 252, + "src": "266:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "266:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:18:12" + }, + "src": "245:39:12" + }, + { + "anonymous": false, + "id": 258, + "name": "OwnerChanged", + "nameLocation": "295:12:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 254, + "indexed": false, + "mutability": "mutable", + "name": "oldOwner", + "nameLocation": "316:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "308:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 256, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "334:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "326:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "326:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "307:36:12" + }, + "src": "289:55:12" + }, + { + "id": 262, + "name": "NotNominated", + "nameLocation": "356:12:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 260, + "mutability": "mutable", + "name": "addr", + "nameLocation": "377:4:12", + "nodeType": "VariableDeclaration", + "scope": 262, + "src": "369:12:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "369:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "368:14:12" + }, + "src": "350:33:12" + }, + { + "baseFunctions": [ + 201 + ], + "body": { + "id": 309, + "nodeType": "Block", + "src": "432:383:12", + "statements": [ + { + "assignments": [ + 268 + ], + "declarations": [ + { + "constant": false, + "id": 268, + "mutability": "mutable", + "name": "store", + "nameLocation": "463:5:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "442:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 267, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 266, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "442:12:12" + }, + "referencedDeclaration": 485, + "src": "442:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 271, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 269, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "471:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "471:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "442:44:12" + }, + { + "assignments": [ + 273 + ], + "declarations": [ + { + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "currentNominatedOwner", + "nameLocation": "505:21:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "497:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "497:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 276, + "initialValue": { + "expression": { + "id": 274, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "529:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 275, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "529:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "497:52:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 277, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "563:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "563:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 279, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "577:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "563:35:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 287, + "nodeType": "IfStatement", + "src": "559:97:12", + "trueBody": { + "id": 286, + "nodeType": "Block", + "src": "600:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 282, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "634:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "634:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 281, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "621:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "621:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 285, + "nodeType": "RevertStatement", + "src": "614:31:12" + } + ] + } + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 289, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "684:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 290, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "684:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 291, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "697:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 288, + "name": "OwnerChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "671:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "671:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 293, + "nodeType": "EmitStatement", + "src": "666:53:12" + }, + { + "expression": { + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 294, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "729:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "729:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 297, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "743:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "729:35:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "729:35:12" + }, + { + "expression": { + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 300, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "775:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "775:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "806:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "798:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 303, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "798:7:12", + "typeDescriptions": {} + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "798:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "775:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "775:33:12" + } + ] + }, + "functionSelector": "79ba5097", + "id": 310, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "398:15:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 264, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "423:8:12" + }, + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [], + "src": "413:2:12" + }, + "returnParameters": { + "id": 265, + "nodeType": "ParameterList", + "parameters": [], + "src": "432:0:12" + }, + "scope": 414, + "src": "389:426:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 206 + ], + "body": { + "id": 358, + "nodeType": "Block", + "src": "905:376:12", + "statements": [ + { + "assignments": [ + 320 + ], + "declarations": [ + { + "constant": false, + "id": 320, + "mutability": "mutable", + "name": "store", + "nameLocation": "936:5:12", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "915:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 319, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 318, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "915:12:12" + }, + "referencedDeclaration": 485, + "src": "915:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 323, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 321, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "944:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "944:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "915:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 324, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "974:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1003:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "995:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 325, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "995:7:12", + "typeDescriptions": {} + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "974:31:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 336, + "nodeType": "IfStatement", + "src": "970:95:12", + "trueBody": { + "id": 335, + "nodeType": "Block", + "src": "1007:58:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 330, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1028:12:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1028:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1028:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 334, + "nodeType": "RevertStatement", + "src": "1021:33:12" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 337, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1079:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 338, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1100:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 339, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1100:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1079:41:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 347, + "nodeType": "IfStatement", + "src": "1075:101:12", + "trueBody": { + "id": 346, + "nodeType": "Block", + "src": "1122:54:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 341, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1143:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1143:20:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1143:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "RevertStatement", + "src": "1136:29:12" + } + ] + } + }, + { + "expression": { + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 348, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1186:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1186:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 351, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1209:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1186:40:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 353, + "nodeType": "ExpressionStatement", + "src": "1186:40:12" + }, + { + "eventCall": { + "arguments": [ + { + "id": 355, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1256:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 354, + "name": "OwnerNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 252, + "src": "1241:14:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1241:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 357, + "nodeType": "EmitStatement", + "src": "1236:38:12" + } + ] + }, + "functionSelector": "1627540c", + "id": 359, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 316, + "kind": "modifierInvocation", + "modifierName": { + "id": 315, + "name": "onlyOwnerIfSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 447, + "src": "890:14:12" + }, + "nodeType": "ModifierInvocation", + "src": "890:14:12" + } + ], + "name": "nominateNewOwner", + "nameLocation": "830:16:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 314, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "881:8:12" + }, + "parameters": { + "id": 313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 312, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "855:17:12", + "nodeType": "VariableDeclaration", + "scope": 359, + "src": "847:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "847:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "846:27:12" + }, + "returnParameters": { + "id": 317, + "nodeType": "ParameterList", + "parameters": [], + "src": "905:0:12" + }, + "scope": 414, + "src": "821:460:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 209 + ], + "body": { + "id": 390, + "nodeType": "Block", + "src": "1335:211:12", + "statements": [ + { + "assignments": [ + 365 + ], + "declarations": [ + { + "constant": false, + "id": 365, + "mutability": "mutable", + "name": "store", + "nameLocation": "1366:5:12", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "1345:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 364, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 363, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "1345:12:12" + }, + "referencedDeclaration": 485, + "src": "1345:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 368, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 366, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1374:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1374:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 369, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1404:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1404:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 371, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1428:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1428:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1404:34:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 380, + "nodeType": "IfStatement", + "src": "1400:96:12", + "trueBody": { + "id": 379, + "nodeType": "Block", + "src": "1440:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 375, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1474:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1474:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 374, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "1461:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1461:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "RevertStatement", + "src": "1454:31:12" + } + ] + } + }, + { + "expression": { + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 381, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1506:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 383, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1506:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1537:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1529:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1529:7:12", + "typeDescriptions": {} + } + }, + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1529:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1506:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 389, + "nodeType": "ExpressionStatement", + "src": "1506:33:12" + } + ] + }, + "functionSelector": "718fe928", + "id": 391, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "1296:18:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 361, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1326:8:12" + }, + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "1314:2:12" + }, + "returnParameters": { + "id": 362, + "nodeType": "ParameterList", + "parameters": [], + "src": "1335:0:12" + }, + "scope": 414, + "src": "1287:259:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 214 + ], + "body": { + "id": 401, + "nodeType": "Block", + "src": "1610:45:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 397, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1627:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1627:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 399, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "1627:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 396, + "id": 400, + "nodeType": "Return", + "src": "1620:28:12" + } + ] + }, + "functionSelector": "8da5cb5b", + "id": 402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "1561:5:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 393, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:12" + }, + "parameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [], + "src": "1566:2:12" + }, + "returnParameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 395, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "1601:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1600:9:12" + }, + "scope": 414, + "src": "1552:103:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 219 + ], + "body": { + "id": 412, + "nodeType": "Block", + "src": "1728:54:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 408, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1745:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1745:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1745:30:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 407, + "id": 411, + "nodeType": "Return", + "src": "1738:37:12" + } + ] + }, + "functionSelector": "53a47bb7", + "id": 413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "1670:14:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 404, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1701:8:12" + }, + "parameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "1684:2:12" + }, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "1719:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 405, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1719:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1718:9:12" + }, + "scope": 414, + "src": "1661:121:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 415, + "src": "196:1588:12", + "usedErrors": [ + 5, + 10, + 24, + 262 + ] + } + ], + "src": "31:1754:12" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IERC721.sol\";\nimport \"../interfaces/IERC721Metadata.sol\";\nimport \"../interfaces/IERC721Receiver.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/AccessError.sol\";\nimport \"../errors/InitError.sol\";\nimport \"./ERC721Storage.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"../utils/StringUtil.sol\";\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol\n*/\n\ncontract ERC721 is IERC721, IERC721Metadata, ERC721Storage {\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n error CannotSelfApprove(address);\n error InvalidTransferRecipient(address);\n error TokenDoesNotExist(uint256);\n error TokenAlreadyMinted(uint256);\n\n function _initialize(\n string memory tokenName,\n string memory tokenSymbol,\n string memory baseTokenURI\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (bytes(store.name).length > 0 || bytes(store.symbol).length > 0 || bytes(store.baseTokenURI).length > 0) {\n revert InitError.AlreadyInitialized();\n }\n\n store.name = tokenName;\n store.symbol = tokenSymbol;\n store.baseTokenURI = baseTokenURI;\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return\n interfaceId == this.supportsInterface.selector || // ERC165\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId;\n }\n\n function balanceOf(address holder) public view virtual override returns (uint) {\n if (holder == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n return _erc721Store().balanceOf[holder];\n }\n\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().ownerOf[tokenId];\n }\n\n function name() external view virtual override returns (string memory) {\n return _erc721Store().name;\n }\n\n function symbol() external view virtual override returns (string memory) {\n return _erc721Store().symbol;\n }\n\n function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n string memory baseURI = _erc721Store().baseTokenURI;\n\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, StringUtil.uintToString(tokenId))) : \"\";\n }\n\n function approve(address to, uint256 tokenId) public virtual override {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n if (to == holder) {\n revert CannotSelfApprove(to);\n }\n\n if (msg.sender != holder && !isApprovedForAll(holder, msg.sender)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _approve(to, tokenId);\n }\n\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().tokenApprovals[tokenId];\n }\n\n function setApprovalForAll(address operator, bool approved) public virtual override {\n if (msg.sender == operator) {\n revert CannotSelfApprove(operator);\n }\n\n _erc721Store().operatorApprovals[msg.sender][operator] = approved;\n\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n function isApprovedForAll(address holder, address operator) public view virtual override returns (bool) {\n return _erc721Store().operatorApprovals[holder][operator];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n if (!_checkOnERC721Received(from, to, tokenId, data)) {\n revert InvalidTransferRecipient(to);\n }\n }\n\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _erc721Store().ownerOf[tokenId] != address(0);\n }\n\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address holder = ownerOf(tokenId);\n\n // Not checking tokenId existence since it is checked in ownerOf() and getApproved()\n\n return (spender == holder || getApproved(tokenId) == spender || isApprovedForAll(holder, spender));\n }\n\n function _mint(address to, uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (_exists(tokenId)) {\n revert TokenAlreadyMinted(tokenId);\n }\n\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n function _burn(uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n _approve(address(0), tokenId);\n\n store.balanceOf[holder] -= 1;\n delete store.ownerOf[tokenId];\n\n emit Transfer(holder, address(0), tokenId);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n\n if (ownerOf(tokenId) != from) {\n revert AccessError.Unauthorized(from);\n }\n\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n // Clear approvals from the previous holder\n _approve(address(0), tokenId);\n\n store.balanceOf[from] -= 1;\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n function _approve(address to, uint256 tokenId) internal virtual {\n _erc721Store().tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (AddressUtil.isContract(to)) {\n try IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch {\n return false;\n }\n } else {\n return true;\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "InitError": [ + 32 + ], + "StringUtil": [ + 2369 + ] + }, + "id": 1642, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 818, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:19" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "file": "../interfaces/IERC721.sol", + "id": 819, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 158, + "src": "56:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "file": "../interfaces/IERC721Metadata.sol", + "id": 820, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 181, + "src": "92:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "file": "../interfaces/IERC721Receiver.sol", + "id": 821, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 197, + "src": "136:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 822, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 16, + "src": "180:36:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 823, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 7, + "src": "217:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 824, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 33, + "src": "253:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "file": "./ERC721Storage.sol", + "id": 825, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1678, + "src": "287:29:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 826, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1697, + "src": "317:34:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "file": "../utils/StringUtil.sol", + "id": 827, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 2370, + "src": "352:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 828, + "name": "IERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 157, + "src": "566:7:19" + }, + "id": 829, + "nodeType": "InheritanceSpecifier", + "src": "566:7:19" + }, + { + "baseName": { + "id": 830, + "name": "IERC721Metadata", + "nodeType": "IdentifierPath", + "referencedDeclaration": 180, + "src": "575:15:19" + }, + "id": 831, + "nodeType": "InheritanceSpecifier", + "src": "575:15:19" + }, + { + "baseName": { + "id": 832, + "name": "ERC721Storage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1677, + "src": "592:13:19" + }, + "id": 833, + "nodeType": "InheritanceSpecifier", + "src": "592:13:19" + } + ], + "canonicalName": "ERC721", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1641, + "linearizedBaseContracts": [ + 1641, + 1677, + 180, + 157, + 78 + ], + "name": "ERC721", + "nameLocation": "556:6:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 841, + "name": "Transfer", + "nameLocation": "618:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 835, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "643:4:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "627:20:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 834, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "627:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 837, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "665:2:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "649:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 839, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "685:7:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "669:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "626:67:19" + }, + "src": "612:82:19" + }, + { + "anonymous": false, + "id": 849, + "name": "Approval", + "nameLocation": "705:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 843, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "730:5:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "714:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 845, + "indexed": true, + "mutability": "mutable", + "name": "approved", + "nameLocation": "753:8:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "737:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 844, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "737:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 847, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "763:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "763:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "713:74:19" + }, + "src": "699:89:19" + }, + { + "anonymous": false, + "id": 857, + "name": "ApprovalForAll", + "nameLocation": "799:14:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 851, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "830:5:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "814:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "814:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 853, + "indexed": true, + "mutability": "mutable", + "name": "operator", + "nameLocation": "853:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "837:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 852, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 855, + "indexed": false, + "mutability": "mutable", + "name": "approved", + "nameLocation": "868:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "863:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 854, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "863:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "813:64:19" + }, + "src": "793:85:19" + }, + { + "id": 861, + "name": "CannotSelfApprove", + "nameLocation": "890:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 859, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 861, + "src": "908:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "908:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "907:9:19" + }, + "src": "884:33:19" + }, + { + "id": 865, + "name": "InvalidTransferRecipient", + "nameLocation": "928:24:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 865, + "src": "953:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "953:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "952:9:19" + }, + "src": "922:40:19" + }, + { + "id": 869, + "name": "TokenDoesNotExist", + "nameLocation": "973:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "991:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "991:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "990:9:19" + }, + "src": "967:33:19" + }, + { + "id": 873, + "name": "TokenAlreadyMinted", + "nameLocation": "1011:18:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1030:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1030:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1029:9:19" + }, + "src": "1005:34:19" + }, + { + "body": { + "id": 939, + "nodeType": "Block", + "src": "1193:350:19", + "statements": [ + { + "assignments": [ + 884 + ], + "declarations": [ + { + "constant": false, + "id": 884, + "mutability": "mutable", + "name": "store", + "nameLocation": "1223:5:19", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "1203:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 883, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 882, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "1203:11:19" + }, + "referencedDeclaration": 1668, + "src": "1203:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 887, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 885, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "1231:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1203:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 890, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1265:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1265:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1259:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 888, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1259:5:19", + "typeDescriptions": {} + } + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1259:17:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1259:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1286:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1259:28:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 898, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1297:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 899, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1297:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1291:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 896, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1291:5:19", + "typeDescriptions": {} + } + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1291:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1291:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1320:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1291:30:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:62:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 907, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1331:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1331:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1325:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 905, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1325:5:19", + "typeDescriptions": {} + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1325:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1325:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1360:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1325:36:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:102:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 920, + "nodeType": "IfStatement", + "src": "1255:170:19", + "trueBody": { + "id": 919, + "nodeType": "Block", + "src": "1363:62:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 914, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1384:9:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "1384:28:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1384:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 918, + "nodeType": "RevertStatement", + "src": "1377:37:19" + } + ] + } + }, + { + "expression": { + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 921, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1435:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1435:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 924, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 875, + "src": "1448:9:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1435:22:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 926, + "nodeType": "ExpressionStatement", + "src": "1435:22:19" + }, + { + "expression": { + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 927, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1467:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1467:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 930, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "1482:11:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1467:26:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 932, + "nodeType": "ExpressionStatement", + "src": "1467:26:19" + }, + { + "expression": { + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 933, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1503:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1503:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 936, + "name": "baseTokenURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "1524:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1503:33:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "1503:33:19" + } + ] + }, + "id": 940, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initialize", + "nameLocation": "1054:11:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 875, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "1089:9:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1075:23:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 874, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1075:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "1122:11:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1108:25:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 876, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1108:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 879, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "1157:12:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1143:26:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 878, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1143:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1065:110:19" + }, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [], + "src": "1193:0:19" + }, + "scope": 1641, + "src": "1045:498:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 77 + ], + "body": { + "id": 968, + "nodeType": "Block", + "src": "1640:212:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 948, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1669:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 949, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1684:4:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721_$1641", + "typeString": "contract ERC721" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 969, + "src": "1684:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1684:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1669:46:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 953, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1741:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 955, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "1761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + ], + "id": 954, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1756:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1756:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721_$157", + "typeString": "type(contract IERC721)" + } + }, + "id": 957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1756:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1741:40:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:112:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 960, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1797:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 962, + "name": "IERC721Metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 180, + "src": "1817:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + ], + "id": 961, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1812:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1812:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721Metadata_$180", + "typeString": "type(contract IERC721Metadata)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1812:33:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1797:48:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:176:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 947, + "id": 967, + "nodeType": "Return", + "src": "1650:195:19" + } + ] + }, + "functionSelector": "01ffc9a7", + "id": 969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "1558:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 944, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1616:8:19" + }, + "parameters": { + "id": 943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 942, + "mutability": "mutable", + "name": "interfaceId", + "nameLocation": "1583:11:19", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1576:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 941, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1576:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "1575:20:19" + }, + "returnParameters": { + "id": 947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1634:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 945, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1634:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1633:6:19" + }, + "scope": 1641, + "src": "1549:303:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 90 + ], + "body": { + "id": 996, + "nodeType": "Block", + "src": "1937:150:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 977, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "1951:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1969:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1961:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1961:7:19", + "typeDescriptions": {} + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1961:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1951:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 989, + "nodeType": "IfStatement", + "src": "1947:84:19", + "trueBody": { + "id": 988, + "nodeType": "Block", + "src": "1973:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 983, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1994:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1994:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 987, + "nodeType": "RevertStatement", + "src": "1987:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 990, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2048:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2048:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "2048:24:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 994, + "indexExpression": { + "id": 993, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2073:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2048:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 976, + "id": 995, + "nodeType": "Return", + "src": "2041:39:19" + } + ] + }, + "functionSelector": "70a08231", + "id": 997, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "1867:9:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 973, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1913:8:19" + }, + "parameters": { + "id": 972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 971, + "mutability": "mutable", + "name": "holder", + "nameLocation": "1885:6:19", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1877:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1877:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1876:16:19" + }, + "returnParameters": { + "id": 976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 975, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1931:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 974, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1931:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1930:6:19" + }, + "scope": 1641, + "src": "1858:229:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 97 + ], + "body": { + "id": 1021, + "nodeType": "Block", + "src": "2174:146:19", + "statements": [ + { + "condition": { + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2188:17:19", + "subExpression": { + "arguments": [ + { + "id": 1006, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2197:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1005, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2189:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1014, + "nodeType": "IfStatement", + "src": "2184:81:19", + "trueBody": { + "id": 1013, + "nodeType": "Block", + "src": "2207:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1010, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2246:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1009, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2228:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2228:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1012, + "nodeType": "RevertStatement", + "src": "2221:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1015, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2282:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2282:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "2282:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1019, + "indexExpression": { + "id": 1018, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2305:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2282:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1004, + "id": 1020, + "nodeType": "Return", + "src": "2275:38:19" + } + ] + }, + "functionSelector": "6352211e", + "id": 1022, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "2102:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1001, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2147:8:19" + }, + "parameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 999, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2118:7:19", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2110:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2110:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2109:17:19" + }, + "returnParameters": { + "id": 1004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2165:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1002, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2165:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2164:9:19" + }, + "scope": 1641, + "src": "2093:227:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 167 + ], + "body": { + "id": 1032, + "nodeType": "Block", + "src": "2397:43:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1028, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2414:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2414:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "2414:19:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1027, + "id": 1031, + "nodeType": "Return", + "src": "2407:26:19" + } + ] + }, + "functionSelector": "06fdde03", + "id": 1033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "2335:4:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1024, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2364:8:19" + }, + "parameters": { + "id": 1023, + "nodeType": "ParameterList", + "parameters": [], + "src": "2339:2:19" + }, + "returnParameters": { + "id": 1027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1026, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1033, + "src": "2382:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1025, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2382:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2381:15:19" + }, + "scope": 1641, + "src": "2326:114:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 172 + ], + "body": { + "id": 1043, + "nodeType": "Block", + "src": "2519:45:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1039, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2536:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1041, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "2536:21:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1038, + "id": 1042, + "nodeType": "Return", + "src": "2529:28:19" + } + ] + }, + "functionSelector": "95d89b41", + "id": 1044, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "2455:6:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1035, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2486:8:19" + }, + "parameters": { + "id": 1034, + "nodeType": "ParameterList", + "parameters": [], + "src": "2461:2:19" + }, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1037, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1044, + "src": "2504:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2504:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2503:15:19" + }, + "scope": 1641, + "src": "2446:118:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 179 + ], + "body": { + "id": 1089, + "nodeType": "Block", + "src": "2660:277:19", + "statements": [ + { + "condition": { + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2674:17:19", + "subExpression": { + "arguments": [ + { + "id": 1053, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2683:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1052, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2675:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2675:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1061, + "nodeType": "IfStatement", + "src": "2670:81:19", + "trueBody": { + "id": 1060, + "nodeType": "Block", + "src": "2693:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1057, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2732:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1056, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2714:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2714:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1059, + "nodeType": "RevertStatement", + "src": "2707:33:19" + } + ] + } + }, + { + "assignments": [ + 1063 + ], + "declarations": [ + { + "constant": false, + "id": 1063, + "mutability": "mutable", + "name": "baseURI", + "nameLocation": "2775:7:19", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "2761:21:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1062, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2761:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 1067, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1064, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2785:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2785:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "2785:27:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2761:51:19" + }, + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 1070, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2836:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2830:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1068, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2830:5:19", + "typeDescriptions": {} + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2830:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2830:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2854:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2830:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "", + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "id": 1087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2830:100:19", + "trueExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1079, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2882:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "id": 1082, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2915:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1080, + "name": "StringUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "2891:10:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_StringUtil_$2369_$", + "typeString": "type(library StringUtil)" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uintToString", + "nodeType": "MemberAccess", + "referencedDeclaration": 2368, + "src": "2891:23:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2891:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1077, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2865:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2865:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2865:59:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2858:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 1075, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2858:6:19", + "typeDescriptions": {} + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2858:67:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1051, + "id": 1088, + "nodeType": "Return", + "src": "2823:107:19" + } + ] + }, + "functionSelector": "c87b56dd", + "id": 1090, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "2579:8:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1048, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2627:8:19" + }, + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1046, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2596:7:19", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2588:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2588:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2587:17:19" + }, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2645:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2645:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2644:15:19" + }, + "scope": 1641, + "src": "2570:367:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 133 + ], + "body": { + "id": 1145, + "nodeType": "Block", + "src": "3013:366:19", + "statements": [ + { + "assignments": [ + 1100 + ], + "declarations": [ + { + "constant": false, + "id": 1100, + "mutability": "mutable", + "name": "store", + "nameLocation": "3043:5:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3023:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1098, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "3023:11:19" + }, + "referencedDeclaration": 1668, + "src": "3023:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1103, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1101, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3051:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3023:42:19" + }, + { + "assignments": [ + 1105 + ], + "declarations": [ + { + "constant": false, + "id": 1105, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3083:6:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3075:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3075:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1110, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1106, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1100, + "src": "3092:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "3092:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1109, + "indexExpression": { + "id": 1108, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3106:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3092:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3075:39:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1111, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3129:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1112, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3135:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3129:12:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1119, + "nodeType": "IfStatement", + "src": "3125:71:19", + "trueBody": { + "id": 1118, + "nodeType": "Block", + "src": "3143:53:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1115, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3182:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1114, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3164:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1117, + "nodeType": "RevertStatement", + "src": "3157:28:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3210:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3210:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1122, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3224:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3210:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3234:37:19", + "subExpression": { + "arguments": [ + { + "id": 1125, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3252:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1126, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3260:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3260:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "3235:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3210:61:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1139, + "nodeType": "IfStatement", + "src": "3206:135:19", + "trueBody": { + "id": 1138, + "nodeType": "Block", + "src": "3273:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1134, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3319:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3319:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1131, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "3294:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "3294:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3294:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1137, + "nodeType": "RevertStatement", + "src": "3287:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1141, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3360:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1142, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3364:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1140, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "3351:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3351:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1144, + "nodeType": "ExpressionStatement", + "src": "3351:21:19" + } + ] + }, + "functionSelector": "095ea7b3", + "id": 1146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2952:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3004:8:19" + }, + "parameters": { + "id": 1095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "mutability": "mutable", + "name": "to", + "nameLocation": "2968:2:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2960:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2960:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1094, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2980:7:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2972:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2972:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2959:29:19" + }, + "returnParameters": { + "id": 1097, + "nodeType": "ParameterList", + "parameters": [], + "src": "3013:0:19" + }, + "scope": 1641, + "src": "2943:436:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 147 + ], + "body": { + "id": 1170, + "nodeType": "Block", + "src": "3470:153:19", + "statements": [ + { + "condition": { + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3484:17:19", + "subExpression": { + "arguments": [ + { + "id": 1155, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3493:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1154, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "3485:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3485:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1163, + "nodeType": "IfStatement", + "src": "3480:81:19", + "trueBody": { + "id": 1162, + "nodeType": "Block", + "src": "3503:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1159, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3542:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1158, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "3524:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3524:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1161, + "nodeType": "RevertStatement", + "src": "3517:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1164, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3578:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3578:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "3578:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1168, + "indexExpression": { + "id": 1167, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3608:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3578:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1153, + "id": 1169, + "nodeType": "Return", + "src": "3571:45:19" + } + ] + }, + "functionSelector": "081812fc", + "id": 1171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "3394:11:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1150, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3443:8:19" + }, + "parameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1148, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3405:17:19" + }, + "returnParameters": { + "id": 1153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1152, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3461:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3461:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3460:9:19" + }, + "scope": 1641, + "src": "3385:238:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 140 + ], + "body": { + "id": 1207, + "nodeType": "Block", + "src": "3713:241:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1179, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3727:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3727:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1181, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3741:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3727:22:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1188, + "nodeType": "IfStatement", + "src": "3723:87:19", + "trueBody": { + "id": 1187, + "nodeType": "Block", + "src": "3751:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1184, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3790:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1183, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3772:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3772:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1186, + "nodeType": "RevertStatement", + "src": "3765:34:19" + } + ] + } + }, + { + "expression": { + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1189, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3820:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3820:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "3820:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1194, + "indexExpression": { + "expression": { + "id": 1192, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3853:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3853:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3820:44:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1196, + "indexExpression": { + "id": 1195, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3865:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3820:54:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1197, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3877:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3820:65:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1199, + "nodeType": "ExpressionStatement", + "src": "3820:65:19" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 1201, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3916:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3916:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1203, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3928:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1204, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3938:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1200, + "name": "ApprovalForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 857, + "src": "3901:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,address,bool)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3901:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1206, + "nodeType": "EmitStatement", + "src": "3896:51:19" + } + ] + }, + "functionSelector": "a22cb465", + "id": 1208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "3638:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3704:8:19" + }, + "parameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1173, + "mutability": "mutable", + "name": "operator", + "nameLocation": "3664:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3656:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3656:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "mutability": "mutable", + "name": "approved", + "nameLocation": "3679:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3674:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1174, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3674:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3655:33:19" + }, + "returnParameters": { + "id": 1178, + "nodeType": "ParameterList", + "parameters": [], + "src": "3713:0:19" + }, + "scope": 1641, + "src": "3629:325:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 156 + ], + "body": { + "id": 1226, + "nodeType": "Block", + "src": "4064:74:19", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1218, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "4081:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4081:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "4081:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1222, + "indexExpression": { + "id": 1221, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "4114:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:40:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1224, + "indexExpression": { + "id": 1223, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "4122:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:50:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1217, + "id": 1225, + "nodeType": "Return", + "src": "4074:57:19" + } + ] + }, + "functionSelector": "e985e9c5", + "id": 1227, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "3969:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1214, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4040:8:19" + }, + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3994:6:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "3986:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1209, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3986:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "mutability": "mutable", + "name": "operator", + "nameLocation": "4010:8:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4002:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4002:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3985:34:19" + }, + "returnParameters": { + "id": 1217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1216, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4058:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1215, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4058:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4057:6:19" + }, + "scope": 1641, + "src": "3960:178:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 126 + ], + "body": { + "id": 1258, + "nodeType": "Block", + "src": "4263:169:19", + "statements": [ + { + "condition": { + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4277:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1238, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4297:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4297:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1240, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4309:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1237, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4278:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4278:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1251, + "nodeType": "IfStatement", + "src": "4273:114:19", + "trueBody": { + "id": 1250, + "nodeType": "Block", + "src": "4319:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1246, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4365:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4365:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1243, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4340:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4340:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4340:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1249, + "nodeType": "RevertStatement", + "src": "4333:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1253, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1229, + "src": "4407:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1254, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "4413:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1255, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4417:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1252, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4397:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4397:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1257, + "nodeType": "ExpressionStatement", + "src": "4397:28:19" + } + ] + }, + "functionSelector": "23b872dd", + "id": 1259, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "4153:12:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1235, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4254:8:19" + }, + "parameters": { + "id": 1234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1229, + "mutability": "mutable", + "name": "from", + "nameLocation": "4183:4:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4175:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4175:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "to", + "nameLocation": "4205:2:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4197:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1230, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4197:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1233, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4225:7:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4217:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1232, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4217:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4165:73:19" + }, + "returnParameters": { + "id": 1236, + "nodeType": "ParameterList", + "parameters": [], + "src": "4263:0:19" + }, + "scope": 1641, + "src": "4144:288:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 117 + ], + "body": { + "id": 1276, + "nodeType": "Block", + "src": "4561:56:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1270, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "4588:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1271, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "4594:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1272, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4598:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4607:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 1269, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1277, + 1324 + ], + "referencedDeclaration": 1324, + "src": "4571:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1275, + "nodeType": "ExpressionStatement", + "src": "4571:39:19" + } + ] + }, + "functionSelector": "42842e0e", + "id": 1277, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4447:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1267, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4552:8:19" + }, + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1261, + "mutability": "mutable", + "name": "from", + "nameLocation": "4481:4:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4473:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1260, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4473:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "mutability": "mutable", + "name": "to", + "nameLocation": "4503:2:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4495:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4495:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4523:7:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4515:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4515:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4463:73:19" + }, + "returnParameters": { + "id": 1268, + "nodeType": "ParameterList", + "parameters": [], + "src": "4561:0:19" + }, + "scope": 1641, + "src": "4438:179:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 108 + ], + "body": { + "id": 1323, + "nodeType": "Block", + "src": "4773:292:19", + "statements": [ + { + "condition": { + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4787:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1290, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4807:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4807:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1292, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4819:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1289, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4788:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4788:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1303, + "nodeType": "IfStatement", + "src": "4783:114:19", + "trueBody": { + "id": 1302, + "nodeType": "Block", + "src": "4829:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1298, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4875:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4875:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1295, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4850:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4850:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4850:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1301, + "nodeType": "RevertStatement", + "src": "4843:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1305, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4917:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1306, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4923:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1307, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1304, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4907:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4907:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1309, + "nodeType": "ExpressionStatement", + "src": "4907:28:19" + }, + { + "condition": { + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4949:48:19", + "subExpression": { + "arguments": [ + { + "id": 1311, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4973:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1312, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4979:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1313, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4983:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1314, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "4992:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1310, + "name": "_checkOnERC721Received", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1640, + "src": "4950:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4950:47:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1322, + "nodeType": "IfStatement", + "src": "4945:114:19", + "trueBody": { + "id": 1321, + "nodeType": "Block", + "src": "4999:60:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1318, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "5045:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1317, + "name": "InvalidTransferRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 865, + "src": "5020:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5020:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1320, + "nodeType": "RevertStatement", + "src": "5013:35:19" + } + ] + } + } + ] + }, + "functionSelector": "b88d4fde", + "id": 1324, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4632:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1287, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4764:8:19" + }, + "parameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1279, + "mutability": "mutable", + "name": "from", + "nameLocation": "4666:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4658:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1281, + "mutability": "mutable", + "name": "to", + "nameLocation": "4688:2:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4680:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1280, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4680:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1283, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4708:7:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4700:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4700:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1285, + "mutability": "mutable", + "name": "data", + "nameLocation": "4738:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4725:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1284, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4725:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4648:100:19" + }, + "returnParameters": { + "id": 1288, + "nodeType": "ParameterList", + "parameters": [], + "src": "4773:0:19" + }, + "scope": 1641, + "src": "4623:442:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 1342, + "nodeType": "Block", + "src": "5142:69:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1331, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5159:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5159:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5159:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1335, + "indexExpression": { + "id": 1334, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "5182:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5159:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5202:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5194:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5194:7:19", + "typeDescriptions": {} + } + }, + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5194:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5159:45:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1330, + "id": 1341, + "nodeType": "Return", + "src": "5152:52:19" + } + ] + }, + "id": 1343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_exists", + "nameLocation": "5080:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1326, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5096:7:19", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5088:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5088:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5087:17:19" + }, + "returnParameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5136:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1328, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5135:6:19" + }, + "scope": 1641, + "src": "5071:140:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1374, + "nodeType": "Block", + "src": "5316:253:19", + "statements": [ + { + "assignments": [ + 1353 + ], + "declarations": [ + { + "constant": false, + "id": 1353, + "mutability": "mutable", + "name": "holder", + "nameLocation": "5334:6:19", + "nodeType": "VariableDeclaration", + "scope": 1374, + "src": "5326:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1352, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5326:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1357, + "initialValue": { + "arguments": [ + { + "id": 1355, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5351:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1354, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "5343:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5343:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5326:33:19" + }, + { + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1358, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5472:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1359, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5483:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5472:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1362, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5505:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1361, + "name": "getApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5493:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5493:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1364, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5517:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5493:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:52:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 1368, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5545:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1369, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5553:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1367, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "5528:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5528:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:89:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5471:91:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1351, + "id": 1373, + "nodeType": "Return", + "src": "5464:98:19" + } + ] + }, + "id": 1375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isApprovedOrOwner", + "nameLocation": "5226:18:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "mutability": "mutable", + "name": "spender", + "nameLocation": "5253:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5245:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5245:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1347, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5270:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5262:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5244:34:19" + }, + "returnParameters": { + "id": 1351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5310:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5310:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5309:6:19" + }, + "scope": 1641, + "src": "5217:352:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1435, + "nodeType": "Block", + "src": "5636:360:19", + "statements": [ + { + "assignments": [ + 1384 + ], + "declarations": [ + { + "constant": false, + "id": 1384, + "mutability": "mutable", + "name": "store", + "nameLocation": "5666:5:19", + "nodeType": "VariableDeclaration", + "scope": 1435, + "src": "5646:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1383, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1382, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "5646:11:19" + }, + "referencedDeclaration": 1668, + "src": "5646:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1385, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5674:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5674:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5646:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1388, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5702:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5716:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5708:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5708:7:19", + "typeDescriptions": {} + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5708:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5702:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1400, + "nodeType": "IfStatement", + "src": "5698:80:19", + "trueBody": { + "id": 1399, + "nodeType": "Block", + "src": "5720:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1394, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "5741:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "5741:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1398, + "nodeType": "RevertStatement", + "src": "5734:33:19" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 1402, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5800:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1401, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "5792:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1409, + "nodeType": "IfStatement", + "src": "5788:81:19", + "trueBody": { + "id": 1408, + "nodeType": "Block", + "src": "5810:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1405, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5850:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1404, + "name": "TokenAlreadyMinted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "5831:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5831:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1407, + "nodeType": "RevertStatement", + "src": "5824:34:19" + } + ] + } + }, + { + "expression": { + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1410, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5879:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1413, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "5879:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1414, + "indexExpression": { + "id": 1412, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5895:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5879:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5902:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5879:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1417, + "nodeType": "ExpressionStatement", + "src": "5879:24:19" + }, + { + "expression": { + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1418, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5913:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5913:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1422, + "indexExpression": { + "id": 1420, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5913:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1423, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5938:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5913:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1425, + "nodeType": "ExpressionStatement", + "src": "5913:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5973:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5965:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5965:7:19", + "typeDescriptions": {} + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5965:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1431, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5977:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1432, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5981:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1426, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "5956:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5956:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1434, + "nodeType": "EmitStatement", + "src": "5951:38:19" + } + ] + }, + "id": 1436, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nameLocation": "5584:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "mutability": "mutable", + "name": "to", + "nameLocation": "5598:2:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5590:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5590:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1379, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5610:7:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5602:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1378, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5602:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5589:29:19" + }, + "returnParameters": { + "id": 1381, + "nodeType": "ParameterList", + "parameters": [], + "src": "5636:0:19" + }, + "scope": 1641, + "src": "5575:421:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1485, + "nodeType": "Block", + "src": "6051:279:19", + "statements": [ + { + "assignments": [ + 1443 + ], + "declarations": [ + { + "constant": false, + "id": 1443, + "mutability": "mutable", + "name": "store", + "nameLocation": "6081:5:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6061:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1442, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1441, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6061:11:19" + }, + "referencedDeclaration": 1668, + "src": "6061:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1446, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1444, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6089:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6089:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6061:42:19" + }, + { + "assignments": [ + 1448 + ], + "declarations": [ + { + "constant": false, + "id": 1448, + "mutability": "mutable", + "name": "holder", + "nameLocation": "6121:6:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6113:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6113:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1453, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1449, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6130:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6130:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1452, + "indexExpression": { + "id": 1451, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6144:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6130:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6113:39:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6180:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6172:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1455, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6172:7:19", + "typeDescriptions": {} + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6172:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1459, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6184:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1454, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6163:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1461, + "nodeType": "ExpressionStatement", + "src": "6163:29:19" + }, + { + "expression": { + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1462, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6203:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6203:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1466, + "indexExpression": { + "id": 1464, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6219:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6203:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6230:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6203:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1469, + "nodeType": "ExpressionStatement", + "src": "6203:28:19" + }, + { + "expression": { + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6241:29:19", + "subExpression": { + "baseExpression": { + "expression": { + "id": 1470, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6248:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6248:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1473, + "indexExpression": { + "id": 1472, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6248:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1475, + "nodeType": "ExpressionStatement", + "src": "6241:29:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1477, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6295:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6311:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6303:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6303:7:19", + "typeDescriptions": {} + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6303:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1482, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6315:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1476, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6286:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6286:37:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "EmitStatement", + "src": "6281:42:19" + } + ] + }, + "id": 1486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nameLocation": "6011:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1438, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6025:7:19", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "6017:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1437, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6017:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6016:17:19" + }, + "returnParameters": { + "id": 1440, + "nodeType": "ParameterList", + "parameters": [], + "src": "6051:0:19" + }, + "scope": 1641, + "src": "6002:328:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1565, + "nodeType": "Block", + "src": "6445:494:19", + "statements": [ + { + "assignments": [ + 1497 + ], + "declarations": [ + { + "constant": false, + "id": 1497, + "mutability": "mutable", + "name": "store", + "nameLocation": "6475:5:19", + "nodeType": "VariableDeclaration", + "scope": 1565, + "src": "6455:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1496, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1495, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6455:11:19" + }, + "referencedDeclaration": 1668, + "src": "6455:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1500, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1498, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6483:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6483:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6455:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1502, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6520:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1501, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "6512:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1504, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6532:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6512:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1513, + "nodeType": "IfStatement", + "src": "6508:92:19", + "trueBody": { + "id": 1512, + "nodeType": "Block", + "src": "6538:62:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1509, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6584:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1506, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "6559:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "6559:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6559:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1511, + "nodeType": "RevertStatement", + "src": "6552:37:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1514, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6614:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6628:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6620:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6620:7:19", + "typeDescriptions": {} + } + }, + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6620:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1526, + "nodeType": "IfStatement", + "src": "6610:80:19", + "trueBody": { + "id": 1525, + "nodeType": "Block", + "src": "6632:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1520, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "6653:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "6653:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1524, + "nodeType": "RevertStatement", + "src": "6646:33:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6769:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1528, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6761:7:19", + "typeDescriptions": {} + } + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6761:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1532, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6773:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1527, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6752:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6752:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1534, + "nodeType": "ExpressionStatement", + "src": "6752:29:19" + }, + { + "expression": { + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1535, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6792:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6792:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1539, + "indexExpression": { + "id": 1537, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6808:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6792:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6792:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1542, + "nodeType": "ExpressionStatement", + "src": "6792:26:19" + }, + { + "expression": { + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1543, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6828:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6828:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1547, + "indexExpression": { + "id": 1545, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6844:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6828:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6851:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6828:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1550, + "nodeType": "ExpressionStatement", + "src": "6828:24:19" + }, + { + "expression": { + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1551, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6862:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6862:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1555, + "indexExpression": { + "id": 1553, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6876:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6862:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1556, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6887:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6862:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1558, + "nodeType": "ExpressionStatement", + "src": "6862:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1560, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6914:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1561, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6920:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1562, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6924:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1559, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6905:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6905:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1564, + "nodeType": "EmitStatement", + "src": "6900:32:19" + } + ] + }, + "id": 1566, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nameLocation": "6345:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1488, + "mutability": "mutable", + "name": "from", + "nameLocation": "6372:4:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6364:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6364:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1490, + "mutability": "mutable", + "name": "to", + "nameLocation": "6394:2:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6386:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6386:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1492, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6354:73:19" + }, + "returnParameters": { + "id": 1494, + "nodeType": "ParameterList", + "parameters": [], + "src": "6445:0:19" + }, + "scope": 1641, + "src": "6336:603:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1590, + "nodeType": "Block", + "src": "7009:121:19", + "statements": [ + { + "expression": { + "id": 1579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1573, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "7019:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7019:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1575, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "7019:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1577, + "indexExpression": { + "id": 1576, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7049:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7019:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1578, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7060:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7019:43:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1580, + "nodeType": "ExpressionStatement", + "src": "7019:43:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 1584, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7101:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1582, + "name": "ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1641, + "src": "7086:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721_$1641_$", + "typeString": "type(contract ERC721)" + } + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1022, + "src": "7086:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7086:23:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1586, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7111:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1587, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7115:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1581, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "7077:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7077:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "EmitStatement", + "src": "7072:51:19" + } + ] + }, + "id": 1591, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nameLocation": "6954:8:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1568, + "mutability": "mutable", + "name": "to", + "nameLocation": "6971:2:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6963:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6963:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1570, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6983:7:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6975:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6975:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6962:29:19" + }, + "returnParameters": { + "id": 1572, + "nodeType": "ParameterList", + "parameters": [], + "src": "7009:0:19" + }, + "scope": 1641, + "src": "6945:185:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1639, + "nodeType": "Block", + "src": "7291:355:19", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 1606, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7328:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1604, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "7305:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "7305:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7305:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1637, + "nodeType": "Block", + "src": "7604:36:19", + "statements": [ + { + "expression": { + "hexValue": "74727565", + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7625:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1603, + "id": 1636, + "nodeType": "Return", + "src": "7618:11:19" + } + ] + }, + "id": 1638, + "nodeType": "IfStatement", + "src": "7301:339:19", + "trueBody": { + "id": 1634, + "nodeType": "Block", + "src": "7333:265:19", + "statements": [ + { + "clauses": [ + { + "block": { + "id": 1627, + "nodeType": "Block", + "src": "7445:91:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1621, + "name": "retval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1619, + "src": "7470:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 1622, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7480:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7480:32:19", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function IERC721Receiver.onERC721Received(address,address,uint256,bytes memory) returns (bytes4)" + } + }, + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7480:41:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "7470:51:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1603, + "id": 1626, + "nodeType": "Return", + "src": "7463:58:19" + } + ] + }, + "errorName": "", + "id": 1628, + "nodeType": "TryCatchClause", + "parameters": { + "id": 1620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1619, + "mutability": "mutable", + "name": "retval", + "nameLocation": "7437:6:19", + "nodeType": "VariableDeclaration", + "scope": 1628, + "src": "7430:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1618, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "7430:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "7429:15:19" + }, + "src": "7421:115:19" + }, + { + "block": { + "id": 1631, + "nodeType": "Block", + "src": "7543:45:19", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7568:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1603, + "id": 1630, + "nodeType": "Return", + "src": "7561:12:19" + } + ] + }, + "errorName": "", + "id": 1632, + "nodeType": "TryCatchClause", + "src": "7537:51:19" + } + ], + "externalCall": { + "arguments": [ + { + "expression": { + "id": 1612, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7388:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7388:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1614, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "7400:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1615, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1597, + "src": "7406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1616, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1599, + "src": "7415:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 1609, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7367:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1608, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7351:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721Receiver_$196", + "typeString": "contract IERC721Receiver" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7351:36:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:69:19", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "id": 1633, + "nodeType": "TryStatement", + "src": "7347:241:19" + } + ] + } + } + ] + }, + "id": 1640, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOnERC721Received", + "nameLocation": "7145:22:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "from", + "nameLocation": "7185:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7177:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1592, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7177:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "to", + "nameLocation": "7207:2:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7199:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1594, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7199:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1597, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "7227:7:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7219:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7219:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1599, + "mutability": "mutable", + "name": "data", + "nameLocation": "7257:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7244:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1598, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7244:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7167:100:19" + }, + "returnParameters": { + "id": 1603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1602, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7285:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1601, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7285:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7284:6:19" + }, + "scope": 1641, + "src": "7136:510:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1642, + "src": "547:7101:19", + "usedErrors": [ + 5, + 10, + 861, + 865, + 869, + 873 + ] + } + ], + "src": "31:7618:19" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUUPSImplementation {\n function upgradeTo(address newImplementation) external;\n\n function simulateUpgradeTo(address newImplementation) external;\n\n function getImplementation() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "exportedSymbols": { + "IUUPSImplementation": [ + 238 + ] + }, + "id": 239, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 222, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:11" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUUPSImplementation", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 238, + "linearizedBaseContracts": [ + 238 + ], + "name": "IUUPSImplementation", + "nameLocation": "66:19:11", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "3659cfe6", + "id": 227, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeTo", + "nameLocation": "101:9:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 224, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "119:17:11", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "111:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 223, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "111:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "110:27:11" + }, + "returnParameters": { + "id": 226, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:11" + }, + "scope": 238, + "src": "92:55:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c7f62cda", + "id": 232, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "162:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "188:17:11", + "nodeType": "VariableDeclaration", + "scope": 232, + "src": "180:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "180:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "179:27:11" + }, + "returnParameters": { + "id": 231, + "nodeType": "ParameterList", + "parameters": [], + "src": "215:0:11" + }, + "scope": 238, + "src": "153:63:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "aaf10f42", + "id": 237, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "231:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 233, + "nodeType": "ParameterList", + "parameters": [], + "src": "248:2:11" + }, + "returnParameters": { + "id": 236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 235, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 237, + "src": "274:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "273:9:11" + }, + "scope": 238, + "src": "222:61:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 239, + "src": "56:229:11", + "usedErrors": [] + } + ], + "src": "31:255:11" + } + }, + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ChangeError {\n error NoChange();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "exportedSymbols": { + "ChangeError": [ + 25 + ] + }, + "id": 26, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:3" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ChangeError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 25, + "linearizedBaseContracts": [ + 25 + ], + "name": "ChangeError", + "nameLocation": "64:11:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 24, + "name": "NoChange", + "nameLocation": "88:8:3", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [], + "src": "96:2:3" + }, + "src": "82:17:3" + } + ], + "scope": 26, + "src": "56:45:3", + "usedErrors": [ + 24 + ] + } + ], + "src": "31:71:3" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableStorage.sol\";\nimport \"../errors/AccessError.sol\";\n\ncontract OwnableMixin is OwnableStorage {\n modifier onlyOwner() {\n _onlyOwner();\n\n _;\n }\n\n modifier onlyOwnerIfSet() {\n address owner = _getOwner();\n\n // if owner is set then check if msg.sender is the owner\n if (owner != address(0)) {\n _onlyOwner();\n }\n\n _;\n }\n\n function _onlyOwner() internal view {\n if (msg.sender != _getOwner()) {\n revert AccessError.Unauthorized(msg.sender);\n }\n }\n\n function _getOwner() internal view returns (address) {\n return _ownableStore().owner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 477, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 416, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:13" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "file": "./OwnableStorage.sol", + "id": 417, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 495, + "src": "56:30:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 418, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 7, + "src": "87:35:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 419, + "name": "OwnableStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 494, + "src": "149:14:13" + }, + "id": 420, + "nodeType": "InheritanceSpecifier", + "src": "149:14:13" + } + ], + "canonicalName": "OwnableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 476, + "linearizedBaseContracts": [ + 476, + 494 + ], + "name": "OwnableMixin", + "nameLocation": "133:12:13", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 426, + "nodeType": "Block", + "src": "191:41:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 422, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "201:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "201:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "201:12:13" + }, + { + "id": 425, + "nodeType": "PlaceholderStatement", + "src": "224:1:13" + } + ] + }, + "id": 427, + "name": "onlyOwner", + "nameLocation": "179:9:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:13" + }, + "src": "170:62:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 446, + "nodeType": "Block", + "src": "264:193:13", + "statements": [ + { + "assignments": [ + 430 + ], + "declarations": [ + { + "constant": false, + "id": 430, + "mutability": "mutable", + "name": "owner", + "nameLocation": "282:5:13", + "nodeType": "VariableDeclaration", + "scope": 446, + "src": "274:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 433, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 431, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "290:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "290:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "274:27:13" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 434, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "381:5:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "398:1:13", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "390:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "390:7:13", + "typeDescriptions": {} + } + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "390:10:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "381:19:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 444, + "nodeType": "IfStatement", + "src": "377:62:13", + "trueBody": { + "id": 443, + "nodeType": "Block", + "src": "402:37:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 440, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "416:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "416:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 442, + "nodeType": "ExpressionStatement", + "src": "416:12:13" + } + ] + } + }, + { + "id": 445, + "nodeType": "PlaceholderStatement", + "src": "449:1:13" + } + ] + }, + "id": 447, + "name": "onlyOwnerIfSet", + "nameLocation": "247:14:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 428, + "nodeType": "ParameterList", + "parameters": [], + "src": "261:2:13" + }, + "src": "238:219:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 464, + "nodeType": "Block", + "src": "499:115:13", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 450, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "513:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "513:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 452, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "527:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "527:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "513:25:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 463, + "nodeType": "IfStatement", + "src": "509:99:13", + "trueBody": { + "id": 462, + "nodeType": "Block", + "src": "540:68:13", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 458, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "586:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "586:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 455, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "561:11:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "561:24:13", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "561:36:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 461, + "nodeType": "RevertStatement", + "src": "554:43:13" + } + ] + } + } + ] + }, + "id": 465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyOwner", + "nameLocation": "472:10:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [], + "src": "482:2:13" + }, + "returnParameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [], + "src": "499:0:13" + }, + "scope": 476, + "src": "463:151:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 474, + "nodeType": "Block", + "src": "673:45:13", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 470, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "690:13:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "690:15:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "690:21:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 469, + "id": 473, + "nodeType": "Return", + "src": "683:28:13" + } + ] + }, + "id": 475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getOwner", + "nameLocation": "629:9:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 466, + "nodeType": "ParameterList", + "parameters": [], + "src": "638:2:13" + }, + "returnParameters": { + "id": 469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 475, + "src": "664:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 467, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "664:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "663:9:13" + }, + "scope": 476, + "src": "620:98:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 477, + "src": "124:596:13", + "usedErrors": [] + } + ], + "src": "31:690:13" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnable {\n function acceptOwnership() external;\n\n function nominateNewOwner(address newNominatedOwner) external;\n\n function renounceNomination() external;\n\n function owner() external view returns (address);\n\n function nominatedOwner() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "exportedSymbols": { + "IOwnable": [ + 220 + ] + }, + "id": 221, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:10" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnable", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 220, + "linearizedBaseContracts": [ + 220 + ], + "name": "IOwnable", + "nameLocation": "66:8:10", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "79ba5097", + "id": 201, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "90:15:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 199, + "nodeType": "ParameterList", + "parameters": [], + "src": "105:2:10" + }, + "returnParameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [], + "src": "116:0:10" + }, + "scope": 220, + "src": "81:36:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1627540c", + "id": 206, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominateNewOwner", + "nameLocation": "132:16:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "157:17:10", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "149:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 202, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "148:27:10" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [], + "src": "184:0:10" + }, + "scope": 220, + "src": "123:62:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "718fe928", + "id": 209, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "200:18:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 207, + "nodeType": "ParameterList", + "parameters": [], + "src": "218:2:10" + }, + "returnParameters": { + "id": 208, + "nodeType": "ParameterList", + "parameters": [], + "src": "229:0:10" + }, + "scope": 220, + "src": "191:39:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "8da5cb5b", + "id": 214, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "245:5:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 210, + "nodeType": "ParameterList", + "parameters": [], + "src": "250:2:10" + }, + "returnParameters": { + "id": 213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 212, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 214, + "src": "276:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "275:9:10" + }, + "scope": 220, + "src": "236:49:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "53a47bb7", + "id": 219, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "300:14:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:2:10" + }, + "returnParameters": { + "id": 218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 219, + "src": "340:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 216, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "340:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "339:9:10" + }, + "scope": 220, + "src": "291:58:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 221, + "src": "56:295:10", + "usedErrors": [] + } + ], + "src": "31:321:10" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract OwnableStorage {\n struct OwnableStore {\n bool initialized;\n address owner;\n address nominatedOwner;\n }\n\n function _ownableStore() internal pure returns (OwnableStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ownable\")) - 1)\n store.slot := 0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "exportedSymbols": { + "OwnableStorage": [ + 494 + ] + }, + "id": 495, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 478, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "OwnableStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 494, + "linearizedBaseContracts": [ + 494 + ], + "name": "OwnableStorage", + "nameLocation": "65:14:14", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "OwnableStorage.OwnableStore", + "id": 485, + "members": [ + { + "constant": false, + "id": 480, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "121:11:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "116:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 479, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "116:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 482, + "mutability": "mutable", + "name": "owner", + "nameLocation": "150:5:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "142:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "142:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "nominatedOwner", + "nameLocation": "173:14:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "165:22:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "165:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "OwnableStore", + "nameLocation": "93:12:14", + "nodeType": "StructDefinition", + "scope": 494, + "src": "86:108:14", + "visibility": "public" + }, + { + "body": { + "id": 492, + "nodeType": "Block", + "src": "276:197:14", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "295:172:14", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "377:80:14", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "391:66:14", + "type": "", + "value": "0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "377:10:14" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 489, + "isOffset": false, + "isSlot": true, + "src": "377:10:14", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 491, + "nodeType": "InlineAssembly", + "src": "286:181:14" + } + ] + }, + "id": 493, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ownableStore", + "nameLocation": "209:13:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "222:2:14" + }, + "returnParameters": { + "id": 490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 489, + "mutability": "mutable", + "name": "store", + "nameLocation": "269:5:14", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "248:26:14", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 488, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 487, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "248:12:14" + }, + "referencedDeclaration": 485, + "src": "248:12:14", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "src": "247:28:14" + }, + "scope": 494, + "src": "200:273:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 495, + "src": "56:419:14", + "usedErrors": [] + } + ], + "src": "31:445:14" + } + }, + "@synthetixio/core-contracts/contracts/errors/AccessError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AccessError {\n error Unauthorized(address addr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ] + }, + "id": 7, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 6, + "linearizedBaseContracts": [ + 6 + ], + "name": "AccessError", + "nameLocation": "64:11:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "Unauthorized", + "nameLocation": "88:12:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "addr", + "nameLocation": "109:4:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "101:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "101:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "100:14:0" + }, + "src": "82:33:0" + } + ], + "scope": 7, + "src": "56:61:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "31:87:0" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721 is IERC165 {\n function balanceOf(address owner) external view returns (uint256);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function approve(address approved, uint256 tokenId) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ] + }, + "id": 158, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 80, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:7" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 81, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 158, + "sourceUnit": 79, + "src": "56:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 82, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "102:7:7" + }, + "id": 83, + "nodeType": "InheritanceSpecifier", + "src": "102:7:7" + } + ], + "canonicalName": "IERC721", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 157, + "linearizedBaseContracts": [ + 157, + 78 + ], + "name": "IERC721", + "nameLocation": "91:7:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "70a08231", + "id": 90, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "125:9:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "owner", + "nameLocation": "143:5:7", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "135:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 84, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "135:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "134:15:7" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 88, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "173:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 87, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "173:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "172:9:7" + }, + "scope": 157, + "src": "116:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6352211e", + "id": 97, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "197:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 93, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 92, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "213:7:7", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "205:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "205:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "204:17:7" + }, + "returnParameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "245:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "245:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "244:9:7" + }, + "scope": 157, + "src": "188:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "b88d4fde", + "id": 108, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "269:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 99, + "mutability": "mutable", + "name": "from", + "nameLocation": "303:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "295:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 98, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "295:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 101, + "mutability": "mutable", + "name": "to", + "nameLocation": "325:2:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "317:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "317:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "345:7:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "337:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "337:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 105, + "mutability": "mutable", + "name": "data", + "nameLocation": "377:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "362:19:7", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 104, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "362:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "285:102:7" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "396:0:7" + }, + "scope": 157, + "src": "260:137:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "42842e0e", + "id": 117, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "412:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 110, + "mutability": "mutable", + "name": "from", + "nameLocation": "446:4:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "438:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 109, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "438:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "mutability": "mutable", + "name": "to", + "nameLocation": "468:2:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "460:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 111, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 114, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "488:7:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "480:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "428:73:7" + }, + "returnParameters": { + "id": 116, + "nodeType": "ParameterList", + "parameters": [], + "src": "510:0:7" + }, + "scope": 157, + "src": "403:108:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 126, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "526:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 124, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 119, + "mutability": "mutable", + "name": "from", + "nameLocation": "556:4:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "548:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "548:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 121, + "mutability": "mutable", + "name": "to", + "nameLocation": "578:2:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "570:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 120, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "570:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "598:7:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "590:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "590:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "538:73:7" + }, + "returnParameters": { + "id": 125, + "nodeType": "ParameterList", + "parameters": [], + "src": "620:0:7" + }, + "scope": 157, + "src": "517:104:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 133, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "636:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 128, + "mutability": "mutable", + "name": "approved", + "nameLocation": "652:8:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "644:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "644:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 130, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "670:7:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "662:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "662:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "643:35:7" + }, + "returnParameters": { + "id": 132, + "nodeType": "ParameterList", + "parameters": [], + "src": "687:0:7" + }, + "scope": 157, + "src": "627:61:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a22cb465", + "id": 140, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "703:17:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 135, + "mutability": "mutable", + "name": "operator", + "nameLocation": "729:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "721:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "721:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 137, + "mutability": "mutable", + "name": "approved", + "nameLocation": "744:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "739:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 136, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "739:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "720:33:7" + }, + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:7" + }, + "scope": 157, + "src": "694:69:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "081812fc", + "id": 147, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "778:11:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 142, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "798:7:7", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "790:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 141, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "789:17:7" + }, + "returnParameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 145, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "830:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "830:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "829:9:7" + }, + "scope": 157, + "src": "769:70:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e985e9c5", + "id": 156, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "854:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "owner", + "nameLocation": "879:5:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "871:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 148, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "871:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "operator", + "nameLocation": "894:8:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "886:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "886:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "870:33:7" + }, + "returnParameters": { + "id": 155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 154, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "927:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 153, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "926:6:7" + }, + "scope": 157, + "src": "845:88:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 158, + "src": "81:854:7", + "usedErrors": [] + } + ], + "src": "31:905:7" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721Metadata is IERC165 {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721Metadata": [ + 180 + ] + }, + "id": 181, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 159, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:8" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 181, + "sourceUnit": 79, + "src": "56:23:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 161, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "110:7:8" + }, + "id": 162, + "nodeType": "InheritanceSpecifier", + "src": "110:7:8" + } + ], + "canonicalName": "IERC721Metadata", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 180, + "linearizedBaseContracts": [ + 180, + 78 + ], + "name": "IERC721Metadata", + "nameLocation": "91:15:8", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "06fdde03", + "id": 167, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "133:4:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "137:2:8" + }, + "returnParameters": { + "id": 166, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 165, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "163:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 164, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "163:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "162:15:8" + }, + "scope": 180, + "src": "124:54:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "95d89b41", + "id": 172, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "193:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:8" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 172, + "src": "225:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 169, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "225:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "224:15:8" + }, + "scope": 180, + "src": "184:56:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c87b56dd", + "id": 179, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "255:8:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 174, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "272:7:8", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "264:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "263:17:8" + }, + "returnParameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "304:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "304:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "303:15:8" + }, + "scope": 180, + "src": "246:73:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 181, + "src": "81:240:8", + "usedErrors": [] + } + ], + "src": "31:291:8" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC721Receiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes memory data\n ) external returns (bytes4);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "exportedSymbols": { + "IERC721Receiver": [ + 196 + ] + }, + "id": 197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 182, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:9" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC721Receiver", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 196, + "linearizedBaseContracts": [ + 196 + ], + "name": "IERC721Receiver", + "nameLocation": "66:15:9", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "150b7a02", + "id": 195, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "onERC721Received", + "nameLocation": "97:16:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "operator", + "nameLocation": "131:8:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "123:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "123:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 186, + "mutability": "mutable", + "name": "from", + "nameLocation": "157:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "149:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 188, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "179:7:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "171:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "171:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "data", + "nameLocation": "209:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "196:17:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 189, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "196:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "113:106:9" + }, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "238:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 192, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "238:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "237:8:9" + }, + "scope": 196, + "src": "88:158:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 197, + "src": "56:192:9", + "usedErrors": [] + } + ], + "src": "31:218:9" + } + }, + "@synthetixio/core-contracts/contracts/errors/InitError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary InitError {\n error AlreadyInitialized();\n error NotInitialized();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "exportedSymbols": { + "InitError": [ + 32 + ] + }, + "id": 33, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 27, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "InitError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 32, + "linearizedBaseContracts": [ + 32 + ], + "name": "InitError", + "nameLocation": "64:9:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 29, + "name": "AlreadyInitialized", + "nameLocation": "86:18:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [], + "src": "104:2:4" + }, + "src": "80:27:4" + }, + { + "id": 31, + "name": "NotInitialized", + "nameLocation": "118:14:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:4" + }, + "src": "112:23:4" + } + ], + "scope": 33, + "src": "56:81:4", + "usedErrors": [ + 29, + 31 + ] + } + ], + "src": "31:107:4" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ERC721Storage {\n struct ERC721Store {\n string name;\n string symbol;\n string baseTokenURI;\n mapping(uint256 => address) ownerOf;\n mapping(address => uint256) balanceOf;\n mapping(uint256 => address) tokenApprovals;\n mapping(address => mapping(address => bool)) operatorApprovals;\n }\n\n function _erc721Store() internal pure returns (ERC721Store storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ERC721\")) - 1)\n store.slot := 0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "exportedSymbols": { + "ERC721Storage": [ + 1677 + ] + }, + "id": 1678, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1643, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:20" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ERC721Storage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1677, + "linearizedBaseContracts": [ + 1677 + ], + "name": "ERC721Storage", + "nameLocation": "65:13:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ERC721Storage.ERC721Store", + "id": 1668, + "members": [ + { + "constant": false, + "id": 1645, + "mutability": "mutable", + "name": "name", + "nameLocation": "121:4:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "114:11:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "114:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1647, + "mutability": "mutable", + "name": "symbol", + "nameLocation": "142:6:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "135:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1646, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "135:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1649, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "165:12:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "158:19:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1648, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "158:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1653, + "mutability": "mutable", + "name": "ownerOf", + "nameLocation": "215:7:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "187:35:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1652, + "keyType": { + "id": 1650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "195:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "187:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "206:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1657, + "mutability": "mutable", + "name": "balanceOf", + "nameLocation": "260:9:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "232:37:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1656, + "keyType": { + "id": 1654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "240:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "232:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "251:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1661, + "mutability": "mutable", + "name": "tokenApprovals", + "nameLocation": "307:14:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "279:42:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1660, + "keyType": { + "id": 1658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "279:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "298:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1667, + "mutability": "mutable", + "name": "operatorApprovals", + "nameLocation": "376:17:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "331:62:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "typeName": { + "id": 1666, + "keyType": { + "id": 1662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "339:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "331:44:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "valueType": { + "id": 1665, + "keyType": { + "id": 1663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "350:24:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 1664, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "369:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "internal" + } + ], + "name": "ERC721Store", + "nameLocation": "92:11:20", + "nodeType": "StructDefinition", + "scope": 1677, + "src": "85:315:20", + "visibility": "public" + }, + { + "body": { + "id": 1675, + "nodeType": "Block", + "src": "480:196:20", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "499:171:20", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "580:80:20", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "594:66:20", + "type": "", + "value": "0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "580:10:20" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1672, + "isOffset": false, + "isSlot": true, + "src": "580:10:20", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 1674, + "nodeType": "InlineAssembly", + "src": "490:180:20" + } + ] + }, + "id": 1676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_erc721Store", + "nameLocation": "415:12:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1669, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:20" + }, + "returnParameters": { + "id": 1673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1672, + "mutability": "mutable", + "name": "store", + "nameLocation": "473:5:20", + "nodeType": "VariableDeclaration", + "scope": 1676, + "src": "453:25:20", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1671, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1670, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "453:11:20" + }, + "referencedDeclaration": 1668, + "src": "453:11:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "src": "452:27:20" + }, + "scope": 1677, + "src": "406:270:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1678, + "src": "56:622:20", + "usedErrors": [] + } + ], + "src": "31:648:20" + } + }, + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol\n*/\n\nlibrary StringUtil {\n function uintToString(uint value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n\n return string(buffer);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "exportedSymbols": { + "StringUtil": [ + 2369 + ] + }, + "id": 2370, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2290, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:25" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "StringUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2369, + "linearizedBaseContracts": [ + 2369 + ], + "name": "StringUtil", + "nameLocation": "218:10:25", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2367, + "nodeType": "Block", + "src": "307:447:25", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2297, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "321:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "321:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2303, + "nodeType": "IfStatement", + "src": "317:51:25", + "trueBody": { + "id": 2302, + "nodeType": "Block", + "src": "333:35:25", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:3:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "functionReturnParameters": 2296, + "id": 2301, + "nodeType": "Return", + "src": "347:10:25" + } + ] + } + }, + { + "assignments": [ + 2305 + ], + "declarations": [ + { + "constant": false, + "id": 2305, + "mutability": "mutable", + "name": "temp", + "nameLocation": "386:4:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "378:12:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "378:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2307, + "initialValue": { + "id": 2306, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "393:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "378:20:25" + }, + { + "assignments": [ + 2309 + ], + "declarations": [ + { + "constant": false, + "id": 2309, + "mutability": "mutable", + "name": "digits", + "nameLocation": "416:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "408:14:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "408:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2310, + "nodeType": "VariableDeclarationStatement", + "src": "408:14:25" + }, + { + "body": { + "id": 2321, + "nodeType": "Block", + "src": "450:57:25", + "statements": [ + { + "expression": { + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "464:8:25", + "subExpression": { + "id": 2314, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "464:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2316, + "nodeType": "ExpressionStatement", + "src": "464:8:25" + }, + { + "expression": { + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2317, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "486:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "494:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "486:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2320, + "nodeType": "ExpressionStatement", + "src": "486:10:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2311, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "439:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "447:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "439:9:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2322, + "nodeType": "WhileStatement", + "src": "432:75:25" + }, + { + "assignments": [ + 2324 + ], + "declarations": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "530:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "517:19:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2323, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "517:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2329, + "initialValue": { + "arguments": [ + { + "id": 2327, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "549:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "539:9:25", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "543:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "539:17:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "517:39:25" + }, + { + "body": { + "id": 2360, + "nodeType": "Block", + "src": "585:131:25", + "statements": [ + { + "expression": { + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2333, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "599:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 2334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "609:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "599:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2336, + "nodeType": "ExpressionStatement", + "src": "599:11:25" + }, + { + "expression": { + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2337, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "624:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2339, + "indexExpression": { + "id": 2338, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "631:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "624:14:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3438", + "id": 2344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "654:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2347, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "667:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "3130", + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "675:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "667:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:25", + "typeDescriptions": {} + } + }, + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:19:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "654:24:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "648:5:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2342, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "648:5:25", + "typeDescriptions": {} + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:31:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "641:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2340, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "641:6:25", + "typeDescriptions": {} + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "641:39:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "624:56:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2355, + "nodeType": "ExpressionStatement", + "src": "624:56:25" + }, + { + "expression": { + "id": 2358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2356, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "694:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "703:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "694:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2359, + "nodeType": "ExpressionStatement", + "src": "694:11:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2330, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "573:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "582:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "573:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2361, + "nodeType": "WhileStatement", + "src": "566:150:25" + }, + { + "expression": { + "arguments": [ + { + "id": 2364, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "740:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "733:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2362, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "733:6:25", + "typeDescriptions": {} + } + }, + "id": 2365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "733:14:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2296, + "id": 2366, + "nodeType": "Return", + "src": "726:21:25" + } + ] + }, + "id": 2368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uintToString", + "nameLocation": "244:12:25", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2292, + "mutability": "mutable", + "name": "value", + "nameLocation": "262:5:25", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "257:10:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2291, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "257:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "256:12:25" + }, + "returnParameters": { + "id": 2296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2295, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "292:13:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2294, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "292:6:25", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "291:15:25" + }, + "scope": 2369, + "src": "235:519:25", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2370, + "src": "210:546:25", + "usedErrors": [] + } + ], + "src": "31:726:25" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC165 {\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ] + }, + "id": 79, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 70, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:6" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC165", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 78, + "linearizedBaseContracts": [ + 78 + ], + "name": "IERC165", + "nameLocation": "66:7:6", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "01ffc9a7", + "id": 77, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "89:17:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 72, + "mutability": "mutable", + "name": "interfaceID", + "nameLocation": "114:11:6", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "107:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 71, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "107:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "106:20:6" + }, + "returnParameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "150:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 74, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "150:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "149:6:6" + }, + "scope": 78, + "src": "80:76:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 79, + "src": "56:102:6", + "usedErrors": [] + } + ], + "src": "31:128:6" + } + }, + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\n\ncontract ElectionStorage {\n struct ElectionStore {\n // True if initializeElectionModule was called\n bool initialized;\n // The address of the council NFT\n address councilToken;\n // Council member addresses\n SetUtil.AddressSet councilMembers;\n // Council token id's by council member address\n mapping(address => uint) councilTokenIds;\n // Array of EpochData's for each epoch\n EpochData[] epochs;\n // Array of ElectionData's for each election\n ElectionData[] elections;\n // Pointer to ElectionSettings\n // To be always used via store.settings[0] to avoid storage collisions\n mapping(uint => ElectionSettings) settings;\n }\n\n struct ElectionSettings {\n // Number of council members in the next epoch\n uint8 nextEpochSeatCount;\n // Minimum active council members. If too many are dismissed an emergency election is triggered\n uint8 minimumActiveMembers;\n // Minimum epoch duration when adjusting schedules\n uint64 minEpochDuration;\n // Minimum nomination period duration when adjusting schedules\n uint64 minNominationPeriodDuration;\n // Minimum voting period duration when adjusting schedules\n uint64 minVotingPeriodDuration;\n // Maximum size for tweaking epoch schedules (see tweakEpochSchedule)\n uint64 maxDateAdjustmentTolerance;\n // Default batch size when calling evaluate() with numBallots = 0\n uint defaultBallotEvaluationBatchSize;\n }\n\n struct EpochData {\n // Date at which the epoch started\n uint64 startDate;\n // Date at which the epoch's voting period will end\n uint64 endDate;\n // Date at which the epoch's nomination period will start\n uint64 nominationPeriodStartDate;\n // Date at which the epoch's voting period will start\n uint64 votingPeriodStartDate;\n }\n\n struct ElectionData {\n // True if ballots have been counted in this election\n bool evaluated;\n // True if NFTs have been re-shuffled in this election\n bool resolved;\n // Number of counted ballots in this election\n uint numEvaluatedBallots;\n // List of nominated candidates in this election\n SetUtil.AddressSet nominees;\n // List of winners of this election (requires evaluation)\n SetUtil.AddressSet winners;\n // List of all ballot ids in this election\n bytes32[] ballotIds;\n // BallotData by ballot id\n mapping(bytes32 => BallotData) ballotsById;\n // Ballot id that each user voted on\n mapping(address => bytes32) ballotIdsByAddress;\n // Number of votes for each candidate\n mapping(address => uint) candidateVotes;\n }\n\n struct BallotData {\n // Total accumulated votes in this ballot (needs evaluation)\n uint votes;\n // List of candidates in this ballot\n address[] candidates;\n // Vote power added per voter\n mapping(address => uint) votesByUser;\n }\n\n function _electionSettings() internal view returns (ElectionSettings storage) {\n return _electionStore().settings[0];\n }\n\n function _electionStore() internal pure returns (ElectionStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.election\")) - 1)\n store.slot := 0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "exportedSymbols": { + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4332, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4220, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:33" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 4221, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4332, + "sourceUnit": 2289, + "src": "56:65:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ElectionStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4331, + "linearizedBaseContracts": [ + 4331 + ], + "name": "ElectionStorage", + "nameLocation": "132:15:33", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionStorage.ElectionStore", + "id": 4246, + "members": [ + { + "constant": false, + "id": 4223, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "245:11:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "240:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4222, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "240:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4225, + "mutability": "mutable", + "name": "councilToken", + "nameLocation": "316:12:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "308:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4228, + "mutability": "mutable", + "name": "councilMembers", + "nameLocation": "393:14:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "374:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4227, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4226, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "374:18:33" + }, + "referencedDeclaration": 1788, + "src": "374:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4232, + "mutability": "mutable", + "name": "councilTokenIds", + "nameLocation": "498:15:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "473:40:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4231, + "keyType": { + "id": 4229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "473:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4230, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "492:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4236, + "mutability": "mutable", + "name": "epochs", + "nameLocation": "582:6:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "570:18:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + }, + "typeName": { + "baseType": { + "id": 4234, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4233, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "570:9:33" + }, + "referencedDeclaration": 4270, + "src": "570:9:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "id": 4235, + "nodeType": "ArrayTypeName", + "src": "570:11:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4240, + "mutability": "mutable", + "name": "elections", + "nameLocation": "666:9:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "651:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + }, + "typeName": { + "baseType": { + "id": 4238, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4237, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "651:12:33" + }, + "referencedDeclaration": 4299, + "src": "651:12:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "id": 4239, + "nodeType": "ArrayTypeName", + "src": "651:14:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4245, + "mutability": "mutable", + "name": "settings", + "nameLocation": "837:8:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "803:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "typeName": { + "id": 4244, + "keyType": { + "id": 4241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "811:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "803:33:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "valueType": { + "id": 4243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4242, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "819:16:33" + }, + "referencedDeclaration": 4261, + "src": "819:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionStore", + "nameLocation": "161:13:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "154:698:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionSettings", + "id": 4261, + "members": [ + { + "constant": false, + "id": 4248, + "mutability": "mutable", + "name": "nextEpochSeatCount", + "nameLocation": "953:18:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "947:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4247, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "947:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4250, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1091:20:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1085:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4249, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1085:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4252, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "1187:16:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1180:23:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4251, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1180:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4254, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "1291:27:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1284:34:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4253, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1284:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4256, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "1402:23:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1395:30:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4255, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1395:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4258, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "1520:26:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1513:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4257, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1513:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4260, + "mutability": "mutable", + "name": "defaultBallotEvaluationBatchSize", + "nameLocation": "1635:32:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1630:37:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4259, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1630:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "ElectionSettings", + "nameLocation": "865:16:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "858:816:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.EpochData", + "id": 4270, + "members": [ + { + "constant": false, + "id": 4263, + "mutability": "mutable", + "name": "startDate", + "nameLocation": "1757:9:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1750:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1750:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4265, + "mutability": "mutable", + "name": "endDate", + "nameLocation": "1843:7:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1836:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4264, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1836:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4267, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1933:25:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1926:32:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4266, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1926:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4269, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2037:21:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "2030:28:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4268, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2030:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "name": "EpochData", + "nameLocation": "1687:9:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "1680:385:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionData", + "id": 4299, + "members": [ + { + "constant": false, + "id": 4272, + "mutability": "mutable", + "name": "evaluated", + "nameLocation": "2168:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2163:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4271, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2163:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4274, + "mutability": "mutable", + "name": "resolved", + "nameLocation": "2255:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2250:13:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4273, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2250:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4276, + "mutability": "mutable", + "name": "numEvaluatedBallots", + "nameLocation": "2332:19:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2327:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4275, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2327:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4279, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "2437:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2418:27:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4277, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2418:18:33" + }, + "referencedDeclaration": 1788, + "src": "2418:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4282, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2540:7:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2521:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4281, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4280, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2521:18:33" + }, + "referencedDeclaration": 1788, + "src": "2521:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4285, + "mutability": "mutable", + "name": "ballotIds", + "nameLocation": "2618:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2608:19:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 4283, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2608:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4284, + "nodeType": "ArrayTypeName", + "src": "2608:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4290, + "mutability": "mutable", + "name": "ballotsById", + "nameLocation": "2703:11:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2672:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "typeName": { + "id": 4289, + "keyType": { + "id": 4286, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2680:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2672:30:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "valueType": { + "id": 4288, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4287, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2691:10:33" + }, + "referencedDeclaration": 4309, + "src": "2691:10:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4294, + "mutability": "mutable", + "name": "ballotIdsByAddress", + "nameLocation": "2797:18:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2769:46:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "typeName": { + "id": 4293, + "keyType": { + "id": 4291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2777:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2769:27:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "valueType": { + "id": 4292, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2788:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4298, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2896:14:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2871:39:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4297, + "keyType": { + "id": 4295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2879:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2871:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4296, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2890:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionData", + "nameLocation": "2078:12:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2071:846:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.BallotData", + "id": 4309, + "members": [ + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "votes", + "nameLocation": "3025:5:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3020:10:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4300, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3020:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4304, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3095:10:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3085:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3085:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4303, + "nodeType": "ArrayTypeName", + "src": "3085:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4308, + "mutability": "mutable", + "name": "votesByUser", + "nameLocation": "3178:11:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3153:36:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4307, + "keyType": { + "id": 4305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3161:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "3153:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4306, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3172:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "BallotData", + "nameLocation": "2930:10:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2923:273:33", + "visibility": "public" + }, + { + "body": { + "id": 4321, + "nodeType": "Block", + "src": "3280:52:33", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4315, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3297:14:33", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3297:16:33", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "settings", + "nodeType": "MemberAccess", + "referencedDeclaration": 4245, + "src": "3297:25:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings storage ref)" + } + }, + "id": 4319, + "indexExpression": { + "hexValue": "30", + "id": 4318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3323:1:33", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3297:28:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage", + "typeString": "struct ElectionStorage.ElectionSettings storage ref" + } + }, + "functionReturnParameters": 4314, + "id": 4320, + "nodeType": "Return", + "src": "3290:35:33" + } + ] + }, + "id": 4322, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionSettings", + "nameLocation": "3211:17:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4310, + "nodeType": "ParameterList", + "parameters": [], + "src": "3228:2:33" + }, + "returnParameters": { + "id": 4314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4313, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4322, + "src": "3254:24:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 4312, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4311, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3254:16:33" + }, + "referencedDeclaration": 4261, + "src": "3254:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "src": "3253:26:33" + }, + "scope": 4331, + "src": "3202:130:33", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4329, + "nodeType": "Block", + "src": "3416:198:33", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "3435:173:33", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3518:80:33", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3532:66:33", + "type": "", + "value": "0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "3518:10:33" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 4326, + "isOffset": false, + "isSlot": true, + "src": "3518:10:33", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 4328, + "nodeType": "InlineAssembly", + "src": "3426:182:33" + } + ] + }, + "id": 4330, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionStore", + "nameLocation": "3347:14:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4323, + "nodeType": "ParameterList", + "parameters": [], + "src": "3361:2:33" + }, + "returnParameters": { + "id": 4327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4326, + "mutability": "mutable", + "name": "store", + "nameLocation": "3409:5:33", + "nodeType": "VariableDeclaration", + "scope": 4330, + "src": "3387:27:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4325, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4324, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3387:13:33" + }, + "referencedDeclaration": 4246, + "src": "3387:13:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "src": "3386:29:33" + }, + "scope": 4331, + "src": "3338:276:33", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4332, + "src": "123:3493:33", + "usedErrors": [] + } + ], + "src": "31:3586:33" + } + }, + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary SetUtil {\n // ----------------------------------------\n // Address support\n // ----------------------------------------\n\n struct AddressSet {\n Bytes32Set raw;\n }\n\n function add(AddressSet storage set, address value) internal {\n add(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function remove(AddressSet storage set, address value) internal {\n remove(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function replace(\n AddressSet storage set,\n address value,\n address newValue\n ) internal {\n replace(set.raw, bytes32(uint256(uint160(value))), bytes32(uint256(uint160(newValue))));\n }\n\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return contains(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function length(AddressSet storage set) internal view returns (uint) {\n return length(set.raw);\n }\n\n function valueAt(AddressSet storage set, uint position) internal view returns (address) {\n return address(uint160(uint256(valueAt(set.raw, position))));\n }\n\n function positionOf(AddressSet storage set, address value) internal view returns (uint) {\n return positionOf(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = values(set.raw);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // ----------------------------------------\n // Core bytes32 support\n // ----------------------------------------\n\n error PositionOutOfBounds();\n error ValueNotInSet();\n error ValueAlreadyInSet();\n\n struct Bytes32Set {\n /* solhint-disable private-vars-leading-underscore */\n bytes32[] _values;\n mapping(bytes32 => uint) _positions; // Position zero is never used.\n /* solhint-enable private-vars-leading-underscore */\n }\n\n function add(Bytes32Set storage set, bytes32 value) internal {\n if (contains(set, value)) {\n revert ValueAlreadyInSet();\n }\n\n set._values.push(value);\n set._positions[value] = set._values.length;\n }\n\n function remove(Bytes32Set storage set, bytes32 value) internal {\n uint position = set._positions[value];\n if (position == 0) {\n revert ValueNotInSet();\n }\n\n uint index = position - 1;\n uint lastIndex = set._values.length - 1;\n\n // If the element being deleted is not the last in the values,\n // move the last element to its position.\n if (index != lastIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n set._values[index] = lastValue;\n set._positions[lastValue] = position;\n }\n\n // Remove the last element in the values.\n set._values.pop();\n delete set._positions[value];\n }\n\n function replace(\n Bytes32Set storage set,\n bytes32 value,\n bytes32 newValue\n ) internal {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n if (contains(set, newValue)) {\n revert ValueAlreadyInSet();\n }\n\n uint position = set._positions[value];\n uint index = position - 1;\n\n set._values[index] = newValue;\n set._positions[newValue] = position;\n }\n\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return set._positions[value] != 0;\n }\n\n function length(Bytes32Set storage set) internal view returns (uint) {\n return set._values.length;\n }\n\n function valueAt(Bytes32Set storage set, uint position) internal view returns (bytes32) {\n if (position == 0 || position > set._values.length) {\n revert PositionOutOfBounds();\n }\n\n uint index = position - 1;\n\n return set._values[index];\n }\n\n function positionOf(Bytes32Set storage set, bytes32 value) internal view returns (uint) {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n return set._positions[value];\n }\n\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return set._values;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "exportedSymbols": { + "SetUtil": [ + 2288 + ] + }, + "id": 2289, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1784, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:24" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SetUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2288, + "linearizedBaseContracts": [ + 2288 + ], + "name": "SetUtil", + "nameLocation": "64:7:24", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "SetUtil.AddressSet", + "id": 1788, + "members": [ + { + "constant": false, + "id": 1787, + "mutability": "mutable", + "name": "raw", + "nameLocation": "237:3:24", + "nodeType": "VariableDeclaration", + "scope": 1788, + "src": "226:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 1786, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1785, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "226:10:24" + }, + "referencedDeclaration": 2007, + "src": "226:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "name": "AddressSet", + "nameLocation": "205:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "198:49:24", + "visibility": "public" + }, + { + "body": { + "id": 1811, + "nodeType": "Block", + "src": "314:63:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1797, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "328:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "328:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1805, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1793, + "src": "361:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "353:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1803, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "353:7:24", + "typeDescriptions": {} + } + }, + "id": 1806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "345:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "345:7:24", + "typeDescriptions": {} + } + }, + "id": 1807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "345:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "337:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1799, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "337:7:24", + "typeDescriptions": {} + } + }, + "id": 1808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "337:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1796, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1812, + 2043 + ], + "referencedDeclaration": 2043, + "src": "324:3:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1810, + "nodeType": "ExpressionStatement", + "src": "324:46:24" + } + ] + }, + "id": 1812, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "262:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1791, + "mutability": "mutable", + "name": "set", + "nameLocation": "285:3:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "266:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1790, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1789, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "266:10:24" + }, + "referencedDeclaration": 1788, + "src": "266:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1793, + "mutability": "mutable", + "name": "value", + "nameLocation": "298:5:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "290:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1792, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "290:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:39:24" + }, + "returnParameters": { + "id": 1795, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:0:24" + }, + "scope": 2288, + "src": "253:124:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1835, + "nodeType": "Block", + "src": "447:66:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1821, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1815, + "src": "464:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1822, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "464:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1829, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1817, + "src": "497:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "489:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1827, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "489:7:24", + "typeDescriptions": {} + } + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "489:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "481:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:24", + "typeDescriptions": {} + } + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "481:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "473:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1823, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "473:7:24", + "typeDescriptions": {} + } + }, + "id": 1832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1820, + "name": "remove", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1836, + 2122 + ], + "referencedDeclaration": 2122, + "src": "457:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "457:49:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1834, + "nodeType": "ExpressionStatement", + "src": "457:49:24" + } + ] + }, + "id": 1836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "392:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "set", + "nameLocation": "418:3:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "399:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1814, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1813, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "399:10:24" + }, + "referencedDeclaration": 1788, + "src": "399:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "value", + "nameLocation": "431:5:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "423:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1816, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "423:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "398:39:24" + }, + "returnParameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [], + "src": "447:0:24" + }, + "scope": 2288, + "src": "383:130:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1871, + "nodeType": "Block", + "src": "632:104:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1847, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "650:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "650:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "683:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "675:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1853, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "675:7:24", + "typeDescriptions": {} + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "675:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1852, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "667:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1851, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "667:7:24", + "typeDescriptions": {} + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "667:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1849, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "659:7:24", + "typeDescriptions": {} + } + }, + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1865, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "717:8:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "709:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1863, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "709:7:24", + "typeDescriptions": {} + } + }, + "id": 1866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "709:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "701:7:24", + "typeDescriptions": {} + } + }, + "id": 1867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "693:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1859, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "693:7:24", + "typeDescriptions": {} + } + }, + "id": 1868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "693:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1846, + "name": "replace", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1872, + 2181 + ], + "referencedDeclaration": 2181, + "src": "642:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32,bytes32)" + } + }, + "id": 1869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:87:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1870, + "nodeType": "ExpressionStatement", + "src": "642:87:24" + } + ] + }, + "id": 1872, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "528:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "set", + "nameLocation": "564:3:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "545:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1838, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1837, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "545:10:24" + }, + "referencedDeclaration": 1788, + "src": "545:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "value", + "nameLocation": "585:5:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "577:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1840, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "577:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "608:8:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "600:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "600:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "535:87:24" + }, + "returnParameters": { + "id": 1845, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:24" + }, + "scope": 2288, + "src": "519:217:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1897, + "nodeType": "Block", + "src": "828:75:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1883, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1875, + "src": "854:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "854:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1891, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1877, + "src": "887:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "879:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1889, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "879:7:24", + "typeDescriptions": {} + } + }, + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "879:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "871:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "871:7:24", + "typeDescriptions": {} + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "871:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "863:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1885, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "863:7:24", + "typeDescriptions": {} + } + }, + "id": 1894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "863:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1882, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "845:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "845:51:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1881, + "id": 1896, + "nodeType": "Return", + "src": "838:58:24" + } + ] + }, + "id": 1898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "751:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "set", + "nameLocation": "779:3:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "760:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1874, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1873, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "760:10:24" + }, + "referencedDeclaration": 1788, + "src": "760:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1877, + "mutability": "mutable", + "name": "value", + "nameLocation": "792:5:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "784:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "784:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "759:39:24" + }, + "returnParameters": { + "id": 1881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1880, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "822:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1879, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "822:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "821:6:24" + }, + "scope": 2288, + "src": "742:161:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1911, + "nodeType": "Block", + "src": "978:39:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1907, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1901, + "src": "1002:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1002:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1906, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1912, + 2212 + ], + "referencedDeclaration": 2212, + "src": "995:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (uint256)" + } + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1905, + "id": 1910, + "nodeType": "Return", + "src": "988:22:24" + } + ] + }, + "id": 1912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "918:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "set", + "nameLocation": "944:3:24", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "925:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "925:10:24" + }, + "referencedDeclaration": 1788, + "src": "925:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "924:24:24" + }, + "returnParameters": { + "id": 1905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1904, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "972:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "972:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "971:6:24" + }, + "scope": 2288, + "src": "909:108:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1937, + "nodeType": "Block", + "src": "1111:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 1929, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1915, + "src": "1160:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1160:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "id": 1931, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "1169:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1928, + "name": "valueAt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1938, + 2248 + ], + "referencedDeclaration": 2248, + "src": "1152:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,uint256) view returns (bytes32)" + } + }, + "id": 1932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1152:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1144:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1926, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1144:7:24", + "typeDescriptions": {} + } + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1144:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1924, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1136:7:24", + "typeDescriptions": {} + } + }, + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1136:44:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1128:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1922, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1128:7:24", + "typeDescriptions": {} + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1128:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1921, + "id": 1936, + "nodeType": "Return", + "src": "1121:60:24" + } + ] + }, + "id": 1938, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "1032:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1915, + "mutability": "mutable", + "name": "set", + "nameLocation": "1059:3:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1040:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1914, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1913, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1040:10:24" + }, + "referencedDeclaration": 1788, + "src": "1040:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "position", + "nameLocation": "1069:8:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1064:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1064:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1039:39:24" + }, + "returnParameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1920, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1102:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1102:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1101:9:24" + }, + "scope": 2288, + "src": "1023:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1963, + "nodeType": "Block", + "src": "1282:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1949, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1941, + "src": "1310:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1310:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1957, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1943, + "src": "1343:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1335:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1955, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1335:7:24", + "typeDescriptions": {} + } + }, + "id": 1958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1335:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1327:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:24", + "typeDescriptions": {} + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1327:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1319:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1951, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1319:7:24", + "typeDescriptions": {} + } + }, + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1319:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1948, + "name": "positionOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1964, + 2274 + ], + "referencedDeclaration": 2274, + "src": "1299:10:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (uint256)" + } + }, + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1947, + "id": 1962, + "nodeType": "Return", + "src": "1292:60:24" + } + ] + }, + "id": 1964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "1203:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1941, + "mutability": "mutable", + "name": "set", + "nameLocation": "1233:3:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1214:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1940, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1939, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1214:10:24" + }, + "referencedDeclaration": 1788, + "src": "1214:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "value", + "nameLocation": "1246:5:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1238:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1942, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1238:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1213:39:24" + }, + "returnParameters": { + "id": 1947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1276:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1945, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1276:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1275:6:24" + }, + "scope": 2288, + "src": "1194:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1992, + "nodeType": "Block", + "src": "1446:172:24", + "statements": [ + { + "assignments": [ + 1977 + ], + "declarations": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "store", + "nameLocation": "1473:5:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1456:22:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1975, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1456:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1976, + "nodeType": "ArrayTypeName", + "src": "1456:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "id": 1982, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 1979, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1967, + "src": "1488:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1488:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1978, + "name": "values", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1993, + 2287 + ], + "referencedDeclaration": 2287, + "src": "1481:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (bytes32[] memory)" + } + }, + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1481:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1456:40:24" + }, + { + "assignments": [ + 1987 + ], + "declarations": [ + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "result", + "nameLocation": "1523:6:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1506:23:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1506:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1986, + "nodeType": "ArrayTypeName", + "src": "1506:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 1988, + "nodeType": "VariableDeclarationStatement", + "src": "1506:23:24" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1549:39:24", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1563:15:24", + "value": { + "name": "store", + "nodeType": "YulIdentifier", + "src": "1573:5:24" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1563:6:24" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1987, + "isOffset": false, + "isSlot": false, + "src": "1563:6:24", + "valueSize": 1 + }, + { + "declaration": 1977, + "isOffset": false, + "isSlot": false, + "src": "1573:5:24", + "valueSize": 1 + } + ], + "id": 1989, + "nodeType": "InlineAssembly", + "src": "1540:48:24" + }, + { + "expression": { + "id": 1990, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1987, + "src": "1605:6:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1972, + "id": 1991, + "nodeType": "Return", + "src": "1598:13:24" + } + ] + }, + "id": 1993, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "1374:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1967, + "mutability": "mutable", + "name": "set", + "nameLocation": "1400:3:24", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1381:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1966, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1965, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1381:10:24" + }, + "referencedDeclaration": 1788, + "src": "1381:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "1380:24:24" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1428:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1970, + "nodeType": "ArrayTypeName", + "src": "1428:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1427:18:24" + }, + "scope": 2288, + "src": "1365:253:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 1995, + "name": "PositionOutOfBounds", + "nameLocation": "1755:19:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1994, + "nodeType": "ParameterList", + "parameters": [], + "src": "1774:2:24" + }, + "src": "1749:28:24" + }, + { + "id": 1997, + "name": "ValueNotInSet", + "nameLocation": "1788:13:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1996, + "nodeType": "ParameterList", + "parameters": [], + "src": "1801:2:24" + }, + "src": "1782:22:24" + }, + { + "id": 1999, + "name": "ValueAlreadyInSet", + "nameLocation": "1815:17:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [], + "src": "1832:2:24" + }, + "src": "1809:26:24" + }, + { + "canonicalName": "SetUtil.Bytes32Set", + "id": 2007, + "members": [ + { + "constant": false, + "id": 2002, + "mutability": "mutable", + "name": "_values", + "nameLocation": "1941:7:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1931:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2000, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1931:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2001, + "nodeType": "ArrayTypeName", + "src": "1931:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2006, + "mutability": "mutable", + "name": "_positions", + "nameLocation": "1983:10:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1958:35:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 2005, + "keyType": { + "id": 2003, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1966:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1958:24:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 2004, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1977:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "Bytes32Set", + "nameLocation": "1848:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "1841:252:24", + "visibility": "public" + }, + { + "body": { + "id": 2042, + "nodeType": "Block", + "src": "2160:179:24", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 2016, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2183:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2017, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2188:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2015, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "2174:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2174:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2023, + "nodeType": "IfStatement", + "src": "2170:77:24", + "trueBody": { + "id": 2022, + "nodeType": "Block", + "src": "2196:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2019, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "2217:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2217:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2021, + "nodeType": "RevertStatement", + "src": "2210:26:24" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2029, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2274:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 2024, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2257:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2257:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "2257:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2257:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2031, + "nodeType": "ExpressionStatement", + "src": "2257:23:24" + }, + { + "expression": { + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2032, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2290:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2290:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2036, + "indexExpression": { + "id": 2034, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2305:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2290:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "id": 2037, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2314:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2314:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2314:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2290:42:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2041, + "nodeType": "ExpressionStatement", + "src": "2290:42:24" + } + ] + }, + "id": 2043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "2108:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2013, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2010, + "mutability": "mutable", + "name": "set", + "nameLocation": "2131:3:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2112:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2009, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2008, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2112:10:24" + }, + "referencedDeclaration": 2007, + "src": "2112:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2012, + "mutability": "mutable", + "name": "value", + "nameLocation": "2144:5:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2136:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2011, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2111:39:24" + }, + "returnParameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [], + "src": "2160:0:24" + }, + "scope": 2288, + "src": "2099:240:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2121, + "nodeType": "Block", + "src": "2409:647:24", + "statements": [ + { + "assignments": [ + 2052 + ], + "declarations": [ + { + "constant": false, + "id": 2052, + "mutability": "mutable", + "name": "position", + "nameLocation": "2424:8:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2419:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2419:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2057, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2053, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2435:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2435:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2056, + "indexExpression": { + "id": 2055, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "2450:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2435:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2419:37:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2058, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2470:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2482:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2470:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2065, + "nodeType": "IfStatement", + "src": "2466:66:24", + "trueBody": { + "id": 2064, + "nodeType": "Block", + "src": "2485:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2061, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "2506:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2063, + "nodeType": "RevertStatement", + "src": "2499:22:24" + } + ] + } + }, + { + "assignments": [ + 2067 + ], + "declarations": [ + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "index", + "nameLocation": "2547:5:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2542:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2066, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2542:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2071, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2068, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2555:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2566:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2555:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2542:25:24" + }, + { + "assignments": [ + 2073 + ], + "declarations": [ + { + "constant": false, + "id": 2073, + "mutability": "mutable", + "name": "lastIndex", + "nameLocation": "2582:9:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2577:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2072, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2577:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2079, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 2074, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2594:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2075, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2594:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2594:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2594:22:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2577:39:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2080, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2752:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2081, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2761:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2752:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2107, + "nodeType": "IfStatement", + "src": "2748:186:24", + "trueBody": { + "id": 2106, + "nodeType": "Block", + "src": "2772:162:24", + "statements": [ + { + "assignments": [ + 2084 + ], + "declarations": [ + { + "constant": false, + "id": 2084, + "mutability": "mutable", + "name": "lastValue", + "nameLocation": "2794:9:24", + "nodeType": "VariableDeclaration", + "scope": 2106, + "src": "2786:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2083, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2786:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 2089, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2085, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2806:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2806:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2088, + "indexExpression": { + "id": 2087, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2818:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2806:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2786:42:24" + }, + { + "expression": { + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2090, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2843:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2843:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2094, + "indexExpression": { + "id": 2092, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2855:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2843:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2095, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2864:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2843:30:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2097, + "nodeType": "ExpressionStatement", + "src": "2843:30:24" + }, + { + "expression": { + "id": 2104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2098, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2887:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2887:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2102, + "indexExpression": { + "id": 2100, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2902:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2887:25:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2103, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2915:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2887:36:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2105, + "nodeType": "ExpressionStatement", + "src": "2887:36:24" + } + ] + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 2108, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2994:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2994:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "src": "2994:15:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer)" + } + }, + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2994:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2114, + "nodeType": "ExpressionStatement", + "src": "2994:17:24" + }, + { + "expression": { + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "3021:28:24", + "subExpression": { + "baseExpression": { + "expression": { + "id": 2115, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "3028:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3028:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2118, + "indexExpression": { + "id": 2117, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "3043:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3028:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2120, + "nodeType": "ExpressionStatement", + "src": "3021:28:24" + } + ] + }, + "id": 2122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "2354:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "set", + "nameLocation": "2380:3:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2361:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2361:10:24" + }, + "referencedDeclaration": 2007, + "src": "2361:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2048, + "mutability": "mutable", + "name": "value", + "nameLocation": "2393:5:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2385:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2385:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2360:39:24" + }, + "returnParameters": { + "id": 2050, + "nodeType": "ParameterList", + "parameters": [], + "src": "2409:0:24" + }, + "scope": 2288, + "src": "2345:711:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2180, + "nodeType": "Block", + "src": "3175:348:24", + "statements": [ + { + "condition": { + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3189:21:24", + "subExpression": { + "arguments": [ + { + "id": 2133, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3199:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2134, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3204:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2132, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3190:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3190:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2141, + "nodeType": "IfStatement", + "src": "3185:74:24", + "trueBody": { + "id": 2140, + "nodeType": "Block", + "src": "3212:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2137, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "3233:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3233:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2139, + "nodeType": "RevertStatement", + "src": "3226:22:24" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 2143, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3282:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2144, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3287:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2142, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3273:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2150, + "nodeType": "IfStatement", + "src": "3269:80:24", + "trueBody": { + "id": 2149, + "nodeType": "Block", + "src": "3298:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2146, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "3319:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3319:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2148, + "nodeType": "RevertStatement", + "src": "3312:26:24" + } + ] + } + }, + { + "assignments": [ + 2152 + ], + "declarations": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "position", + "nameLocation": "3364:8:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3359:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2151, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3359:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2157, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2153, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3375:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3375:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2156, + "indexExpression": { + "id": 2155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3390:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3375:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3359:37:24" + }, + { + "assignments": [ + 2159 + ], + "declarations": [ + { + "constant": false, + "id": 2159, + "mutability": "mutable", + "name": "index", + "nameLocation": "3411:5:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3406:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2158, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3406:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2163, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2160, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3419:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3430:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3419:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3406:25:24" + }, + { + "expression": { + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2164, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3442:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3442:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2168, + "indexExpression": { + "id": 2166, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2159, + "src": "3454:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3442:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2169, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3463:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3442:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "3442:29:24" + }, + { + "expression": { + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2172, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3481:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3481:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2176, + "indexExpression": { + "id": 2174, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3496:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3481:24:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2177, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3508:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3481:35:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2179, + "nodeType": "ExpressionStatement", + "src": "3481:35:24" + } + ] + }, + "id": 2181, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "3071:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2125, + "mutability": "mutable", + "name": "set", + "nameLocation": "3107:3:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3088:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2124, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2123, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3088:10:24" + }, + "referencedDeclaration": 2007, + "src": "3088:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2127, + "mutability": "mutable", + "name": "value", + "nameLocation": "3128:5:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3120:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3120:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2129, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "3151:8:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3143:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3143:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3078:87:24" + }, + "returnParameters": { + "id": 2131, + "nodeType": "ParameterList", + "parameters": [], + "src": "3175:0:24" + }, + "scope": 2288, + "src": "3062:461:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2198, + "nodeType": "Block", + "src": "3615:50:24", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 2191, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "3632:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3632:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2194, + "indexExpression": { + "id": 2193, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2186, + "src": "3647:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3632:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3657:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3632:26:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2190, + "id": 2197, + "nodeType": "Return", + "src": "3625:33:24" + } + ] + }, + "id": 2199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "3538:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2184, + "mutability": "mutable", + "name": "set", + "nameLocation": "3566:3:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3547:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2183, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2182, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3547:10:24" + }, + "referencedDeclaration": 2007, + "src": "3547:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2186, + "mutability": "mutable", + "name": "value", + "nameLocation": "3579:5:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3571:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2185, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3571:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3546:39:24" + }, + "returnParameters": { + "id": 2190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3609:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2188, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3609:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3608:6:24" + }, + "scope": 2288, + "src": "3529:136:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2211, + "nodeType": "Block", + "src": "3740:42:24", + "statements": [ + { + "expression": { + "expression": { + "expression": { + "id": 2207, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "3757:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3757:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3757:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2206, + "id": 2210, + "nodeType": "Return", + "src": "3750:25:24" + } + ] + }, + "id": 2212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "3680:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2202, + "mutability": "mutable", + "name": "set", + "nameLocation": "3706:3:24", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3687:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2201, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2200, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3687:10:24" + }, + "referencedDeclaration": 2007, + "src": "3687:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "3686:24:24" + }, + "returnParameters": { + "id": 2206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2205, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3734:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3734:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3733:6:24" + }, + "scope": 2288, + "src": "3671:111:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2247, + "nodeType": "Block", + "src": "3876:193:24", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2222, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3890:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3902:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3890:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2225, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3907:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "expression": { + "id": 2226, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "3918:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3918:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3918:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3907:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3890:46:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2235, + "nodeType": "IfStatement", + "src": "3886:105:24", + "trueBody": { + "id": 2234, + "nodeType": "Block", + "src": "3938:53:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2231, + "name": "PositionOutOfBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "3959:19:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3959:21:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2233, + "nodeType": "RevertStatement", + "src": "3952:28:24" + } + ] + } + }, + { + "assignments": [ + 2237 + ], + "declarations": [ + { + "constant": false, + "id": 2237, + "mutability": "mutable", + "name": "index", + "nameLocation": "4006:5:24", + "nodeType": "VariableDeclaration", + "scope": 2247, + "src": "4001:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2236, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4001:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2241, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2238, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "4014:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4014:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4001:25:24" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2242, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "4044:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4044:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2245, + "indexExpression": { + "id": 2244, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2237, + "src": "4056:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4044:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2221, + "id": 2246, + "nodeType": "Return", + "src": "4037:25:24" + } + ] + }, + "id": 2248, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "3797:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2215, + "mutability": "mutable", + "name": "set", + "nameLocation": "3824:3:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3805:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2214, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2213, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3805:10:24" + }, + "referencedDeclaration": 2007, + "src": "3805:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2217, + "mutability": "mutable", + "name": "position", + "nameLocation": "3834:8:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3829:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3829:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3804:39:24" + }, + "returnParameters": { + "id": 2221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2220, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3867:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2219, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3867:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3866:9:24" + }, + "scope": 2288, + "src": "3788:281:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2273, + "nodeType": "Block", + "src": "4163:129:24", + "statements": [ + { + "condition": { + "id": 2262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4177:21:24", + "subExpression": { + "arguments": [ + { + "id": 2259, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4187:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2260, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4192:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2258, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "4178:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4178:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2267, + "nodeType": "IfStatement", + "src": "4173:74:24", + "trueBody": { + "id": 2266, + "nodeType": "Block", + "src": "4200:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2263, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "4221:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4221:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2265, + "nodeType": "RevertStatement", + "src": "4214:22:24" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2268, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4264:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "4264:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2271, + "indexExpression": { + "id": 2270, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4279:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4264:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2257, + "id": 2272, + "nodeType": "Return", + "src": "4257:28:24" + } + ] + }, + "id": 2274, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "4084:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2251, + "mutability": "mutable", + "name": "set", + "nameLocation": "4114:3:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4095:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2250, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2249, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4095:10:24" + }, + "referencedDeclaration": 2007, + "src": "4095:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2253, + "mutability": "mutable", + "name": "value", + "nameLocation": "4127:5:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4119:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2252, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4119:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4094:39:24" + }, + "returnParameters": { + "id": 2257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4157:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4157:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4156:6:24" + }, + "scope": 2288, + "src": "4075:217:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2286, + "nodeType": "Block", + "src": "4379:35:24", + "statements": [ + { + "expression": { + "expression": { + "id": 2283, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4396:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4396:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "functionReturnParameters": 2282, + "id": 2285, + "nodeType": "Return", + "src": "4389:18:24" + } + ] + }, + "id": 2287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "4307:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "set", + "nameLocation": "4333:3:24", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4314:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2276, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2275, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4314:10:24" + }, + "referencedDeclaration": 2007, + "src": "4314:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "4313:24:24" + }, + "returnParameters": { + "id": 2282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2281, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4361:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2279, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4361:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2280, + "nodeType": "ArrayTypeName", + "src": "4361:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4360:18:24" + }, + "scope": 2288, + "src": "4298:116:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2289, + "src": "56:4360:24", + "usedErrors": [ + 1995, + 1997, + 1999 + ] + } + ], + "src": "31:4386:24" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/MerkleProof.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"../../storage/DebtShareStorage.sol\";\n\n/// @dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number\ncontract CrossChainDebtShareManager is ElectionBase, DebtShareStorage {\n error MerkleRootNotSet();\n error InvalidMerkleProof();\n error CrossChainDebtShareAlreadyDeclared();\n\n event CrossChainDebtShareMerkleRootSet(bytes32 merkleRoot, uint blocknumber, uint epoch);\n event CrossChainDebtShareDeclared(address user, uint debtShare);\n\n function _setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n debtShareData.merkleRoot = merkleRoot;\n debtShareData.merkleRootBlockNumber = blocknumber;\n }\n\n function _declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.debtShares[user] != 0) {\n revert CrossChainDebtShareAlreadyDeclared();\n }\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n bytes32 leaf = keccak256(abi.encodePacked(user, debtShare));\n\n if (!MerkleProof.verify(merkleProof, debtShareData.merkleRoot, leaf)) {\n revert InvalidMerkleProof();\n }\n\n debtShareData.debtShares[user] = debtShare;\n }\n\n function _getCrossChainDebtShareMerkleRoot() internal view returns (bytes32) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRoot;\n }\n\n function _getCrossChainDebtShareMerkleRootBlockNumber() internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRootBlockNumber;\n }\n\n function _getDeclaredCrossChainDebtShare(address user) internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n return debtShareData.debtShares[user];\n }\n\n function _setCrossDomainMessenger(address newCrossDomainMessengerAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newCrossDomainMessengerAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newCrossDomainMessengerAddress == address(store.crossDomainMessenger)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newCrossDomainMessengerAddress)) {\n revert AddressError.NotAContract(newCrossDomainMessengerAddress);\n }\n\n store.crossDomainMessenger = ICrossDomainMessenger(newCrossDomainMessengerAddress);\n }\n\n function _getCrossDomainMessenger() internal view returns (address) {\n return address(_debtShareStore().crossDomainMessenger);\n }\n\n function _validateCrossChainMessage(address user) internal view {\n ICrossDomainMessenger messenger = ICrossDomainMessenger(_debtShareStore().crossDomainMessenger);\n\n if (address(messenger) == address(0)) {\n revert CrossDomainMessengerNotSet();\n }\n\n if (msg.sender != address(messenger)) {\n revert OnlyCrossDomainMessengerCanInvoke();\n }\n\n if (messenger.xDomainMessageSender() != user) {\n revert OnlyCrossDomainUserCanInvoke();\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 6950 + ], + "DebtShareStorage": [ + 6611 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6951, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6613, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:44" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "id": 6614, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 1783, + "src": "56:69:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6615, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 4684, + "src": "126:82:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6616, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 1697, + "src": "209:69:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6617, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 26, + "src": "279:70:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6618, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 16, + "src": "350:71:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6619, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 6612, + "src": "422:44:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6621, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "619:12:44" + }, + "id": 6622, + "nodeType": "InheritanceSpecifier", + "src": "619:12:44" + }, + { + "baseName": { + "id": 6623, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6611, + "src": "633:16:44" + }, + "id": 6624, + "nodeType": "InheritanceSpecifier", + "src": "633:16:44" + } + ], + "canonicalName": "CrossChainDebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6620, + "nodeType": "StructuredDocumentation", + "src": "468:112:44", + "text": "@dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number" + }, + "fullyImplemented": true, + "id": 6950, + "linearizedBaseContracts": [ + 6950, + 6611, + 4683, + 4331 + ], + "name": "CrossChainDebtShareManager", + "nameLocation": "589:26:44", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6626, + "name": "MerkleRootNotSet", + "nameLocation": "662:16:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6625, + "nodeType": "ParameterList", + "parameters": [], + "src": "678:2:44" + }, + "src": "656:25:44" + }, + { + "id": 6628, + "name": "InvalidMerkleProof", + "nameLocation": "692:18:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6627, + "nodeType": "ParameterList", + "parameters": [], + "src": "710:2:44" + }, + "src": "686:27:44" + }, + { + "id": 6630, + "name": "CrossChainDebtShareAlreadyDeclared", + "nameLocation": "724:34:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6629, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:44" + }, + "src": "718:43:44" + }, + { + "anonymous": false, + "id": 6638, + "name": "CrossChainDebtShareMerkleRootSet", + "nameLocation": "773:32:44", + "nodeType": "EventDefinition", + "parameters": { + "id": 6637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6632, + "indexed": false, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "814:10:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "806:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6631, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "806:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6634, + "indexed": false, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "831:11:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "826:16:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6633, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "826:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6636, + "indexed": false, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "849:5:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "844:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6635, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "844:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "805:50:44" + }, + "src": "767:89:44" + }, + { + "anonymous": false, + "id": 6644, + "name": "CrossChainDebtShareDeclared", + "nameLocation": "867:27:44", + "nodeType": "EventDefinition", + "parameters": { + "id": 6643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6640, + "indexed": false, + "mutability": "mutable", + "name": "user", + "nameLocation": "903:4:44", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "895:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6639, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "895:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6642, + "indexed": false, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "914:9:44", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "909:14:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "909:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "894:30:44" + }, + "src": "861:64:44" + }, + { + "body": { + "id": 6673, + "nodeType": "Block", + "src": "1021:238:44", + "statements": [ + { + "assignments": [ + 6653 + ], + "declarations": [ + { + "constant": false, + "id": 6653, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1063:13:44", + "nodeType": "VariableDeclaration", + "scope": 6673, + "src": "1031:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6652, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6651, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "1031:23:44" + }, + "referencedDeclaration": 6602, + "src": "1031:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6660, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6654, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1079:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6656, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "1079:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6659, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6657, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1121:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1121:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1079:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1031:114:44" + }, + { + "expression": { + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6661, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6653, + "src": "1156:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1156:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6664, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6646, + "src": "1183:10:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1156:37:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6666, + "nodeType": "ExpressionStatement", + "src": "1156:37:44" + }, + { + "expression": { + "id": 6671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6667, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6653, + "src": "1203:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6669, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6597, + "src": "1203:35:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6670, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "1241:11:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1203:49:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6672, + "nodeType": "ExpressionStatement", + "src": "1203:49:44" + } + ] + }, + "id": 6674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossChainDebtShareMerkleRoot", + "nameLocation": "940:33:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6646, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "982:10:44", + "nodeType": "VariableDeclaration", + "scope": 6674, + "src": "974:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6645, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "974:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6648, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "999:11:44", + "nodeType": "VariableDeclaration", + "scope": 6674, + "src": "994:16:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6647, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "994:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "973:38:44" + }, + "returnParameters": { + "id": 6650, + "nodeType": "ParameterList", + "parameters": [], + "src": "1021:0:44" + }, + "scope": 6950, + "src": "931:328:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6745, + "nodeType": "Block", + "src": "1406:600:44", + "statements": [ + { + "assignments": [ + 6686 + ], + "declarations": [ + { + "constant": false, + "id": 6686, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1448:13:44", + "nodeType": "VariableDeclaration", + "scope": 6745, + "src": "1416:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6685, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6684, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "1416:23:44" + }, + "referencedDeclaration": 6602, + "src": "1416:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6693, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6687, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1464:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1464:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6689, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "1464:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6692, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6690, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1506:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1506:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1464:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1416:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 6694, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1545:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "1545:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6697, + "indexExpression": { + "id": 6696, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1570:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1545:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1579:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1545:35:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6704, + "nodeType": "IfStatement", + "src": "1541:109:44", + "trueBody": { + "id": 6703, + "nodeType": "Block", + "src": "1582:68:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6700, + "name": "CrossChainDebtShareAlreadyDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6630, + "src": "1603:34:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:36:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6702, + "nodeType": "RevertStatement", + "src": "1596:43:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6705, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1664:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6706, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1664:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1692:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1664:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6713, + "nodeType": "IfStatement", + "src": "1660:85:44", + "trueBody": { + "id": 6712, + "nodeType": "Block", + "src": "1695:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6709, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "1716:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1716:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6711, + "nodeType": "RevertStatement", + "src": "1709:25:44" + } + ] + } + }, + { + "assignments": [ + 6715 + ], + "declarations": [ + { + "constant": false, + "id": 6715, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "1763:4:44", + "nodeType": "VariableDeclaration", + "scope": 6745, + "src": "1755:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1755:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6723, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 6719, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1797:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6720, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "1803:9:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6717, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1780:3:44", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1780:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:33:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6716, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1770:9:44", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1770:44:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1755:59:44" + }, + { + "condition": { + "id": 6731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1829:64:44", + "subExpression": { + "arguments": [ + { + "id": 6726, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6681, + "src": "1849:11:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "expression": { + "id": 6727, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1862:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1862:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6729, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6715, + "src": "1888:4:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6724, + "name": "MerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1782, + "src": "1830:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MerkleProof_$1782_$", + "typeString": "type(library MerkleProof)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verify", + "nodeType": "MemberAccess", + "referencedDeclaration": 1770, + "src": "1830:18:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32[] memory,bytes32,bytes32) pure returns (bool)" + } + }, + "id": 6730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1830:63:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6736, + "nodeType": "IfStatement", + "src": "1825:122:44", + "trueBody": { + "id": 6735, + "nodeType": "Block", + "src": "1895:52:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6732, + "name": "InvalidMerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6628, + "src": "1916:18:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1916:20:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6734, + "nodeType": "RevertStatement", + "src": "1909:27:44" + } + ] + } + }, + { + "expression": { + "id": 6743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6737, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1957:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "1957:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6741, + "indexExpression": { + "id": 6739, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1982:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1957:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6742, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "1990:9:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1957:42:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6744, + "nodeType": "ExpressionStatement", + "src": "1957:42:44" + } + ] + }, + "id": 6746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_declareCrossChainDebtShare", + "nameLocation": "1274:27:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6676, + "mutability": "mutable", + "name": "user", + "nameLocation": "1319:4:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1311:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6675, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1311:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6678, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "1341:9:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1333:17:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1333:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6681, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "1379:11:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1360:30:44", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6679, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1360:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6680, + "nodeType": "ArrayTypeName", + "src": "1360:9:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "1301:95:44" + }, + "returnParameters": { + "id": 6683, + "nodeType": "ParameterList", + "parameters": [], + "src": "1406:0:44" + }, + "scope": 6950, + "src": "1265:741:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6773, + "nodeType": "Block", + "src": "2089:268:44", + "statements": [ + { + "assignments": [ + 6753 + ], + "declarations": [ + { + "constant": false, + "id": 6753, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2131:13:44", + "nodeType": "VariableDeclaration", + "scope": 6773, + "src": "2099:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6751, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2099:23:44" + }, + "referencedDeclaration": 6602, + "src": "2099:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6760, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6754, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2147:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2147:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2147:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6759, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6757, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2189:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2147:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2099:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6761, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6753, + "src": "2228:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6762, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2228:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2256:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2228:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6769, + "nodeType": "IfStatement", + "src": "2224:85:44", + "trueBody": { + "id": 6768, + "nodeType": "Block", + "src": "2259:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6765, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "2280:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2280:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6767, + "nodeType": "RevertStatement", + "src": "2273:25:44" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6770, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6753, + "src": "2326:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6771, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2326:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6750, + "id": 6772, + "nodeType": "Return", + "src": "2319:31:44" + } + ] + }, + "id": 6774, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRoot", + "nameLocation": "2021:33:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6747, + "nodeType": "ParameterList", + "parameters": [], + "src": "2054:2:44" + }, + "returnParameters": { + "id": 6750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6749, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6774, + "src": "2080:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6748, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2080:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2079:9:44" + }, + "scope": 6950, + "src": "2012:345:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6801, + "nodeType": "Block", + "src": "2448:279:44", + "statements": [ + { + "assignments": [ + 6781 + ], + "declarations": [ + { + "constant": false, + "id": 6781, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2490:13:44", + "nodeType": "VariableDeclaration", + "scope": 6801, + "src": "2458:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6780, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6779, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2458:23:44" + }, + "referencedDeclaration": 6602, + "src": "2458:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6788, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6782, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2506:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2506:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6787, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6785, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2548:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2548:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2506:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2458:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6789, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6781, + "src": "2587:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2587:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2587:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6797, + "nodeType": "IfStatement", + "src": "2583:85:44", + "trueBody": { + "id": 6796, + "nodeType": "Block", + "src": "2618:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6793, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "2639:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2639:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6795, + "nodeType": "RevertStatement", + "src": "2632:25:44" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6798, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6781, + "src": "2685:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6597, + "src": "2685:35:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6778, + "id": 6800, + "nodeType": "Return", + "src": "2678:42:44" + } + ] + }, + "id": 6802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2372:44:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6775, + "nodeType": "ParameterList", + "parameters": [], + "src": "2416:2:44" + }, + "returnParameters": { + "id": 6778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6777, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6802, + "src": "2442:4:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2442:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2441:6:44" + }, + "scope": 6950, + "src": "2363:364:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6824, + "nodeType": "Block", + "src": "2817:179:44", + "statements": [ + { + "assignments": [ + 6811 + ], + "declarations": [ + { + "constant": false, + "id": 6811, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2859:13:44", + "nodeType": "VariableDeclaration", + "scope": 6824, + "src": "2827:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6809, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2827:23:44" + }, + "referencedDeclaration": 6602, + "src": "2827:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6818, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6812, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2875:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2875:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2875:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6817, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6815, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2917:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2875:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2827:114:44" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6819, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6811, + "src": "2959:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "2959:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6822, + "indexExpression": { + "id": 6821, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6804, + "src": "2984:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2959:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6808, + "id": 6823, + "nodeType": "Return", + "src": "2952:37:44" + } + ] + }, + "id": 6825, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDeclaredCrossChainDebtShare", + "nameLocation": "2742:31:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6805, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6804, + "mutability": "mutable", + "name": "user", + "nameLocation": "2782:4:44", + "nodeType": "VariableDeclaration", + "scope": 6825, + "src": "2774:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6803, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2774:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2773:14:44" + }, + "returnParameters": { + "id": 6808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6807, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6825, + "src": "2811:4:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6806, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2811:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2810:6:44" + }, + "scope": 6950, + "src": "2733:263:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6884, + "nodeType": "Block", + "src": "3085:575:44", + "statements": [ + { + "assignments": [ + 6832 + ], + "declarations": [ + { + "constant": false, + "id": 6832, + "mutability": "mutable", + "name": "store", + "nameLocation": "3118:5:44", + "nodeType": "VariableDeclaration", + "scope": 6884, + "src": "3095:28:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6830, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "3095:14:44" + }, + "referencedDeclaration": 6593, + "src": "3095:14:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6835, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6833, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3126:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3126:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3095:48:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6836, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3158:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3200:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3192:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6837, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3192:7:44", + "typeDescriptions": {} + } + }, + "id": 6840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3192:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3158:44:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6848, + "nodeType": "IfStatement", + "src": "3154:108:44", + "trueBody": { + "id": 6847, + "nodeType": "Block", + "src": "3204:58:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6842, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3225:12:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "3225:24:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3225:26:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6846, + "nodeType": "RevertStatement", + "src": "3218:33:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6849, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3276:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 6852, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6832, + "src": "3318:5:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3318:26:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3310:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3310:7:44", + "typeDescriptions": {} + } + }, + "id": 6854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3310:35:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3276:69:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6862, + "nodeType": "IfStatement", + "src": "3272:129:44", + "trueBody": { + "id": 6861, + "nodeType": "Block", + "src": "3347:54:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6856, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "3368:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "3368:20:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3368:22:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6860, + "nodeType": "RevertStatement", + "src": "3361:29:44" + } + ] + } + }, + { + "condition": { + "id": 6867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3415:55:44", + "subExpression": { + "arguments": [ + { + "id": 6865, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3439:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6863, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "3416:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 6864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "3416:22:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3416:54:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6875, + "nodeType": "IfStatement", + "src": "3411:150:44", + "trueBody": { + "id": 6874, + "nodeType": "Block", + "src": "3472:89:44", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 6871, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3519:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6868, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3493:12:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "3493:25:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 6872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3493:57:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6873, + "nodeType": "RevertStatement", + "src": "3486:64:44" + } + ] + } + }, + { + "expression": { + "id": 6882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6876, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6832, + "src": "3571:5:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3571:26:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6880, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3622:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6879, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3600:21:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3600:53:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "src": "3571:82:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6883, + "nodeType": "ExpressionStatement", + "src": "3571:82:44" + } + ] + }, + "id": 6885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossDomainMessenger", + "nameLocation": "3011:24:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6827, + "mutability": "mutable", + "name": "newCrossDomainMessengerAddress", + "nameLocation": "3044:30:44", + "nodeType": "VariableDeclaration", + "scope": 6885, + "src": "3036:38:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6826, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3036:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3035:40:44" + }, + "returnParameters": { + "id": 6829, + "nodeType": "ParameterList", + "parameters": [], + "src": "3085:0:44" + }, + "scope": 6950, + "src": "3002:658:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6897, + "nodeType": "Block", + "src": "3734:71:44", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6892, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3759:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3759:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3759:38:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3751:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3751:7:44", + "typeDescriptions": {} + } + }, + "id": 6895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3751:47:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6889, + "id": 6896, + "nodeType": "Return", + "src": "3744:54:44" + } + ] + }, + "id": 6898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossDomainMessenger", + "nameLocation": "3675:24:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6886, + "nodeType": "ParameterList", + "parameters": [], + "src": "3699:2:44" + }, + "returnParameters": { + "id": 6889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6888, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6898, + "src": "3725:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6887, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3725:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3724:9:44" + }, + "scope": 6950, + "src": "3666:139:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6948, + "nodeType": "Block", + "src": "3875:453:44", + "statements": [ + { + "assignments": [ + 6905 + ], + "declarations": [ + { + "constant": false, + "id": 6905, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3907:9:44", + "nodeType": "VariableDeclaration", + "scope": 6948, + "src": "3885:31:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6904, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6903, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "3885:21:44" + }, + "referencedDeclaration": 6416, + "src": "3885:21:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "id": 6911, + "initialValue": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6907, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3941:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3941:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3941:38:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6906, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3919:21:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3919:61:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3885:95:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6914, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4003:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3995:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6912, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3995:7:44", + "typeDescriptions": {} + } + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3995:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4017:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6916, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4017:7:44", + "typeDescriptions": {} + } + }, + "id": 6919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4017:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3995:32:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6925, + "nodeType": "IfStatement", + "src": "3991:98:44", + "trueBody": { + "id": 6924, + "nodeType": "Block", + "src": "4029:60:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6921, + "name": "CrossDomainMessengerNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4374, + "src": "4050:26:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4050:28:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6923, + "nodeType": "RevertStatement", + "src": "4043:35:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6926, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4103:3:44", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4103:10:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "id": 6930, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4125:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4117:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4117:7:44", + "typeDescriptions": {} + } + }, + "id": 6931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4117:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4103:32:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6937, + "nodeType": "IfStatement", + "src": "4099:105:44", + "trueBody": { + "id": 6936, + "nodeType": "Block", + "src": "4137:67:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6933, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4376, + "src": "4158:33:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4158:35:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6935, + "nodeType": "RevertStatement", + "src": "4151:42:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6938, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4218:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xDomainMessageSender", + "nodeType": "MemberAccess", + "referencedDeclaration": 6406, + "src": "4218:30:44", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4218:32:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6941, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6900, + "src": "4254:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4218:40:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6947, + "nodeType": "IfStatement", + "src": "4214:108:44", + "trueBody": { + "id": 6946, + "nodeType": "Block", + "src": "4260:62:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6943, + "name": "OnlyCrossDomainUserCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4378, + "src": "4281:28:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4281:30:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6945, + "nodeType": "RevertStatement", + "src": "4274:37:44" + } + ] + } + } + ] + }, + "id": 6949, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCrossChainMessage", + "nameLocation": "3820:26:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6900, + "mutability": "mutable", + "name": "user", + "nameLocation": "3855:4:44", + "nodeType": "VariableDeclaration", + "scope": 6949, + "src": "3847:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3846:14:44" + }, + "returnParameters": { + "id": 6902, + "nodeType": "ParameterList", + "parameters": [], + "src": "3875:0:44" + }, + "scope": 6950, + "src": "3811:517:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6951, + "src": "580:3750:44", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6626, + 6628, + 6630 + ] + } + ], + "src": "31:4300:44" + } + }, + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Based on OpenZeppelin https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol\nlibrary MerkleProof {\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n bytes32 computedHash = leaf;\n\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n\n // Check if the computed hash (root) is equal to the provided root\n return computedHash == root;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "exportedSymbols": { + "MerkleProof": [ + 1782 + ] + }, + "id": 1783, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1710, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:23" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MerkleProof", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1782, + "linearizedBaseContracts": [ + 1782 + ], + "name": "MerkleProof", + "nameLocation": "201:11:23", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1769, + "nodeType": "Block", + "src": "346:656:23", + "statements": [ + { + "assignments": [ + 1723 + ], + "declarations": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "computedHash", + "nameLocation": "364:12:23", + "nodeType": "VariableDeclaration", + "scope": 1769, + "src": "356:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1722, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "356:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1725, + "initialValue": { + "id": 1724, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1717, + "src": "379:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "356:27:23" + }, + { + "body": { + "id": 1763, + "nodeType": "Block", + "src": "437:446:23", + "statements": [ + { + "assignments": [ + 1738 + ], + "declarations": [ + { + "constant": false, + "id": 1738, + "mutability": "mutable", + "name": "proofElement", + "nameLocation": "459:12:23", + "nodeType": "VariableDeclaration", + "scope": 1763, + "src": "451:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1737, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "451:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1742, + "initialValue": { + "baseExpression": { + "id": 1739, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "474:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1741, + "indexExpression": { + "id": 1740, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "480:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "474:8:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "451:31:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1743, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "501:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 1744, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "517:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "501:28:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1761, + "nodeType": "Block", + "src": "705:168:23", + "statements": [ + { + "expression": { + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1754, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "801:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1756, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "831:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1757, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "845:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1755, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "816:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "816:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "801:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1760, + "nodeType": "ExpressionStatement", + "src": "801:57:23" + } + ] + }, + "id": 1762, + "nodeType": "IfStatement", + "src": "497:376:23", + "trueBody": { + "id": 1753, + "nodeType": "Block", + "src": "531:168:23", + "statements": [ + { + "expression": { + "id": 1751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1746, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "627:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1748, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "657:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1749, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "671:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1747, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "642:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "627:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1752, + "nodeType": "ExpressionStatement", + "src": "627:57:23" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1730, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "414:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1731, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "418:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "418:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "414:16:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1764, + "initializationExpression": { + "assignments": [ + 1727 + ], + "declarations": [ + { + "constant": false, + "id": 1727, + "mutability": "mutable", + "name": "i", + "nameLocation": "407:1:23", + "nodeType": "VariableDeclaration", + "scope": 1764, + "src": "399:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1729, + "initialValue": { + "hexValue": "30", + "id": 1728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "411:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "399:13:23" + }, + "loopExpression": { + "expression": { + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "432:3:23", + "subExpression": { + "id": 1734, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "432:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1736, + "nodeType": "ExpressionStatement", + "src": "432:3:23" + }, + "nodeType": "ForStatement", + "src": "394:489:23" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1765, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "975:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1766, + "name": "root", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1715, + "src": "991:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "975:20:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1721, + "id": 1768, + "nodeType": "Return", + "src": "968:27:23" + } + ] + }, + "id": 1770, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verify", + "nameLocation": "228:6:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1718, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1713, + "mutability": "mutable", + "name": "proof", + "nameLocation": "261:5:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "244:22:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1711, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "244:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1712, + "nodeType": "ArrayTypeName", + "src": "244:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1715, + "mutability": "mutable", + "name": "root", + "nameLocation": "284:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "276:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "276:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1717, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "306:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "298:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1716, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "298:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "234:82:23" + }, + "returnParameters": { + "id": 1721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1720, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "340:4:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1719, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "340:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "339:6:23" + }, + "scope": 1782, + "src": "219:783:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1780, + "nodeType": "Block", + "src": "1091:135:23", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1110:110:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1131:4:23", + "type": "", + "value": "0x00" + }, + { + "name": "a", + "nodeType": "YulIdentifier", + "src": "1137:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1124:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1124:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1124:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1159:4:23", + "type": "", + "value": "0x20" + }, + { + "name": "b", + "nodeType": "YulIdentifier", + "src": "1165:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1152:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1152:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1152:15:23" + }, + { + "nodeType": "YulAssignment", + "src": "1180:30:23", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1199:4:23", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1205:4:23", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "keccak256", + "nodeType": "YulIdentifier", + "src": "1189:9:23" + }, + "nodeType": "YulFunctionCall", + "src": "1189:21:23" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1180:5:23" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1772, + "isOffset": false, + "isSlot": false, + "src": "1137:1:23", + "valueSize": 1 + }, + { + "declaration": 1774, + "isOffset": false, + "isSlot": false, + "src": "1165:1:23", + "valueSize": 1 + }, + { + "declaration": 1777, + "isOffset": false, + "isSlot": false, + "src": "1180:5:23", + "valueSize": 1 + } + ], + "id": 1779, + "nodeType": "InlineAssembly", + "src": "1101:119:23" + } + ] + }, + "id": 1781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_efficientHash", + "nameLocation": "1017:14:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1772, + "mutability": "mutable", + "name": "a", + "nameLocation": "1040:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1032:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1032:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1774, + "mutability": "mutable", + "name": "b", + "nameLocation": "1051:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1043:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1773, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1043:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1031:22:23" + }, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "value", + "nameLocation": "1084:5:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1076:13:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1776, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1076:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1075:15:23" + }, + "scope": 1782, + "src": "1008:218:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1783, + "src": "193:1035:23", + "usedErrors": [] + } + ], + "src": "31:1198:23" + } + }, + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IDebtShare.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\nimport \"../interfaces/ICrossDomainMessenger.sol\";\n\ncontract DebtShareStorage {\n struct DebtShareStore {\n // Synthetix c2 DebtShare contract used to determine vote power in the local chain\n IDebtShare debtShareContract;\n // Array of debt share snapshot id's for each epoch\n uint128[] debtShareIds;\n // Array of CrossChainDebtShareData's for each epoch\n CrossChainDebtShareData[] crossChainDebtShareData;\n // Stores the address of the Optimism cross domain messenger on L2\n ICrossDomainMessenger crossDomainMessenger;\n }\n\n struct CrossChainDebtShareData {\n // Synthetix v2 cross chain debt share merkle root\n bytes32 merkleRoot;\n // Cross chain debt share merkle root snapshot blocknumber\n uint merkleRootBlockNumber;\n // Cross chain debt shares declared on this chain\n mapping(address => uint) debtShares;\n }\n\n function _debtShareStore() internal pure returns (DebtShareStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.debtshare\")) - 1)\n store.slot := 0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "exportedSymbols": { + "DebtShareStorage": [ + 6611 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6612, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6576, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:43" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "file": "../interfaces/IDebtShare.sol", + "id": 6577, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 6429, + "src": "56:38:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 6578, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 2289, + "src": "95:65:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "file": "../interfaces/ICrossDomainMessenger.sol", + "id": 6579, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 6417, + "src": "161:49:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "DebtShareStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6611, + "linearizedBaseContracts": [ + 6611 + ], + "name": "DebtShareStorage", + "nameLocation": "221:16:43", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "DebtShareStorage.DebtShareStore", + "id": 6593, + "members": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "378:17:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "367:28:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + }, + "typeName": { + "id": 6581, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6580, + "name": "IDebtShare", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6428, + "src": "367:10:43" + }, + "referencedDeclaration": 6428, + "src": "367:10:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6585, + "mutability": "mutable", + "name": "debtShareIds", + "nameLocation": "475:12:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "465:22:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + }, + "typeName": { + "baseType": { + "id": 6583, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "465:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6584, + "nodeType": "ArrayTypeName", + "src": "465:9:43", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6589, + "mutability": "mutable", + "name": "crossChainDebtShareData", + "nameLocation": "584:23:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "558:49:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + }, + "typeName": { + "baseType": { + "id": 6587, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6586, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "558:23:43" + }, + "referencedDeclaration": 6602, + "src": "558:23:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "id": 6588, + "nodeType": "ArrayTypeName", + "src": "558:25:43", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "crossDomainMessenger", + "nameLocation": "714:20:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "692:42:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6591, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6590, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "692:21:43" + }, + "referencedDeclaration": 6416, + "src": "692:21:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "name": "DebtShareStore", + "nameLocation": "251:14:43", + "nodeType": "StructDefinition", + "scope": 6611, + "src": "244:497:43", + "visibility": "public" + }, + { + "canonicalName": "DebtShareStorage.CrossChainDebtShareData", + "id": 6602, + "members": [ + { + "constant": false, + "id": 6595, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "855:10:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "847:18:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6594, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "847:7:43", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6597, + "mutability": "mutable", + "name": "merkleRootBlockNumber", + "nameLocation": "947:21:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "942:26:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "942:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6601, + "mutability": "mutable", + "name": "debtShares", + "nameLocation": "1061:10:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "1036:35:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6600, + "keyType": { + "id": 6598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1044:7:43", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1036:24:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6599, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1055:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "CrossChainDebtShareData", + "nameLocation": "754:23:43", + "nodeType": "StructDefinition", + "scope": 6611, + "src": "747:331:43", + "visibility": "public" + }, + { + "body": { + "id": 6609, + "nodeType": "Block", + "src": "1164:199:43", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1183:174:43", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1267:80:43", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1281:66:43", + "type": "", + "value": "0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "1267:10:43" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 6606, + "isOffset": false, + "isSlot": true, + "src": "1267:10:43", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 6608, + "nodeType": "InlineAssembly", + "src": "1174:183:43" + } + ] + }, + "id": 6610, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_debtShareStore", + "nameLocation": "1093:15:43", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6603, + "nodeType": "ParameterList", + "parameters": [], + "src": "1108:2:43" + }, + "returnParameters": { + "id": 6607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6606, + "mutability": "mutable", + "name": "store", + "nameLocation": "1157:5:43", + "nodeType": "VariableDeclaration", + "scope": 6610, + "src": "1134:28:43", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6605, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6604, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1134:14:43" + }, + "referencedDeclaration": 6593, + "src": "1134:14:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "src": "1133:30:43" + }, + "scope": 6611, + "src": "1084:279:43", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6612, + "src": "212:1153:43", + "usedErrors": [] + } + ], + "src": "31:1335:43" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IDebtShare {\n function balanceOfOnPeriod(address account, uint periodId) external view returns (uint);\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "exportedSymbols": { + "IDebtShare": [ + 6428 + ] + }, + "id": 6429, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6418, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:41" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IDebtShare", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6428, + "linearizedBaseContracts": [ + 6428 + ], + "name": "IDebtShare", + "nameLocation": "66:10:41", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "8a25acf4", + "id": 6427, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOfOnPeriod", + "nameLocation": "92:17:41", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6420, + "mutability": "mutable", + "name": "account", + "nameLocation": "118:7:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "110:15:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "110:7:41", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6422, + "mutability": "mutable", + "name": "periodId", + "nameLocation": "132:8:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "127:13:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6421, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "127:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "109:32:41" + }, + "returnParameters": { + "id": 6426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6425, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "165:4:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6424, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "165:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "164:6:41" + }, + "scope": 6428, + "src": "83:88:41", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6429, + "src": "56:117:41", + "usedErrors": [] + } + ], + "src": "31:143:41" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol": { + "sourceCode": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface ICrossDomainMessenger {\n event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit);\n event RelayedMessage(bytes32 indexed msgHash);\n event FailedRelayedMessage(bytes32 indexed msgHash);\n\n function xDomainMessageSender() external view returns (address);\n\n function sendMessage(\n address target,\n bytes calldata message,\n uint32 gasLimit\n ) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "exportedSymbols": { + "ICrossDomainMessenger": [ + 6416 + ] + }, + "id": 6417, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6381, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:23:40" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ICrossDomainMessenger", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6416, + "linearizedBaseContracts": [ + 6416 + ], + "name": "ICrossDomainMessenger", + "nameLocation": "67:21:40", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 6393, + "name": "SentMessage", + "nameLocation": "101:11:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6383, + "indexed": true, + "mutability": "mutable", + "name": "target", + "nameLocation": "129:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "113:22:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6382, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "113:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6385, + "indexed": false, + "mutability": "mutable", + "name": "sender", + "nameLocation": "145:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "137:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "137:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6387, + "indexed": false, + "mutability": "mutable", + "name": "message", + "nameLocation": "159:7:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "153:13:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6386, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "153:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6389, + "indexed": false, + "mutability": "mutable", + "name": "messageNonce", + "nameLocation": "176:12:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "168:20:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "168:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6391, + "indexed": false, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "198:8:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "190:16:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "190:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "112:95:40" + }, + "src": "95:113:40" + }, + { + "anonymous": false, + "id": 6397, + "name": "RelayedMessage", + "nameLocation": "219:14:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6395, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "250:7:40", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "234:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6394, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "234:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "233:25:40" + }, + "src": "213:46:40" + }, + { + "anonymous": false, + "id": 6401, + "name": "FailedRelayedMessage", + "nameLocation": "270:20:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "307:7:40", + "nodeType": "VariableDeclaration", + "scope": 6401, + "src": "291:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6398, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "291:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "290:25:40" + }, + "src": "264:52:40" + }, + { + "functionSelector": "6e296e45", + "id": 6406, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "xDomainMessageSender", + "nameLocation": "331:20:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [], + "src": "351:2:40" + }, + "returnParameters": { + "id": 6405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6406, + "src": "377:7:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "377:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "376:9:40" + }, + "scope": 6416, + "src": "322:64:40", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3dbb202b", + "id": 6415, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "sendMessage", + "nameLocation": "401:11:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6408, + "mutability": "mutable", + "name": "target", + "nameLocation": "430:6:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "422:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "422:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6410, + "mutability": "mutable", + "name": "message", + "nameLocation": "461:7:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "446:22:40", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6409, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "446:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6412, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "485:8:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "478:15:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 6411, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "478:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "412:87:40" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "508:0:40" + }, + "scope": 6416, + "src": "392:117:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6417, + "src": "57:454:40", + "usedErrors": [] + } + ], + "src": "32:480:40" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/DebtShareStorage.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\n\n/// @dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number\ncontract DebtShareManager is ElectionBase, DebtShareStorage {\n error DebtShareContractNotSet();\n error DebtShareSnapshotIdNotSet();\n\n event DebtShareContractSet(address contractAddress);\n event DebtShareSnapshotIdSet(uint snapshotId);\n\n function _setDebtShareSnapshotId(uint snapshotId) internal {\n DebtShareStore storage store = _debtShareStore();\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n store.debtShareIds[currentEpochIndex] = uint128(snapshotId);\n\n emit DebtShareSnapshotIdSet(snapshotId);\n }\n\n function _getDebtShareSnapshotId() internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n if (debtShareId == 0) {\n revert DebtShareSnapshotIdNotSet();\n }\n\n return debtShareId;\n }\n\n function _setDebtShareContract(address newDebtShareContractAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newDebtShareContractAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newDebtShareContractAddress == address(store.debtShareContract)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newDebtShareContractAddress)) {\n revert AddressError.NotAContract(newDebtShareContractAddress);\n }\n\n store.debtShareContract = IDebtShare(newDebtShareContractAddress);\n }\n\n function _getDebtShare(address user) internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n\n return store.debtShareContract.balanceOfOnPeriod(user, uint(debtShareId));\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "DebtShareManager": [ + 7129 + ], + "DebtShareStorage": [ + 6611 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 7130, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6952, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:45" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6953, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 6612, + "src": "56:44:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6954, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 1697, + "src": "101:69:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6955, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 26, + "src": "171:70:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6956, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 16, + "src": "242:71:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6957, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 4684, + "src": "314:82:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6959, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "521:12:45" + }, + "id": 6960, + "nodeType": "InheritanceSpecifier", + "src": "521:12:45" + }, + { + "baseName": { + "id": 6961, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6611, + "src": "535:16:45" + }, + "id": 6962, + "nodeType": "InheritanceSpecifier", + "src": "535:16:45" + } + ], + "canonicalName": "DebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6958, + "nodeType": "StructuredDocumentation", + "src": "398:94:45", + "text": "@dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number" + }, + "fullyImplemented": true, + "id": 7129, + "linearizedBaseContracts": [ + 7129, + 6611, + 4683, + 4331 + ], + "name": "DebtShareManager", + "nameLocation": "501:16:45", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6964, + "name": "DebtShareContractNotSet", + "nameLocation": "564:23:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6963, + "nodeType": "ParameterList", + "parameters": [], + "src": "587:2:45" + }, + "src": "558:32:45" + }, + { + "id": 6966, + "name": "DebtShareSnapshotIdNotSet", + "nameLocation": "601:25:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6965, + "nodeType": "ParameterList", + "parameters": [], + "src": "626:2:45" + }, + "src": "595:34:45" + }, + { + "anonymous": false, + "id": 6970, + "name": "DebtShareContractSet", + "nameLocation": "641:20:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6968, + "indexed": false, + "mutability": "mutable", + "name": "contractAddress", + "nameLocation": "670:15:45", + "nodeType": "VariableDeclaration", + "scope": 6970, + "src": "662:23:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6967, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "661:25:45" + }, + "src": "635:52:45" + }, + { + "anonymous": false, + "id": 6974, + "name": "DebtShareSnapshotIdSet", + "nameLocation": "698:22:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6972, + "indexed": false, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "726:10:45", + "nodeType": "VariableDeclaration", + "scope": 6974, + "src": "721:15:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6971, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "721:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "720:17:45" + }, + "src": "692:46:45" + }, + { + "body": { + "id": 7005, + "nodeType": "Block", + "src": "803:243:45", + "statements": [ + { + "assignments": [ + 6981 + ], + "declarations": [ + { + "constant": false, + "id": 6981, + "mutability": "mutable", + "name": "store", + "nameLocation": "836:5:45", + "nodeType": "VariableDeclaration", + "scope": 7005, + "src": "813:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6980, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6979, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "813:14:45" + }, + "referencedDeclaration": 6593, + "src": "813:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6984, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6982, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "844:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "844:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "813:48:45" + }, + { + "assignments": [ + 6986 + ], + "declarations": [ + { + "constant": false, + "id": 6986, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "877:17:45", + "nodeType": "VariableDeclaration", + "scope": 7005, + "src": "872:22:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6985, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "872:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6989, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6987, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "897:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "897:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "872:48:45" + }, + { + "expression": { + "id": 6999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6990, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6981, + "src": "930:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "930:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6994, + "indexExpression": { + "id": 6992, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6986, + "src": "949:17:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "930:37:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6997, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6976, + "src": "978:10:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "970:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6995, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "970:7:45", + "typeDescriptions": {} + } + }, + "id": 6998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:19:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "930:59:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 7000, + "nodeType": "ExpressionStatement", + "src": "930:59:45" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7002, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6976, + "src": "1028:10:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7001, + "name": "DebtShareSnapshotIdSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6974, + "src": "1005:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1005:34:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7004, + "nodeType": "EmitStatement", + "src": "1000:39:45" + } + ] + }, + "id": 7006, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareSnapshotId", + "nameLocation": "753:23:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6977, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6976, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "782:10:45", + "nodeType": "VariableDeclaration", + "scope": 7006, + "src": "777:15:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6975, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "777:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "776:17:45" + }, + "returnParameters": { + "id": 6978, + "nodeType": "ParameterList", + "parameters": [], + "src": "803:0:45" + }, + "scope": 7129, + "src": "744:302:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7035, + "nodeType": "Block", + "src": "1116:260:45", + "statements": [ + { + "assignments": [ + 7013 + ], + "declarations": [ + { + "constant": false, + "id": 7013, + "mutability": "mutable", + "name": "store", + "nameLocation": "1149:5:45", + "nodeType": "VariableDeclaration", + "scope": 7035, + "src": "1126:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7012, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7011, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1126:14:45" + }, + "referencedDeclaration": 6593, + "src": "1126:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7016, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7014, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1157:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1157:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1126:48:45" + }, + { + "assignments": [ + 7018 + ], + "declarations": [ + { + "constant": false, + "id": 7018, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "1193:11:45", + "nodeType": "VariableDeclaration", + "scope": 7035, + "src": "1185:19:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7017, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1185:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7024, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7019, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7013, + "src": "1207:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "1207:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7023, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7021, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1226:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1226:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1207:43:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1185:65:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 7027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7025, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "1264:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 7026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1279:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1264:16:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7032, + "nodeType": "IfStatement", + "src": "1260:81:45", + "trueBody": { + "id": 7031, + "nodeType": "Block", + "src": "1282:59:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7028, + "name": "DebtShareSnapshotIdNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6966, + "src": "1303:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:27:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "RevertStatement", + "src": "1296:34:45" + } + ] + } + }, + { + "expression": { + "id": 7033, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "1358:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "functionReturnParameters": 7010, + "id": 7034, + "nodeType": "Return", + "src": "1351:18:45" + } + ] + }, + "id": 7036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShareSnapshotId", + "nameLocation": "1061:23:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7007, + "nodeType": "ParameterList", + "parameters": [], + "src": "1084:2:45" + }, + "returnParameters": { + "id": 7010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7036, + "src": "1110:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7008, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1110:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1109:6:45" + }, + "scope": 7129, + "src": "1052:324:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7095, + "nodeType": "Block", + "src": "1459:543:45", + "statements": [ + { + "assignments": [ + 7043 + ], + "declarations": [ + { + "constant": false, + "id": 7043, + "mutability": "mutable", + "name": "store", + "nameLocation": "1492:5:45", + "nodeType": "VariableDeclaration", + "scope": 7095, + "src": "1469:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7042, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7041, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1469:14:45" + }, + "referencedDeclaration": 6593, + "src": "1469:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7046, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7044, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1500:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1500:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1469:48:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7047, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1532:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1571:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1563:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7048, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1563:7:45", + "typeDescriptions": {} + } + }, + "id": 7051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:10:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1532:41:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7059, + "nodeType": "IfStatement", + "src": "1528:105:45", + "trueBody": { + "id": 7058, + "nodeType": "Block", + "src": "1575:58:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7053, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1596:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1596:24:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:26:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7057, + "nodeType": "RevertStatement", + "src": "1589:33:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7060, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1647:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 7063, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7043, + "src": "1686:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "1686:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + ], + "id": 7062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1678:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1678:7:45", + "typeDescriptions": {} + } + }, + "id": 7065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1678:32:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1647:63:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7073, + "nodeType": "IfStatement", + "src": "1643:123:45", + "trueBody": { + "id": 7072, + "nodeType": "Block", + "src": "1712:54:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7067, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1733:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1733:20:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1733:22:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7071, + "nodeType": "RevertStatement", + "src": "1726:29:45" + } + ] + } + }, + { + "condition": { + "id": 7078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1780:52:45", + "subExpression": { + "arguments": [ + { + "id": 7076, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1804:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7074, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "1781:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 7075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "1781:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 7077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1781:51:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7086, + "nodeType": "IfStatement", + "src": "1776:144:45", + "trueBody": { + "id": 7085, + "nodeType": "Block", + "src": "1834:86:45", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7082, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1881:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7079, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1855:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "1855:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 7083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1855:54:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7084, + "nodeType": "RevertStatement", + "src": "1848:61:45" + } + ] + } + }, + { + "expression": { + "id": 7093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 7087, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7043, + "src": "1930:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "1930:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7091, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1967:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7090, + "name": "IDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6428, + "src": "1956:10:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDebtShare_$6428_$", + "typeString": "type(contract IDebtShare)" + } + }, + "id": 7092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1956:39:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "src": "1930:65:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7094, + "nodeType": "ExpressionStatement", + "src": "1930:65:45" + } + ] + }, + "id": 7096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareContract", + "nameLocation": "1391:21:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7038, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "1421:27:45", + "nodeType": "VariableDeclaration", + "scope": 7096, + "src": "1413:35:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1413:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1412:37:45" + }, + "returnParameters": { + "id": 7040, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:45" + }, + "scope": 7129, + "src": "1382:620:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7127, + "nodeType": "Block", + "src": "2074:225:45", + "statements": [ + { + "assignments": [ + 7105 + ], + "declarations": [ + { + "constant": false, + "id": 7105, + "mutability": "mutable", + "name": "store", + "nameLocation": "2107:5:45", + "nodeType": "VariableDeclaration", + "scope": 7127, + "src": "2084:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7104, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7103, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "2084:14:45" + }, + "referencedDeclaration": 6593, + "src": "2084:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7108, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7106, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2115:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2084:48:45" + }, + { + "assignments": [ + 7110 + ], + "declarations": [ + { + "constant": false, + "id": 7110, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "2151:11:45", + "nodeType": "VariableDeclaration", + "scope": 7127, + "src": "2143:19:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7109, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2143:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7116, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7111, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "2165:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "2165:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7115, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7113, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2184:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2165:43:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2143:65:45" + }, + { + "expression": { + "arguments": [ + { + "id": 7120, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7098, + "src": "2268:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 7123, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7110, + "src": "2279:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 7122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2274:4:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2274:4:45", + "typeDescriptions": {} + } + }, + "id": 7124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2274:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 7117, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "2226:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "2226:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOfOnPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6427, + "src": "2226:41:45", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2226:66:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7102, + "id": 7126, + "nodeType": "Return", + "src": "2219:73:45" + } + ] + }, + "id": 7128, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShare", + "nameLocation": "2017:13:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7099, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7098, + "mutability": "mutable", + "name": "user", + "nameLocation": "2039:4:45", + "nodeType": "VariableDeclaration", + "scope": 7128, + "src": "2031:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7097, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2031:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2030:14:45" + }, + "returnParameters": { + "id": 7102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7101, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7128, + "src": "2068:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7100, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2068:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2067:6:45" + }, + "scope": 7129, + "src": "2008:291:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7130, + "src": "492:1809:45", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6964, + 6966 + ] + } + ], + "src": "31:2271:45" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\n\n/// @dev Defines core functionality for recording votes in ElectionModule.cast()\ncontract ElectionVotes is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _validateCandidates(address[] calldata candidates) internal virtual {\n uint length = candidates.length;\n\n if (length == 0) {\n revert NoCandidates();\n }\n\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n for (uint i = 0; i < length; i++) {\n address candidate = candidates[i];\n\n // Reject candidates that are not nominated.\n if (!nominees.contains(candidate)) {\n revert NotNominated();\n }\n\n // Reject duplicate candidates.\n if (i < length - 1) {\n for (uint j = i + 1; j < length; j++) {\n address otherCandidate = candidates[j];\n\n if (candidate == otherCandidate) {\n revert DuplicateCandidates();\n }\n }\n }\n }\n }\n\n function _recordVote(\n address user,\n uint votePower,\n address[] calldata candidates\n ) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = _calculateBallotId(candidates);\n BallotData storage ballot = _getBallot(ballotId);\n\n // Initialize ballot if new.\n if (!_ballotExists(ballot)) {\n address[] memory newCandidates = candidates;\n\n ballot.candidates = newCandidates;\n\n election.ballotIds.push(ballotId);\n }\n\n ballot.votes += votePower;\n ballot.votesByUser[user] = votePower;\n election.ballotIdsByAddress[user] = ballotId;\n\n return ballotId;\n }\n\n function _withdrawVote(address user, uint votePower) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n ballot.votes -= votePower;\n ballot.votesByUser[user] = 0;\n election.ballotIdsByAddress[user] = bytes32(0);\n\n return ballotId;\n }\n\n function _withdrawCastedVote(address user, uint epochIndex) internal virtual {\n uint castedVotePower = _getCastedVotePower(user);\n\n bytes32 ballotId = _withdrawVote(user, castedVotePower);\n\n emit VoteWithdrawn(user, ballotId, epochIndex, castedVotePower);\n }\n\n function _getCastedVotePower(address user) internal virtual returns (uint votePower) {\n ElectionData storage election = _getCurrentElection();\n\n bytes32 ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n return ballot.votesByUser[user];\n }\n\n function _getVotePower(address) internal view virtual returns (uint) {\n return 1;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionVotes": [ + 6279 + ], + "MathUtil": [ + 1708 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6280, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5963, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5964, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 4684, + "src": "56:28:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 5965, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1697, + "src": "85:69:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 5966, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1709, + "src": "155:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 5967, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 26, + "src": "222:70:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 5968, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 16, + "src": "293:71:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5970, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "473:12:38" + }, + "id": 5971, + "nodeType": "InheritanceSpecifier", + "src": "473:12:38" + } + ], + "canonicalName": "ElectionVotes", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5969, + "nodeType": "StructuredDocumentation", + "src": "366:81:38", + "text": "@dev Defines core functionality for recording votes in ElectionModule.cast()" + }, + "fullyImplemented": true, + "id": 6279, + "linearizedBaseContracts": [ + 6279, + 4683, + 4331 + ], + "name": "ElectionVotes", + "nameLocation": "456:13:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5975, + "libraryName": { + "id": 5972, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "498:7:38" + }, + "nodeType": "UsingForDirective", + "src": "492:37:38", + "typeName": { + "id": 5974, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5973, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "510:18:38" + }, + "referencedDeclaration": 1788, + "src": "510:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 6066, + "nodeType": "Block", + "src": "612:821:38", + "statements": [ + { + "assignments": [ + 5982 + ], + "declarations": [ + { + "constant": false, + "id": 5982, + "mutability": "mutable", + "name": "length", + "nameLocation": "627:6:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "622:11:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5981, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "622:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5985, + "initialValue": { + "expression": { + "id": 5983, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "636:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 5984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "636:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "622:31:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5986, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "668:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "678:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "668:11:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5993, + "nodeType": "IfStatement", + "src": "664:63:38", + "trueBody": { + "id": 5992, + "nodeType": "Block", + "src": "681:46:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5989, + "name": "NoCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4352, + "src": "702:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "702:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5991, + "nodeType": "RevertStatement", + "src": "695:21:38" + } + ] + } + }, + { + "assignments": [ + 5998 + ], + "declarations": [ + { + "constant": false, + "id": 5998, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "764:8:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "737:35:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5996, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "737:18:38" + }, + "referencedDeclaration": 1788, + "src": "737:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 6002, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5999, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "775:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "775:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6001, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "775:30:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "737:68:38" + }, + { + "body": { + "id": 6064, + "nodeType": "Block", + "src": "850:577:38", + "statements": [ + { + "assignments": [ + 6014 + ], + "declarations": [ + { + "constant": false, + "id": 6014, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "872:9:38", + "nodeType": "VariableDeclaration", + "scope": 6064, + "src": "864:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "864:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6018, + "initialValue": { + "baseExpression": { + "id": 6015, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6017, + "indexExpression": { + "id": 6016, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "895:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "884:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "864:33:38" + }, + { + "condition": { + "id": 6023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "973:29:38", + "subExpression": { + "arguments": [ + { + "id": 6021, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "992:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6019, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5998, + "src": "974:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 6020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "974:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 6022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "974:28:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6028, + "nodeType": "IfStatement", + "src": "969:89:38", + "trueBody": { + "id": 6027, + "nodeType": "Block", + "src": "1004:54:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6024, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "1029:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1029:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6026, + "nodeType": "RevertStatement", + "src": "1022:21:38" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6029, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1120:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6030, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1124:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1133:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1124:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1120:14:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6063, + "nodeType": "IfStatement", + "src": "1116:301:38", + "trueBody": { + "id": 6062, + "nodeType": "Block", + "src": "1136:281:38", + "statements": [ + { + "body": { + "id": 6060, + "nodeType": "Block", + "src": "1192:211:38", + "statements": [ + { + "assignments": [ + 6047 + ], + "declarations": [ + { + "constant": false, + "id": 6047, + "mutability": "mutable", + "name": "otherCandidate", + "nameLocation": "1222:14:38", + "nodeType": "VariableDeclaration", + "scope": 6060, + "src": "1214:22:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6046, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1214:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6051, + "initialValue": { + "baseExpression": { + "id": 6048, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "1239:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6050, + "indexExpression": { + "id": 6049, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1250:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1239:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1214:38:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6052, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "1279:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6053, + "name": "otherCandidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "1292:14:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1279:27:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6059, + "nodeType": "IfStatement", + "src": "1275:110:38", + "trueBody": { + "id": 6058, + "nodeType": "Block", + "src": "1308:77:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6055, + "name": "DuplicateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4358, + "src": "1341:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1341:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6057, + "nodeType": "RevertStatement", + "src": "1334:28:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6040, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1175:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6041, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1179:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1175:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6061, + "initializationExpression": { + "assignments": [ + 6035 + ], + "declarations": [ + { + "constant": false, + "id": 6035, + "mutability": "mutable", + "name": "j", + "nameLocation": "1164:1:38", + "nodeType": "VariableDeclaration", + "scope": 6061, + "src": "1159:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6034, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1159:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6039, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6036, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1168:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 6037, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1172:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1168:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1159:14:38" + }, + "loopExpression": { + "expression": { + "id": 6044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1187:3:38", + "subExpression": { + "id": 6043, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1187:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6045, + "nodeType": "ExpressionStatement", + "src": "1187:3:38" + }, + "nodeType": "ForStatement", + "src": "1154:249:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6007, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "833:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6008, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "837:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "833:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6065, + "initializationExpression": { + "assignments": [ + 6004 + ], + "declarations": [ + { + "constant": false, + "id": 6004, + "mutability": "mutable", + "name": "i", + "nameLocation": "826:1:38", + "nodeType": "VariableDeclaration", + "scope": 6065, + "src": "821:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "821:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6006, + "initialValue": { + "hexValue": "30", + "id": 6005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "821:10:38" + }, + "loopExpression": { + "expression": { + "id": 6011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "845:3:38", + "subExpression": { + "id": 6010, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "845:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6012, + "nodeType": "ExpressionStatement", + "src": "845:3:38" + }, + "nodeType": "ForStatement", + "src": "816:611:38" + } + ] + }, + "id": 6067, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCandidates", + "nameLocation": "544:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5978, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "583:10:38", + "nodeType": "VariableDeclaration", + "scope": 6067, + "src": "564:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 5976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "564:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5977, + "nodeType": "ArrayTypeName", + "src": "564:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "563:31:38" + }, + "returnParameters": { + "id": 5980, + "nodeType": "ParameterList", + "parameters": [], + "src": "612:0:38" + }, + "scope": 6279, + "src": "535:898:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6149, + "nodeType": "Block", + "src": "1595:581:38", + "statements": [ + { + "assignments": [ + 6081 + ], + "declarations": [ + { + "constant": false, + "id": 6081, + "mutability": "mutable", + "name": "election", + "nameLocation": "1626:8:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1605:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6080, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6079, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1605:12:38" + }, + "referencedDeclaration": 4299, + "src": "1605:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6084, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6082, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "1637:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1637:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1605:53:38" + }, + { + "expression": { + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6085, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1669:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6087, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1699:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6086, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "1680:18:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 6088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:30:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1669:41:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6090, + "nodeType": "ExpressionStatement", + "src": "1669:41:38" + }, + { + "assignments": [ + 6093 + ], + "declarations": [ + { + "constant": false, + "id": 6093, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1739:6:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1720:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6092, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6091, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1720:10:38" + }, + "referencedDeclaration": 4309, + "src": "1720:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6097, + "initialValue": { + "arguments": [ + { + "id": 6095, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1759:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6094, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "1748:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1748:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1720:48:38" + }, + { + "condition": { + "id": 6101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1820:22:38", + "subExpression": { + "arguments": [ + { + "id": 6099, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1835:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + ], + "id": 6098, + "name": "_ballotExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "1821:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_BallotData_$4309_storage_ptr_$returns$_t_bool_$", + "typeString": "function (struct ElectionStorage.BallotData storage pointer) view returns (bool)" + } + }, + "id": 6100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1821:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6124, + "nodeType": "IfStatement", + "src": "1816:192:38", + "trueBody": { + "id": 6123, + "nodeType": "Block", + "src": "1844:164:38", + "statements": [ + { + "assignments": [ + 6106 + ], + "declarations": [ + { + "constant": false, + "id": 6106, + "mutability": "mutable", + "name": "newCandidates", + "nameLocation": "1875:13:38", + "nodeType": "VariableDeclaration", + "scope": 6123, + "src": "1858:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1858:7:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6105, + "nodeType": "ArrayTypeName", + "src": "1858:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 6108, + "initialValue": { + "id": 6107, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1891:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1858:43:38" + }, + { + "expression": { + "id": 6113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6109, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1916:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1916:17:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6112, + "name": "newCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6106, + "src": "1936:13:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "1916:33:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 6114, + "nodeType": "ExpressionStatement", + "src": "1916:33:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6120, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1988:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 6115, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "1964:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1964:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "1964:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1964:33:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6122, + "nodeType": "ExpressionStatement", + "src": "1964:33:38" + } + ] + } + }, + { + "expression": { + "id": 6129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6125, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2018:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2018:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 6128, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2034:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2018:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6130, + "nodeType": "ExpressionStatement", + "src": "2018:25:38" + }, + { + "expression": { + "id": 6137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6131, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2053:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2053:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6135, + "indexExpression": { + "id": 6133, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2072:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2053:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6136, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2080:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2053:36:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6138, + "nodeType": "ExpressionStatement", + "src": "2053:36:38" + }, + { + "expression": { + "id": 6145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6139, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "2099:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2099:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6143, + "indexExpression": { + "id": 6141, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2127:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2099:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6144, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2135:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2099:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6146, + "nodeType": "ExpressionStatement", + "src": "2099:44:38" + }, + { + "expression": { + "id": 6147, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2161:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6078, + "id": 6148, + "nodeType": "Return", + "src": "2154:15:38" + } + ] + }, + "id": 6150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_recordVote", + "nameLocation": "1448:11:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6069, + "mutability": "mutable", + "name": "user", + "nameLocation": "1477:4:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1469:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6068, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1469:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6071, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "1496:9:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1491:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6070, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1491:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6074, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "1534:10:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1515:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1515:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6073, + "nodeType": "ArrayTypeName", + "src": "1515:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1459:91:38" + }, + "returnParameters": { + "id": 6078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6077, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1585:8:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1577:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1577:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1576:18:38" + }, + "scope": 6279, + "src": "1439:737:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6206, + "nodeType": "Block", + "src": "2279:339:38", + "statements": [ + { + "assignments": [ + 6161 + ], + "declarations": [ + { + "constant": false, + "id": 6161, + "mutability": "mutable", + "name": "election", + "nameLocation": "2310:8:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2289:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6160, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6159, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2289:12:38" + }, + "referencedDeclaration": 4299, + "src": "2289:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6164, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6162, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "2321:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2321:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2289:53:38" + }, + { + "expression": { + "id": 6170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6165, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2353:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "expression": { + "id": 6166, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2364:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2364:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6169, + "indexExpression": { + "id": 6168, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2392:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2364:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2353:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6171, + "nodeType": "ExpressionStatement", + "src": "2353:44:38" + }, + { + "assignments": [ + 6174 + ], + "declarations": [ + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "2426:6:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2407:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6173, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6172, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2407:10:38" + }, + "referencedDeclaration": 4309, + "src": "2407:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6178, + "initialValue": { + "arguments": [ + { + "id": 6176, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2446:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6175, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "2435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2435:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2407:48:38" + }, + { + "expression": { + "id": 6183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6179, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2466:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2466:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 6182, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6154, + "src": "2482:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2466:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6184, + "nodeType": "ExpressionStatement", + "src": "2466:25:38" + }, + { + "expression": { + "id": 6191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6185, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2501:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6188, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2501:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6189, + "indexExpression": { + "id": 6187, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2520:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2501:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 6190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2528:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2501:28:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6192, + "nodeType": "ExpressionStatement", + "src": "2501:28:38" + }, + { + "expression": { + "id": 6202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6193, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2539:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2539:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6197, + "indexExpression": { + "id": 6195, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2567:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2539:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2583:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2575:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6198, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2575:7:38", + "typeDescriptions": {} + } + }, + "id": 6201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2575:10:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2539:46:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6203, + "nodeType": "ExpressionStatement", + "src": "2539:46:38" + }, + { + "expression": { + "id": 6204, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2603:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6158, + "id": 6205, + "nodeType": "Return", + "src": "2596:15:38" + } + ] + }, + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawVote", + "nameLocation": "2191:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6152, + "mutability": "mutable", + "name": "user", + "nameLocation": "2213:4:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2205:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2205:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6154, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2224:9:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2219:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6153, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2219:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2204:30:38" + }, + "returnParameters": { + "id": 6158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6157, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2269:8:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2261:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6156, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2261:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2260:18:38" + }, + "scope": 6279, + "src": "2182:436:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6234, + "nodeType": "Block", + "src": "2701:205:38", + "statements": [ + { + "assignments": [ + 6215 + ], + "declarations": [ + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "castedVotePower", + "nameLocation": "2716:15:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2711:20:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6214, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2711:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6219, + "initialValue": { + "arguments": [ + { + "id": 6217, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2754:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6216, + "name": "_getCastedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6268, + "src": "2734:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 6218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2734:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2711:48:38" + }, + { + "assignments": [ + 6221 + ], + "declarations": [ + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2778:8:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2770:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6220, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2770:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6226, + "initialValue": { + "arguments": [ + { + "id": 6223, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2803:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6224, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2809:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6222, + "name": "_withdrawVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6207, + "src": "2789:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) returns (bytes32)" + } + }, + "id": 6225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2789:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2770:55:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6228, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2855:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6229, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2861:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6230, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6211, + "src": "2871:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6231, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2883:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6227, + "name": "VoteWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4477, + "src": "2841:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2841:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6233, + "nodeType": "EmitStatement", + "src": "2836:63:38" + } + ] + }, + "id": 6235, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawCastedVote", + "nameLocation": "2633:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6209, + "mutability": "mutable", + "name": "user", + "nameLocation": "2661:4:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2653:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6211, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2672:10:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2667:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2667:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2652:31:38" + }, + "returnParameters": { + "id": 6213, + "nodeType": "ParameterList", + "parameters": [], + "src": "2701:0:38" + }, + "scope": 6279, + "src": "2624:282:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6267, + "nodeType": "Block", + "src": "2997:233:38", + "statements": [ + { + "assignments": [ + 6244 + ], + "declarations": [ + { + "constant": false, + "id": 6244, + "mutability": "mutable", + "name": "election", + "nameLocation": "3028:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3007:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6242, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3007:12:38" + }, + "referencedDeclaration": 4299, + "src": "3007:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6247, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6245, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "3039:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3007:53:38" + }, + { + "assignments": [ + 6249 + ], + "declarations": [ + { + "constant": false, + "id": 6249, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "3079:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3071:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6248, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3071:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6254, + "initialValue": { + "baseExpression": { + "expression": { + "id": 6250, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6244, + "src": "3090:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6251, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "3090:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6253, + "indexExpression": { + "id": 6252, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3118:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3090:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3071:52:38" + }, + { + "assignments": [ + 6257 + ], + "declarations": [ + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "3152:6:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3133:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6256, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6255, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "3133:10:38" + }, + "referencedDeclaration": 4309, + "src": "3133:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6261, + "initialValue": { + "arguments": [ + { + "id": 6259, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6249, + "src": "3172:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6258, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "3161:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3133:48:38" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6262, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "3199:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "3199:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6265, + "indexExpression": { + "id": 6264, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3218:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3199:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6241, + "id": 6266, + "nodeType": "Return", + "src": "3192:31:38" + } + ] + }, + "id": 6268, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCastedVotePower", + "nameLocation": "2921:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6237, + "mutability": "mutable", + "name": "user", + "nameLocation": "2949:4:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2941:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6236, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2941:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2940:14:38" + }, + "returnParameters": { + "id": 6241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6240, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2986:9:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2981:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2981:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2980:16:38" + }, + "scope": 6279, + "src": "2912:318:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6277, + "nodeType": "Block", + "src": "3305:25:38", + "statements": [ + { + "expression": { + "hexValue": "31", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3322:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 6274, + "id": 6276, + "nodeType": "Return", + "src": "3315:8:38" + } + ] + }, + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "3245:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6270, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3259:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3258:9:38" + }, + "returnParameters": { + "id": 6274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3299:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3299:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3298:6:38" + }, + "scope": 6279, + "src": "3236:94:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6280, + "src": "447:2885:38", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3302:38" + } + }, + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * Solmate - https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol\n*/\n\nlibrary MathUtil {\n function sqrt(uint256 x) internal pure returns (uint256 z) {\n assembly {\n // Start off with z at 1.\n z := 1\n\n // Used below to help find a nearby power of 2.\n let y := x\n\n // Find the lowest power of 2 that is at least sqrt(x).\n if iszero(lt(y, 0x100000000000000000000000000000000)) {\n y := shr(128, y) // Like dividing by 2 ** 128.\n z := shl(64, z) // Like multiplying by 2 ** 64.\n }\n if iszero(lt(y, 0x10000000000000000)) {\n y := shr(64, y) // Like dividing by 2 ** 64.\n z := shl(32, z) // Like multiplying by 2 ** 32.\n }\n if iszero(lt(y, 0x100000000)) {\n y := shr(32, y) // Like dividing by 2 ** 32.\n z := shl(16, z) // Like multiplying by 2 ** 16.\n }\n if iszero(lt(y, 0x10000)) {\n y := shr(16, y) // Like dividing by 2 ** 16.\n z := shl(8, z) // Like multiplying by 2 ** 8.\n }\n if iszero(lt(y, 0x100)) {\n y := shr(8, y) // Like dividing by 2 ** 8.\n z := shl(4, z) // Like multiplying by 2 ** 4.\n }\n if iszero(lt(y, 0x10)) {\n y := shr(4, y) // Like dividing by 2 ** 4.\n z := shl(2, z) // Like multiplying by 2 ** 2.\n }\n if iszero(lt(y, 0x8)) {\n // Equivalent to 2 ** z.\n z := shl(1, z)\n }\n\n // Shifting right by 1 is like dividing by 2.\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n\n // Compute a rounded down version of z.\n let zRoundDown := div(x, z)\n\n // If zRoundDown is smaller, use it.\n if lt(zRoundDown, z) {\n z := zRoundDown\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "exportedSymbols": { + "MathUtil": [ + 1708 + ] + }, + "id": 1709, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1698, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:22" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MathUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1708, + "linearizedBaseContracts": [ + 1708 + ], + "name": "MathUtil", + "nameLocation": "200:8:22", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1706, + "nodeType": "Block", + "src": "274:2057:22", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "293:2032:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "345:6:22", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "350:1:22", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "345:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "425:10:22", + "value": { + "name": "x", + "nodeType": "YulIdentifier", + "src": "434:1:22" + }, + "variables": [ + { + "name": "y", + "nodeType": "YulTypedName", + "src": "429:1:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "571:142:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "589:16:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "598:3:22", + "type": "", + "value": "128" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "603:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "594:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "594:11:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "589:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "652:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "661:2:22", + "type": "", + "value": "64" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "665:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "657:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "657:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "652:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "530:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "533:35:22", + "type": "", + "value": "0x100000000000000000000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "527:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "527:42:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "520:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "520:50:22" + }, + "nodeType": "YulIf", + "src": "517:196:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "764:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "782:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "791:2:22", + "type": "", + "value": "64" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "795:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "787:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "787:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "782:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "843:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "852:2:22", + "type": "", + "value": "32" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "856:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "848:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "848:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "843:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "739:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "742:19:22", + "type": "", + "value": "0x10000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "736:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "736:26:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "729:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "729:34:22" + }, + "nodeType": "YulIf", + "src": "726:178:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "947:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "965:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "974:2:22", + "type": "", + "value": "32" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "978:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "970:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "970:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "965:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1026:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1035:2:22", + "type": "", + "value": "16" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1039:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1031:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1031:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1026:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "930:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "933:11:22", + "type": "", + "value": "0x100000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "927:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "927:18:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "920:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "920:26:22" + }, + "nodeType": "YulIf", + "src": "917:170:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1126:138:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1144:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1153:2:22", + "type": "", + "value": "16" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1157:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1149:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1149:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1144:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1205:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1214:1:22", + "type": "", + "value": "8" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1217:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1210:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1210:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1205:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1113:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1116:7:22", + "type": "", + "value": "0x10000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1110:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1110:14:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1103:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1103:22:22" + }, + "nodeType": "YulIf", + "src": "1100:164:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1301:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1319:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1328:1:22", + "type": "", + "value": "8" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1331:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1324:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1324:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1319:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1378:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1387:1:22", + "type": "", + "value": "4" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1390:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1383:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1383:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1378:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1290:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1293:5:22", + "type": "", + "value": "0x100" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1287:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1287:12:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1280:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1280:20:22" + }, + "nodeType": "YulIf", + "src": "1277:160:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1473:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1491:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1500:1:22", + "type": "", + "value": "4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1503:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1496:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1496:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1491:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1550:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1559:1:22", + "type": "", + "value": "2" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1562:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1555:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1555:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1550:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1463:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1466:4:22", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1460:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1460:11:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1453:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1453:19:22" + }, + "nodeType": "YulIf", + "src": "1450:159:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1644:87:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1703:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1712:1:22", + "type": "", + "value": "1" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1715:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1708:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1708:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1703:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1635:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1638:3:22", + "type": "", + "value": "0x8" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1632:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1632:10:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1625:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1625:18:22" + }, + "nodeType": "YulIf", + "src": "1622:109:22" + }, + { + "nodeType": "YulAssignment", + "src": "1803:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1812:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1819:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1826:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1829:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1822:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1822:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1815:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1815:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1808:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1808:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1803:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1846:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1855:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1862:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1869:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1872:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1865:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1865:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1858:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1858:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1851:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1851:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1846:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1889:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1898:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1905:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1912:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1915:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1908:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1908:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1901:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1901:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1894:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1894:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1889:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1932:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1941:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1948:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1955:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1958:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1951:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1951:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1944:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1944:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1937:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1937:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1932:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1975:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1984:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1991:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1998:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2001:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1994:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1994:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1987:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1987:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1980:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1980:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1975:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2018:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2027:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2034:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2041:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2044:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2037:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2037:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2030:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2030:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2023:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2023:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2018:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2061:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2070:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2077:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2084:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2087:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2080:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2080:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2073:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2073:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2066:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2066:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2061:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2157:27:22", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2179:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2182:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2175:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2175:9:22" + }, + "variables": [ + { + "name": "zRoundDown", + "nodeType": "YulTypedName", + "src": "2161:10:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2268:47:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2286:15:22", + "value": { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2291:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2286:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2253:10:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2265:1:22" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2250:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "2250:17:22" + }, + "nodeType": "YulIf", + "src": "2247:68:22" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1826:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1869:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1912:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1955:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1998:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2041:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2084:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2179:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "434:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1026:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1039:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1205:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1217:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1378:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1390:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1550:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1562:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1703:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1715:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1803:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1819:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1829:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1846:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1862:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1872:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1889:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1905:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1915:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1932:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1948:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1958:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1975:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1991:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2001:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2018:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2034:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2044:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2061:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2077:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2087:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2182:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2265:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2286:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "345:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "652:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "665:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "843:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "856:1:22", + "valueSize": 1 + } + ], + "id": 1705, + "nodeType": "InlineAssembly", + "src": "284:2041:22" + } + ] + }, + "id": 1707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "224:4:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1700, + "mutability": "mutable", + "name": "x", + "nameLocation": "237:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "229:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "229:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "228:11:22" + }, + "returnParameters": { + "id": 1704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1703, + "mutability": "mutable", + "name": "z", + "nameLocation": "271:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "263:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1702, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "263:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "262:11:22" + }, + "scope": 1708, + "src": "215:2116:22", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1709, + "src": "192:2141:22", + "usedErrors": [] + } + ], + "src": "31:2303:22" + } + }, + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IOwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is Ownable, IOwnerModule, InitializableMixin {\n function _isInitialized() internal view override returns (bool) {\n return _ownableStore().initialized;\n }\n\n function isOwnerModuleInitialized() external view override returns (bool) {\n return _isInitialized();\n }\n\n function initializeOwnerModule(address initialOwner) external override onlyIfNotInitialized {\n nominateNewOwner(initialOwner);\n acceptOwnership();\n\n _ownableStore().initialized = true;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "IOwnerModule": [ + 2791 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "OwnerModule": [ + 4196 + ] + }, + "id": 4197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4143, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:31" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 4144, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 415, + "src": "56:69:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 4145, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 69, + "src": "126:84:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "file": "../interfaces/IOwnerModule.sol", + "id": 4146, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 2792, + "src": "211:40:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4147, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "322:7:31" + }, + "id": 4148, + "nodeType": "InheritanceSpecifier", + "src": "322:7:31" + }, + { + "baseName": { + "id": 4149, + "name": "IOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2791, + "src": "331:12:31" + }, + "id": 4150, + "nodeType": "InheritanceSpecifier", + "src": "331:12:31" + }, + { + "baseName": { + "id": 4151, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "345:18:31" + }, + "id": 4152, + "nodeType": "InheritanceSpecifier", + "src": "345:18:31" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4196, + "linearizedBaseContracts": [ + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "307:11:31", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 4162, + "nodeType": "Block", + "src": "434:51:31", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4158, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "451:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "451:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4157, + "id": 4161, + "nodeType": "Return", + "src": "444:34:31" + } + ] + }, + "id": 4163, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "379:14:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4154, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:31" + }, + "parameters": { + "id": 4153, + "nodeType": "ParameterList", + "parameters": [], + "src": "393:2:31" + }, + "returnParameters": { + "id": 4157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4156, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4163, + "src": "428:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "428:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "427:6:31" + }, + "scope": 4196, + "src": "370:115:31", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2790 + ], + "body": { + "id": 4172, + "nodeType": "Block", + "src": "565:40:31", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4169, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4163 + ], + "referencedDeclaration": 4163, + "src": "582:14:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:16:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4168, + "id": 4171, + "nodeType": "Return", + "src": "575:23:31" + } + ] + }, + "functionSelector": "35eb2824", + "id": 4173, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "500:24:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4165, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "541:8:31" + }, + "parameters": { + "id": 4164, + "nodeType": "ParameterList", + "parameters": [], + "src": "524:2:31" + }, + "returnParameters": { + "id": 4168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4167, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4173, + "src": "559:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4166, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "559:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "558:6:31" + }, + "scope": 4196, + "src": "491:114:31", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2785 + ], + "body": { + "id": 4194, + "nodeType": "Block", + "src": "703:119:31", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4182, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4175, + "src": "730:12:31", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4181, + "name": "nominateNewOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "713:16:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "713:30:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4184, + "nodeType": "ExpressionStatement", + "src": "713:30:31" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4185, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "753:15:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "753:17:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4187, + "nodeType": "ExpressionStatement", + "src": "753:17:31" + }, + { + "expression": { + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4188, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "781:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "781:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4190, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "781:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 4191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "811:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "781:34:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4193, + "nodeType": "ExpressionStatement", + "src": "781:34:31" + } + ] + }, + "functionSelector": "624bd96d", + "id": 4195, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4179, + "kind": "modifierInvocation", + "modifierName": { + "id": 4178, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "682:20:31" + }, + "nodeType": "ModifierInvocation", + "src": "682:20:31" + } + ], + "name": "initializeOwnerModule", + "nameLocation": "620:21:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "673:8:31" + }, + "parameters": { + "id": 4176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4175, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "650:12:31", + "nodeType": "VariableDeclaration", + "scope": 4195, + "src": "642:20:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "642:7:31", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "641:22:31" + }, + "returnParameters": { + "id": 4180, + "nodeType": "ParameterList", + "parameters": [], + "src": "703:0:31" + }, + "scope": 4196, + "src": "611:211:31", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4197, + "src": "298:526:31", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:794:31" + } + }, + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../errors/InitError.sol\";\n\nabstract contract InitializableMixin {\n modifier onlyIfInitialized() {\n if (!_isInitialized()) {\n revert InitError.NotInitialized();\n }\n\n _;\n }\n\n modifier onlyIfNotInitialized() {\n if (_isInitialized()) {\n revert InitError.AlreadyInitialized();\n }\n\n _;\n }\n\n function _isInitialized() internal view virtual returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "exportedSymbols": { + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ] + }, + "id": 69, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 34, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:5" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 35, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 69, + "sourceUnit": 33, + "src": "56:33:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "InitializableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 68, + "linearizedBaseContracts": [ + 68 + ], + "name": "InitializableMixin", + "nameLocation": "109:18:5", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 48, + "nodeType": "Block", + "src": "163:109:5", + "statements": [ + { + "condition": { + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "177:17:5", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 37, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "178:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "178:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 46, + "nodeType": "IfStatement", + "src": "173:81:5", + "trueBody": { + "id": 45, + "nodeType": "Block", + "src": "196:58:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 40, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "217:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "217:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "217:26:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 44, + "nodeType": "RevertStatement", + "src": "210:33:5" + } + ] + } + }, + { + "id": 47, + "nodeType": "PlaceholderStatement", + "src": "264:1:5" + } + ] + }, + "id": 49, + "name": "onlyIfInitialized", + "nameLocation": "143:17:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 36, + "nodeType": "ParameterList", + "parameters": [], + "src": "160:2:5" + }, + "src": "134:138:5", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "310:112:5", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "324:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59, + "nodeType": "IfStatement", + "src": "320:84:5", + "trueBody": { + "id": 58, + "nodeType": "Block", + "src": "342:62:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 53, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "363:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "363:28:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "363:30:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 57, + "nodeType": "RevertStatement", + "src": "356:37:5" + } + ] + } + }, + { + "id": 60, + "nodeType": "PlaceholderStatement", + "src": "414:1:5" + } + ] + }, + "id": 62, + "name": "onlyIfNotInitialized", + "nameLocation": "287:20:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "307:2:5" + }, + "src": "278:144:5", + "virtual": false, + "visibility": "internal" + }, + { + "id": 67, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "437:14:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "451:2:5" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "485:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "485:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "484:6:5" + }, + "scope": 68, + "src": "428:63:5", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 69, + "src": "91:402:5", + "usedErrors": [] + } + ], + "src": "31:463:5" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnerModule {\n function initializeOwnerModule(address initialOwner) external;\n\n function isOwnerModuleInitialized() external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "exportedSymbols": { + "IOwnerModule": [ + 2791 + ] + }, + "id": 2792, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2780, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:28" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnerModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2791, + "linearizedBaseContracts": [ + 2791 + ], + "name": "IOwnerModule", + "nameLocation": "66:12:28", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "624bd96d", + "id": 2785, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeOwnerModule", + "nameLocation": "94:21:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2783, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2782, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "124:12:28", + "nodeType": "VariableDeclaration", + "scope": 2785, + "src": "116:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "116:7:28", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "115:22:28" + }, + "returnParameters": { + "id": 2784, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:28" + }, + "scope": 2791, + "src": "85:62:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "35eb2824", + "id": 2790, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "162:24:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "186:2:28" + }, + "returnParameters": { + "id": 2789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2790, + "src": "212:4:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2787, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "212:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "211:6:28" + }, + "scope": 2791, + "src": "153:65:28", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2792, + "src": "56:164:28", + "usedErrors": [] + } + ], + "src": "31:190:28" + } + }, + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\n\ncontract UpgradeModule is UUPSImplementation, OwnableMixin {\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ], + "UpgradeModule": [ + 4218 + ] + }, + "id": 4219, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:32" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 4199, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 757, + "src": "56:76:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 4200, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 477, + "src": "133:74:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4201, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "235:18:32" + }, + "id": 4202, + "nodeType": "InheritanceSpecifier", + "src": "235:18:32" + }, + { + "baseName": { + "id": 4203, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "255:12:32" + }, + "id": 4204, + "nodeType": "InheritanceSpecifier", + "src": "255:12:32" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4218, + "linearizedBaseContracts": [ + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "218:13:32", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 4216, + "nodeType": "Block", + "src": "346:46:32", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4213, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "367:17:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4212, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "356:10:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "356:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "356:29:32" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 4217, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4210, + "kind": "modifierInvocation", + "modifierName": { + "id": 4209, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "336:9:32" + }, + "nodeType": "ModifierInvocation", + "src": "336:9:32" + } + ], + "name": "upgradeTo", + "nameLocation": "283:9:32", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "327:8:32" + }, + "parameters": { + "id": 4207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4206, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "301:17:32", + "nodeType": "VariableDeclaration", + "scope": 4217, + "src": "293:25:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "293:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "292:27:32" + }, + "returnParameters": { + "id": 4211, + "nodeType": "ParameterList", + "parameters": [], + "src": "346:0:32" + }, + "scope": 4218, + "src": "274:118:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 4219, + "src": "209:185:32", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:364:32" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IElectionModule.sol\";\nimport \"../submodules/election/ElectionSchedule.sol\";\nimport \"../submodules/election/ElectionCredentials.sol\";\nimport \"../submodules/election/ElectionVotes.sol\";\nimport \"../submodules/election/ElectionTally.sol\";\n\ncontract ElectionModule is\n IElectionModule,\n ElectionSchedule,\n ElectionCredentials,\n ElectionVotes,\n ElectionTally,\n OwnableMixin,\n InitializableMixin\n{\n using SetUtil for SetUtil.AddressSet;\n\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external virtual override onlyOwner onlyIfNotInitialized {\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n function _initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n ElectionStore storage store = _electionStore();\n\n uint8 seatCount = uint8(firstCouncil.length);\n if (minimumActiveMembers == 0 || minimumActiveMembers > seatCount) {\n revert InvalidMinimumActiveMembers();\n }\n\n ElectionSettings storage settings = _electionSettings();\n settings.minNominationPeriodDuration = 2 days;\n settings.minVotingPeriodDuration = 2 days;\n settings.minEpochDuration = 7 days;\n settings.maxDateAdjustmentTolerance = 7 days;\n settings.nextEpochSeatCount = uint8(firstCouncil.length);\n settings.minimumActiveMembers = minimumActiveMembers;\n settings.defaultBallotEvaluationBatchSize = 500;\n\n _createNewEpoch();\n\n EpochData storage firstEpoch = _getEpochAtIndex(0);\n uint64 epochStartDate = uint64(block.timestamp);\n _configureEpochSchedule(firstEpoch, epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n _createCouncilToken(councilTokenName, councilTokenSymbol);\n _addCouncilMembers(firstCouncil, 0);\n\n store.initialized = true;\n\n emit ElectionModuleInitialized();\n emit EpochStarted(0);\n }\n\n function isElectionModuleInitialized() public view override returns (bool) {\n return _isInitialized();\n }\n\n function _isInitialized() internal view override returns (bool) {\n return _electionStore().initialized;\n }\n\n function upgradeCouncilToken(address newCouncilTokenImplementation) external override onlyOwner onlyIfInitialized {\n CouncilToken(_electionStore().councilToken).upgradeTo(newCouncilTokenImplementation);\n\n emit CouncilTokenUpgraded(newCouncilTokenImplementation);\n }\n\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n true /*ensureChangesAreSmall = true*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n false /*!ensureChangesAreSmall = false*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external override onlyOwner {\n _setMinEpochDurations(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n\n emit MinimumEpochDurationsChanged(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n }\n\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external override onlyOwner {\n if (newMaxDateAdjustmentTolerance == 0) revert InvalidElectionSettings();\n\n _electionSettings().maxDateAdjustmentTolerance = newMaxDateAdjustmentTolerance;\n\n emit MaxDateAdjustmentToleranceChanged(newMaxDateAdjustmentTolerance);\n }\n\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external override onlyOwner {\n if (newDefaultBallotEvaluationBatchSize == 0) revert InvalidElectionSettings();\n\n _electionSettings().defaultBallotEvaluationBatchSize = newDefaultBallotEvaluationBatchSize;\n\n emit DefaultBallotEvaluationBatchSizeChanged(newDefaultBallotEvaluationBatchSize);\n }\n\n function setNextEpochSeatCount(uint8 newSeatCount)\n external\n override\n onlyOwner\n onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination)\n {\n if (newSeatCount == 0) revert InvalidElectionSettings();\n\n _electionSettings().nextEpochSeatCount = newSeatCount;\n\n emit NextEpochSeatCountChanged(newSeatCount);\n }\n\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external override onlyOwner {\n if (newMinimumActiveMembers == 0) revert InvalidMinimumActiveMembers();\n\n _electionSettings().minimumActiveMembers = newMinimumActiveMembers;\n\n emit MinimumActiveMembersChanged(newMinimumActiveMembers);\n }\n\n function dismissMembers(address[] calldata membersToDismiss) external override onlyOwner {\n uint epochIndex = _getCurrentEpochIndex();\n\n _removeCouncilMembers(membersToDismiss, epochIndex);\n\n emit CouncilMembersDismissed(membersToDismiss, epochIndex);\n\n // Don't immediately jump to an election if the council still has enough members\n if (_getCurrentPeriod() != ElectionPeriod.Administration) return;\n if (_electionStore().councilMembers.length() >= _electionSettings().minimumActiveMembers) return;\n\n _jumpToNominationPeriod();\n\n emit EmergencyElectionStarted(epochIndex);\n }\n\n function nominate() public virtual override onlyInPeriods(ElectionPeriod.Nomination, ElectionPeriod.Vote) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (nominees.contains(msg.sender)) revert AlreadyNominated();\n\n nominees.add(msg.sender);\n\n emit CandidateNominated(msg.sender, _getCurrentEpochIndex());\n }\n\n function withdrawNomination() external override onlyInPeriod(ElectionPeriod.Nomination) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (!nominees.contains(msg.sender)) revert NotNominated();\n\n nominees.remove(msg.sender);\n\n emit NominationWithdrawn(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionVotes needs to be extended to specify what determines voting power\n function cast(address[] calldata candidates) public virtual override onlyInPeriod(ElectionPeriod.Vote) {\n _cast(msg.sender, candidates);\n }\n\n function _cast(address user, address[] calldata candidates) internal virtual {\n uint votePower = _getVotePower(user);\n\n if (votePower == 0) revert NoVotePower();\n\n _validateCandidates(candidates);\n\n bytes32 ballotId;\n\n uint epochIndex = _getCurrentEpochIndex();\n\n if (hasVoted(user)) {\n _withdrawCastedVote(user, epochIndex);\n }\n\n ballotId = _recordVote(user, votePower, candidates);\n\n emit VoteRecorded(user, ballotId, epochIndex, votePower);\n }\n\n function withdrawVote() external override onlyInPeriod(ElectionPeriod.Vote) {\n if (!hasVoted(msg.sender)) {\n revert VoteNotCasted();\n }\n\n _withdrawCastedVote(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionTally needs to be extended to specify how votes are counted\n function evaluate(uint numBallots) external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (election.evaluated) revert ElectionAlreadyEvaluated();\n\n _evaluateNextBallotBatch(numBallots);\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n\n uint totalBallots = election.ballotIds.length;\n if (election.numEvaluatedBallots < totalBallots) {\n emit ElectionBatchEvaluated(currentEpochIndex, election.numEvaluatedBallots, totalBallots);\n } else {\n election.evaluated = true;\n\n emit ElectionEvaluated(currentEpochIndex, totalBallots);\n }\n }\n\n /// @dev Burns previous NFTs and mints new ones\n function resolve() external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (!election.evaluated) revert ElectionNotEvaluated();\n\n uint newEpochIndex = _getCurrentEpochIndex() + 1;\n\n _removeAllCouncilMembers(newEpochIndex);\n _addCouncilMembers(election.winners.values(), newEpochIndex);\n\n election.resolved = true;\n\n _createNewEpoch();\n _copyScheduleFromPreviousEpoch();\n\n emit EpochStarted(newEpochIndex);\n }\n\n function getMinEpochDurations()\n external\n view\n override\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n )\n {\n ElectionSettings storage settings = _electionSettings();\n\n return (settings.minNominationPeriodDuration, settings.minVotingPeriodDuration, settings.minEpochDuration);\n }\n\n function getMaxDateAdjustmentTolerance() external view override returns (uint64) {\n return _electionSettings().maxDateAdjustmentTolerance;\n }\n\n function getDefaultBallotEvaluationBatchSize() external view override returns (uint) {\n return _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n function getNextEpochSeatCount() external view override returns (uint8) {\n return _electionSettings().nextEpochSeatCount;\n }\n\n function getMinimumActiveMembers() external view override returns (uint8) {\n return _electionSettings().minimumActiveMembers;\n }\n\n function getEpochIndex() external view override returns (uint) {\n return _getCurrentEpochIndex();\n }\n\n function getEpochStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().startDate;\n }\n\n function getEpochEndDate() external view override returns (uint64) {\n return _getCurrentEpoch().endDate;\n }\n\n function getNominationPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().votingPeriodStartDate;\n }\n\n function getCurrentPeriod() external view override returns (uint) {\n return uint(_getCurrentPeriod());\n }\n\n function isNominated(address candidate) external view override returns (bool) {\n return _getCurrentElection().nominees.contains(candidate);\n }\n\n function getNominees() external view override returns (address[] memory) {\n return _getCurrentElection().nominees.values();\n }\n\n function calculateBallotId(address[] calldata candidates) external pure override returns (bytes32) {\n return _calculateBallotId(candidates);\n }\n\n function getBallotVoted(address user) public view override returns (bytes32) {\n return _getBallotVoted(user);\n }\n\n function hasVoted(address user) public view override returns (bool) {\n return _getBallotVoted(user) != bytes32(0);\n }\n\n function getVotePower(address user) external view override returns (uint) {\n return _getVotePower(user);\n }\n\n function getBallotVotes(bytes32 ballotId) external view override returns (uint) {\n return _getBallot(ballotId).votes;\n }\n\n function getBallotCandidates(bytes32 ballotId) external view override returns (address[] memory) {\n return _getBallot(ballotId).candidates;\n }\n\n function isElectionEvaluated() public view override returns (bool) {\n return _getCurrentElection().evaluated;\n }\n\n function getCandidateVotes(address candidate) external view override returns (uint) {\n return _getCurrentElection().candidateVotes[candidate];\n }\n\n function getElectionWinners() external view override returns (address[] memory) {\n return _getCurrentElection().winners.values();\n }\n\n function getCouncilToken() public view override returns (address) {\n return _electionStore().councilToken;\n }\n\n function getCouncilMembers() external view override returns (address[] memory) {\n return _electionStore().councilMembers.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionModule": [ + 4141 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "ElectionVotes": [ + 6279 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IElectionModule": [ + 2778 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "MathUtil": [ + 1708 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 4142, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3007, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:30" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 3008, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 33, + "src": "56:68:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 3009, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 477, + "src": "125:74:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 3010, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 69, + "src": "200:84:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "../interfaces/IElectionModule.sol", + "id": 3011, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 2779, + "src": "285:43:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "file": "../submodules/election/ElectionSchedule.sol", + "id": 3012, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5631, + "src": "329:53:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "file": "../submodules/election/ElectionCredentials.sol", + "id": 3013, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5066, + "src": "383:56:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "file": "../submodules/election/ElectionVotes.sol", + "id": 3014, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 6280, + "src": "440:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "file": "../submodules/election/ElectionTally.sol", + "id": 3015, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5962, + "src": "491:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 3016, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "574:15:30" + }, + "id": 3017, + "nodeType": "InheritanceSpecifier", + "src": "574:15:30" + }, + { + "baseName": { + "id": 3018, + "name": "ElectionSchedule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5630, + "src": "595:16:30" + }, + "id": 3019, + "nodeType": "InheritanceSpecifier", + "src": "595:16:30" + }, + { + "baseName": { + "id": 3020, + "name": "ElectionCredentials", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5065, + "src": "617:19:30" + }, + "id": 3021, + "nodeType": "InheritanceSpecifier", + "src": "617:19:30" + }, + { + "baseName": { + "id": 3022, + "name": "ElectionVotes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6279, + "src": "642:13:30" + }, + "id": 3023, + "nodeType": "InheritanceSpecifier", + "src": "642:13:30" + }, + { + "baseName": { + "id": 3024, + "name": "ElectionTally", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5961, + "src": "661:13:30" + }, + "id": 3025, + "nodeType": "InheritanceSpecifier", + "src": "661:13:30" + }, + { + "baseName": { + "id": 3026, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "680:12:30" + }, + "id": 3027, + "nodeType": "InheritanceSpecifier", + "src": "680:12:30" + }, + { + "baseName": { + "id": 3028, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "698:18:30" + }, + "id": 3029, + "nodeType": "InheritanceSpecifier", + "src": "698:18:30" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 6379 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4141, + "linearizedBaseContracts": [ + 4141, + 68, + 476, + 494, + 5961, + 6279, + 5065, + 5630, + 4683, + 4331, + 2778 + ], + "name": "ElectionModule", + "nameLocation": "552:14:30", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3033, + "libraryName": { + "id": 3030, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "729:7:30" + }, + "nodeType": "UsingForDirective", + "src": "723:37:30", + "typeName": { + "id": 3032, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3031, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "741:18:30" + }, + "referencedDeclaration": 1788, + "src": "741:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2506 + ], + "body": { + "id": 3066, + "nodeType": "Block", + "src": "1129:274:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3057, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3035, + "src": "1178:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3058, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "1208:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3059, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3040, + "src": "1240:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3060, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3042, + "src": "1266:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3061, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3044, + "src": "1300:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3062, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "1339:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3063, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "1374:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3056, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "1139:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 3064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1139:257:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3065, + "nodeType": "ExpressionStatement", + "src": "1139:257:30" + } + ] + }, + "functionSelector": "ee695137", + "id": 3067, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3052, + "kind": "modifierInvocation", + "modifierName": { + "id": 3051, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1098:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "1098:9:30" + }, + { + "id": 3054, + "kind": "modifierInvocation", + "modifierName": { + "id": 3053, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1108:20:30" + }, + "nodeType": "ModifierInvocation", + "src": "1108:20:30" + } + ], + "name": "initializeElectionModule", + "nameLocation": "775:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1089:8:30" + }, + "parameters": { + "id": 3049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3035, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "823:16:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "809:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3034, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3037, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "863:18:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "849:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "849:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3040, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "908:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "891:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3039, + "nodeType": "ArrayTypeName", + "src": "891:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3042, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "936:20:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "930:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3041, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "930:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3044, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "973:25:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "966:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3043, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "966:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3046, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1015:21:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1008:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3045, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1008:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3048, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1053:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1046:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3047, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1046:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "799:272:30" + }, + "returnParameters": { + "id": 3055, + "nodeType": "ParameterList", + "parameters": [], + "src": "1129:0:30" + }, + "scope": 4141, + "src": "766:637:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 3212, + "nodeType": "Block", + "src": "1725:1202:30", + "statements": [ + { + "assignments": [ + 3087 + ], + "declarations": [ + { + "constant": false, + "id": 3087, + "mutability": "mutable", + "name": "store", + "nameLocation": "1757:5:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1735:27:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 3086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3085, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "1735:13:30" + }, + "referencedDeclaration": 4246, + "src": "1735:13:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 3090, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3088, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1765:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1765:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1735:46:30" + }, + { + "assignments": [ + 3092 + ], + "declarations": [ + { + "constant": false, + "id": 3092, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "1798:9:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1792:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3091, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1792:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3098, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3095, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "1816:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1816:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1810:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3093, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1810:5:30", + "typeDescriptions": {} + } + }, + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1810:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1792:44:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3099, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1850:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1874:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1850:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3102, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1879:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3103, + "name": "seatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3092, + "src": "1902:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1879:32:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1850:61:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3110, + "nodeType": "IfStatement", + "src": "1846:128:30", + "trueBody": { + "id": 3109, + "nodeType": "Block", + "src": "1913:61:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3106, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "1934:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3108, + "nodeType": "RevertStatement", + "src": "1927:36:30" + } + ] + } + }, + { + "assignments": [ + 3113 + ], + "declarations": [ + { + "constant": false, + "id": 3113, + "mutability": "mutable", + "name": "settings", + "nameLocation": "2009:8:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1984:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3112, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3111, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1984:16:30" + }, + "referencedDeclaration": 4261, + "src": "1984:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3116, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3114, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "2020:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2020:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1984:55:30" + }, + { + "expression": { + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3117, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2049:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "2049:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2088:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2049:45:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3122, + "nodeType": "ExpressionStatement", + "src": "2049:45:30" + }, + { + "expression": { + "id": 3127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3123, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2104:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3125, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "2104:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2139:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2104:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3128, + "nodeType": "ExpressionStatement", + "src": "2104:41:30" + }, + { + "expression": { + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3129, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2155:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "2155:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2183:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2155:34:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3134, + "nodeType": "ExpressionStatement", + "src": "2155:34:30" + }, + { + "expression": { + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3135, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2199:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "2199:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2237:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2199:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3140, + "nodeType": "ExpressionStatement", + "src": "2199:44:30" + }, + { + "expression": { + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3141, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2253:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "2253:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3146, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2289:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2289:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2283:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3144, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2283:5:30", + "typeDescriptions": {} + } + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2283:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2253:56:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3150, + "nodeType": "ExpressionStatement", + "src": "2253:56:30" + }, + { + "expression": { + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3151, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2319:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "2319:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3154, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "2351:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2319:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3156, + "nodeType": "ExpressionStatement", + "src": "2319:52:30" + }, + { + "expression": { + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3157, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2381:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3159, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "2381:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "353030", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2425:3:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_500_by_1", + "typeString": "int_const 500" + }, + "value": "500" + }, + "src": "2381:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "2381:47:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3163, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "2439:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2439:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "2439:17:30" + }, + { + "assignments": [ + 3168 + ], + "declarations": [ + { + "constant": false, + "id": 3168, + "mutability": "mutable", + "name": "firstEpoch", + "nameLocation": "2485:10:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2467:28:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 3167, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3166, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "2467:9:30" + }, + "referencedDeclaration": 4270, + "src": "2467:9:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 3172, + "initialValue": { + "arguments": [ + { + "hexValue": "30", + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2515:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3169, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "2498:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2498:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2467:50:30" + }, + { + "assignments": [ + 3174 + ], + "declarations": [ + { + "constant": false, + "id": 3174, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2534:14:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2527:21:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3173, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2527:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 3180, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3177, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2558:5:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2558:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2551:6:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 3175, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2551:6:30", + "typeDescriptions": {} + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2527:47:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3182, + "name": "firstEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3168, + "src": "2608:10:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3183, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3174, + "src": "2620:14:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3184, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "2636:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3185, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3080, + "src": "2663:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3186, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "2686:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3181, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "2584:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2584:115:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "2584:115:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3190, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "2730:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3191, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "2748:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3189, + "name": "_createCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2710:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2710:57:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3193, + "nodeType": "ExpressionStatement", + "src": "2710:57:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3195, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2796:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "hexValue": "30", + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3194, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "2777:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2777:35:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3198, + "nodeType": "ExpressionStatement", + "src": "2777:35:30" + }, + { + "expression": { + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3199, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "2823:5:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "2823:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2843:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2823:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "2823:24:30" + }, + { + "eventCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3205, + "name": "ElectionModuleInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4380, + "src": "2863:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2863:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3207, + "nodeType": "EmitStatement", + "src": "2858:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "30", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2918:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3208, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2905:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3211, + "nodeType": "EmitStatement", + "src": "2900:20:30" + } + ] + }, + "id": 3213, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initializeElectionModule", + "nameLocation": "1418:25:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3069, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1467:16:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1453:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1453:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3071, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1507:18:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1493:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3070, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1493:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "1552:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1535:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1535:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3073, + "nodeType": "ArrayTypeName", + "src": "1535:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3076, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1580:20:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1574:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3075, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1574:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3078, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1617:25:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1610:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3077, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1610:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3080, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1659:21:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1652:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3079, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1652:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1697:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1690:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3081, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1690:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1443:272:30" + }, + "returnParameters": { + "id": 3084, + "nodeType": "ParameterList", + "parameters": [], + "src": "1725:0:30" + }, + "scope": 4141, + "src": "1409:1518:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2512 + ], + "body": { + "id": 3222, + "nodeType": "Block", + "src": "3008:40:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3219, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3234 + ], + "referencedDeclaration": 3234, + "src": "3025:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3025:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3218, + "id": 3221, + "nodeType": "Return", + "src": "3018:23:30" + } + ] + }, + "functionSelector": "c5798523", + "id": 3223, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "2942:27:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3215, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2984:8:30" + }, + "parameters": { + "id": 3214, + "nodeType": "ParameterList", + "parameters": [], + "src": "2969:2:30" + }, + "returnParameters": { + "id": 3218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3223, + "src": "3002:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3216, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3002:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3001:6:30" + }, + "scope": 4141, + "src": "2933:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 3233, + "nodeType": "Block", + "src": "3118:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3229, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3135:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3135:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "3135:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3228, + "id": 3232, + "nodeType": "Return", + "src": "3128:35:30" + } + ] + }, + "id": 3234, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "3063:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3225, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3094:8:30" + }, + "parameters": { + "id": 3224, + "nodeType": "ParameterList", + "parameters": [], + "src": "3077:2:30" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3234, + "src": "3112:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3226, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3112:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3111:6:30" + }, + "scope": 4141, + "src": "3054:116:30", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2518 + ], + "body": { + "id": 3257, + "nodeType": "Block", + "src": "3290:168:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3250, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3354:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3245, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3313:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3247, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3313:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3244, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3300:12:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:43:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6321, + "src": "3300:53:30", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:84:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3252, + "nodeType": "ExpressionStatement", + "src": "3300:84:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3254, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3421:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3253, + "name": "CouncilTokenUpgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "3400:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3256, + "nodeType": "EmitStatement", + "src": "3395:56:30" + } + ] + }, + "functionSelector": "54520478", + "id": 3258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3240, + "kind": "modifierInvocation", + "modifierName": { + "id": 3239, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3262:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3262:9:30" + }, + { + "id": 3242, + "kind": "modifierInvocation", + "modifierName": { + "id": 3241, + "name": "onlyIfInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 49, + "src": "3272:17:30" + }, + "nodeType": "ModifierInvocation", + "src": "3272:17:30" + } + ], + "name": "upgradeCouncilToken", + "nameLocation": "3185:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3238, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3253:8:30" + }, + "parameters": { + "id": 3237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3236, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "3213:29:30", + "nodeType": "VariableDeclaration", + "scope": 3258, + "src": "3205:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3204:39:30" + }, + "returnParameters": { + "id": 3243, + "nodeType": "ParameterList", + "parameters": [], + "src": "3290:0:30" + }, + "scope": 4141, + "src": "3176:282:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2528 + ], + "body": { + "id": 3291, + "nodeType": "Block", + "src": "3716:348:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3277, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "3760:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3760:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3279, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3792:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3280, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "3834:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3281, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "3872:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "74727565", + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3276, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3726:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3726:222:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3284, + "nodeType": "ExpressionStatement", + "src": "3726:222:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3286, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3985:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3287, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "4015:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3288, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "4041:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3285, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "3964:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3964:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3290, + "nodeType": "EmitStatement", + "src": "3959:98:30" + } + ] + }, + "functionSelector": "8f701997", + "id": 3292, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3268, + "kind": "modifierInvocation", + "modifierName": { + "id": 3267, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3634:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3634:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3270, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3658:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "3658:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3272, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "3689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3274, + "kind": "modifierInvocation", + "modifierName": { + "id": 3269, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "3644:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "3644:71:30" + } + ], + "name": "tweakEpochSchedule", + "nameLocation": "3473:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3266, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3625:8:30" + }, + "parameters": { + "id": 3265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3260, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3508:28:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3501:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3259, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3501:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3262, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3553:24:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3546:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3261, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3546:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3264, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3594:15:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3587:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3263, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3587:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3491:124:30" + }, + "returnParameters": { + "id": 3275, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:0:30" + }, + "scope": 4141, + "src": "3464:600:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2538 + ], + "body": { + "id": 3325, + "nodeType": "Block", + "src": "4323:351:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3311, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "4367:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4367:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3313, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4399:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3314, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4441:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3315, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4479:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "66616c7365", + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4508:5:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3310, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "4333:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4333:225:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3318, + "nodeType": "ExpressionStatement", + "src": "4333:225:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3320, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4595:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3321, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4625:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3322, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4651:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3319, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "4574:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4574:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3324, + "nodeType": "EmitStatement", + "src": "4569:98:30" + } + ] + }, + "functionSelector": "c14d0528", + "id": 3326, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3302, + "kind": "modifierInvocation", + "modifierName": { + "id": 3301, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4241:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4241:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3304, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4265:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "4265:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3306, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4296:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "4296:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3308, + "kind": "modifierInvocation", + "modifierName": { + "id": 3303, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "4251:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "4251:71:30" + } + ], + "name": "modifyEpochSchedule", + "nameLocation": "4079:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3300, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4232:8:30" + }, + "parameters": { + "id": 3299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3294, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "4115:28:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4108:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3293, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4108:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3296, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "4160:24:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4153:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3295, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4153:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3298, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "4201:15:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4194:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3297, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4194:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4098:124:30" + }, + "returnParameters": { + "id": 3309, + "nodeType": "ParameterList", + "parameters": [], + "src": "4323:0:30" + }, + "scope": 4141, + "src": "4070:604:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2548 + ], + "body": { + "id": 3350, + "nodeType": "Block", + "src": "4870:244:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3339, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "4902:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3340, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "4934:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3341, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "4962:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3338, + "name": "_setMinEpochDurations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5563, + "src": "4880:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4880:102:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3343, + "nodeType": "ExpressionStatement", + "src": "4880:102:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3345, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "5027:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3346, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "5059:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3347, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "5087:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3344, + "name": "MinimumEpochDurationsChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4429, + "src": "4998:28:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4998:109:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3349, + "nodeType": "EmitStatement", + "src": "4993:114:30" + } + ] + }, + "functionSelector": "a25a9f3a", + "id": 3351, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3336, + "kind": "modifierInvocation", + "modifierName": { + "id": 3335, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4860:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4860:9:30" + } + ], + "name": "setMinEpochDurations", + "nameLocation": "4689:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3334, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4851:8:30" + }, + "parameters": { + "id": 3333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3328, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "4726:30:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4719:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3327, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4719:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3330, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "4773:26:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4766:33:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3329, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4766:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3332, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "4816:19:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4809:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4709:132:30" + }, + "returnParameters": { + "id": 3337, + "nodeType": "ParameterList", + "parameters": [], + "src": "4870:0:30" + }, + "scope": 4141, + "src": "4680:434:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2554 + ], + "body": { + "id": 3376, + "nodeType": "Block", + "src": "5225:258:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3359, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5239:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5272:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5239:34:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3365, + "nodeType": "IfStatement", + "src": "5235:72:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3362, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5282:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5282:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3364, + "nodeType": "RevertStatement", + "src": "5275:32:30" + } + }, + { + "expression": { + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3366, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5318:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5318:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3368, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "5318:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3369, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5367:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5318:78:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3371, + "nodeType": "ExpressionStatement", + "src": "5318:78:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3373, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5446:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3372, + "name": "MaxDateAdjustmentToleranceChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4433, + "src": "5412:33:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$returns$__$", + "typeString": "function (uint64)" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:64:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3375, + "nodeType": "EmitStatement", + "src": "5407:69:30" + } + ] + }, + "functionSelector": "3ac1c5fe", + "id": 3377, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3357, + "kind": "modifierInvocation", + "modifierName": { + "id": 3356, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5215:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5215:9:30" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "5129:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3355, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5206:8:30" + }, + "parameters": { + "id": 3354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3353, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "5166:29:30", + "nodeType": "VariableDeclaration", + "scope": 3377, + "src": "5159:36:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3352, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5159:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5158:38:30" + }, + "returnParameters": { + "id": 3358, + "nodeType": "ParameterList", + "parameters": [], + "src": "5225:0:30" + }, + "scope": 4141, + "src": "5120:363:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2560 + ], + "body": { + "id": 3402, + "nodeType": "Block", + "src": "5604:288:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3385, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5618:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5657:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5618:40:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3391, + "nodeType": "IfStatement", + "src": "5614:78:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3388, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5667:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5667:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3390, + "nodeType": "RevertStatement", + "src": "5660:32:30" + } + }, + { + "expression": { + "id": 3396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3392, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5703:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "5703:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3395, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5758:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5703:90:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3397, + "nodeType": "ExpressionStatement", + "src": "5703:90:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3399, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5849:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3398, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4437, + "src": "5809:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5809:76:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3401, + "nodeType": "EmitStatement", + "src": "5804:81:30" + } + ] + }, + "functionSelector": "64deab73", + "id": 3403, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3383, + "kind": "modifierInvocation", + "modifierName": { + "id": 3382, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5594:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5594:9:30" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "5498:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3381, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5585:8:30" + }, + "parameters": { + "id": 3380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3379, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "5539:35:30", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "5534:40:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3378, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5534:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5533:42:30" + }, + "returnParameters": { + "id": 3384, + "nodeType": "ParameterList", + "parameters": [], + "src": "5604:0:30" + }, + "scope": 4141, + "src": "5489:403:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2566 + ], + "body": { + "id": 3434, + "nodeType": "Block", + "src": "6085:191:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3417, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6099:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6115:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6099:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3423, + "nodeType": "IfStatement", + "src": "6095:55:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3420, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "6125:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6125:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "RevertStatement", + "src": "6118:32:30" + } + }, + { + "expression": { + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3424, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6161:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6161:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "6161:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3427, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6202:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6161:53:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3429, + "nodeType": "ExpressionStatement", + "src": "6161:53:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3431, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6256:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3430, + "name": "NextEpochSeatCountChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4441, + "src": "6230:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6230:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3433, + "nodeType": "EmitStatement", + "src": "6225:44:30" + } + ] + }, + "functionSelector": "4b5dacac", + "id": 3435, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3409, + "kind": "modifierInvocation", + "modifierName": { + "id": 3408, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5991:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5991:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6023:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "6023:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3413, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6054:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "6054:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3415, + "kind": "modifierInvocation", + "modifierName": { + "id": 3410, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "6009:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "6009:71:30" + } + ], + "name": "setNextEpochSeatCount", + "nameLocation": "5907:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3407, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5974:8:30" + }, + "parameters": { + "id": 3406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3405, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "5935:12:30", + "nodeType": "VariableDeclaration", + "scope": 3435, + "src": "5929:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3404, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5929:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "5928:20:30" + }, + "returnParameters": { + "id": 3416, + "nodeType": "ParameterList", + "parameters": [], + "src": "6085:0:30" + }, + "scope": 4141, + "src": "5898:378:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2572 + ], + "body": { + "id": 3460, + "nodeType": "Block", + "src": "6374:232:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3443, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6388:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6415:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6388:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3449, + "nodeType": "IfStatement", + "src": "6384:70:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3446, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "6425:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6425:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3448, + "nodeType": "RevertStatement", + "src": "6418:36:30" + } + }, + { + "expression": { + "id": 3454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3450, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6465:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6465:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3452, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "6465:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3453, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6508:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6465:66:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3455, + "nodeType": "ExpressionStatement", + "src": "6465:66:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3457, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6575:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3456, + "name": "MinimumActiveMembersChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "6547:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:52:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3459, + "nodeType": "EmitStatement", + "src": "6542:57:30" + } + ] + }, + "functionSelector": "0438d06e", + "id": 3461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3441, + "kind": "modifierInvocation", + "modifierName": { + "id": 3440, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6364:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6364:9:30" + } + ], + "name": "setMinimumActiveMembers", + "nameLocation": "6291:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3439, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6355:8:30" + }, + "parameters": { + "id": 3438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3437, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "6321:23:30", + "nodeType": "VariableDeclaration", + "scope": 3461, + "src": "6315:29:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3436, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6315:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6314:31:30" + }, + "returnParameters": { + "id": 3442, + "nodeType": "ParameterList", + "parameters": [], + "src": "6374:0:30" + }, + "scope": 4141, + "src": "6282:324:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2579 + ], + "body": { + "id": 3510, + "nodeType": "Block", + "src": "6701:547:30", + "statements": [ + { + "assignments": [ + 3471 + ], + "declarations": [ + { + "constant": false, + "id": 3471, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "6716:10:30", + "nodeType": "VariableDeclaration", + "scope": 3510, + "src": "6711:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3470, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6711:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3474, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3472, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "6729:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6729:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6711:41:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3476, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6785:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3477, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6803:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3475, + "name": "_removeCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4900, + "src": "6763:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6763:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3479, + "nodeType": "ExpressionStatement", + "src": "6763:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3481, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6854:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3482, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6872:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3480, + "name": "CouncilMembersDismissed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4413, + "src": "6830:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6830:53:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3484, + "nodeType": "EmitStatement", + "src": "6825:58:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3485, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "6987:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6987:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 3487, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7010:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "7010:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "6987:52:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3491, + "nodeType": "IfStatement", + "src": "6983:65:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3490, + "nodeType": "Return", + "src": "7041:7:30" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3492, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "7061:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "7061:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "7061:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3497, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7105:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7105:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "7105:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "7061:84:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3502, + "nodeType": "IfStatement", + "src": "7057:97:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3501, + "nodeType": "Return", + "src": "7147:7:30" + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3503, + "name": "_jumpToNominationPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "7164:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7164:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3505, + "nodeType": "ExpressionStatement", + "src": "7164:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3507, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "7230:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3506, + "name": "EmergencyElectionStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4495, + "src": "7205:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7205:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3509, + "nodeType": "EmitStatement", + "src": "7200:41:30" + } + ] + }, + "functionSelector": "9a25eaf3", + "id": 3511, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3468, + "kind": "modifierInvocation", + "modifierName": { + "id": 3467, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6691:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6691:9:30" + } + ], + "name": "dismissMembers", + "nameLocation": "6621:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3466, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6682:8:30" + }, + "parameters": { + "id": 3465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3464, + "mutability": "mutable", + "name": "membersToDismiss", + "nameLocation": "6655:16:30", + "nodeType": "VariableDeclaration", + "scope": 3511, + "src": "6636:35:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3462, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6636:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3463, + "nodeType": "ArrayTypeName", + "src": "6636:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6635:37:30" + }, + "returnParameters": { + "id": 3469, + "nodeType": "ParameterList", + "parameters": [], + "src": "6701:0:30" + }, + "scope": 4141, + "src": "6612:636:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2583 + ], + "body": { + "id": 3553, + "nodeType": "Block", + "src": "7360:262:30", + "statements": [ + { + "assignments": [ + 3525 + ], + "declarations": [ + { + "constant": false, + "id": 3525, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7397:8:30", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "7370:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3524, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3523, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7370:18:30" + }, + "referencedDeclaration": 1788, + "src": "7370:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3529, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3526, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7408:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7408:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7408:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7370:68:30" + }, + { + "condition": { + "arguments": [ + { + "expression": { + "id": 3532, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7471:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7471:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3530, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7453:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7453:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7453:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3538, + "nodeType": "IfStatement", + "src": "7449:60:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3535, + "name": "AlreadyNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4348, + "src": "7491:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7491:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3537, + "nodeType": "RevertStatement", + "src": "7484:25:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7533:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7533:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3539, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7520:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "7520:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7520:24:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3545, + "nodeType": "ExpressionStatement", + "src": "7520:24:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3547, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7579:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7579:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3549, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7591:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7591:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3546, + "name": "CandidateNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4451, + "src": "7560:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7560:55:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3552, + "nodeType": "EmitStatement", + "src": "7555:60:30" + } + ] + }, + "functionSelector": "fcd7e1d7", + "id": 3554, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3515, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7312:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7312:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3517, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7339:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "7339:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3519, + "kind": "modifierInvocation", + "modifierName": { + "id": 3514, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "7298:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "7298:61:30" + } + ], + "name": "nominate", + "nameLocation": "7263:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3513, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7289:8:30" + }, + "parameters": { + "id": 3512, + "nodeType": "ParameterList", + "parameters": [], + "src": "7271:2:30" + }, + "returnParameters": { + "id": 3520, + "nodeType": "ParameterList", + "parameters": [], + "src": "7360:0:30" + }, + "scope": 4141, + "src": "7254:368:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 2587 + ], + "body": { + "id": 3595, + "nodeType": "Block", + "src": "7716:263:30", + "statements": [ + { + "assignments": [ + 3566 + ], + "declarations": [ + { + "constant": false, + "id": 3566, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7753:8:30", + "nodeType": "VariableDeclaration", + "scope": 3595, + "src": "7726:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3565, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3564, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7726:18:30" + }, + "referencedDeclaration": 1788, + "src": "7726:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3570, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3567, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7764:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7764:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7764:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7726:68:30" + }, + { + "condition": { + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7809:30:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7828:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7828:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3571, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7810:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7810:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7810:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3580, + "nodeType": "IfStatement", + "src": "7805:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3577, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "7848:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7848:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3579, + "nodeType": "RevertStatement", + "src": "7841:21:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3584, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7889:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7889:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3581, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7873:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "7873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7873:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3587, + "nodeType": "ExpressionStatement", + "src": "7873:27:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3589, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7936:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7936:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3591, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7948:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7948:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3588, + "name": "NominationWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "7916:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7916:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3594, + "nodeType": "EmitStatement", + "src": "7911:61:30" + } + ] + }, + "functionSelector": "d11801cf", + "id": 3596, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3558, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3560, + "kind": "modifierInvocation", + "modifierName": { + "id": 3557, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "7676:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "7676:39:30" + } + ], + "name": "withdrawNomination", + "nameLocation": "7637:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3556, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7667:8:30" + }, + "parameters": { + "id": 3555, + "nodeType": "ParameterList", + "parameters": [], + "src": "7655:2:30" + }, + "returnParameters": { + "id": 3561, + "nodeType": "ParameterList", + "parameters": [], + "src": "7716:0:30" + }, + "scope": 4141, + "src": "7628:351:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2594 + ], + "body": { + "id": 3614, + "nodeType": "Block", + "src": "8176:46:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3609, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8192:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8192:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3611, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3600, + "src": "8204:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3608, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3674, + "src": "8186:5:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 3612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8186:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3613, + "nodeType": "ExpressionStatement", + "src": "8186:29:30" + } + ] + }, + "documentation": { + "id": 3597, + "nodeType": "StructuredDocumentation", + "src": "7985:83:30", + "text": "@dev ElectionVotes needs to be extended to specify what determines voting power" + }, + "functionSelector": "84ae670c", + "id": 3615, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3604, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8155:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8155:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3606, + "kind": "modifierInvocation", + "modifierName": { + "id": 3603, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8142:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8142:33:30" + } + ], + "name": "cast", + "nameLocation": "8082:4:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3602, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8133:8:30" + }, + "parameters": { + "id": 3601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3600, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8106:10:30", + "nodeType": "VariableDeclaration", + "scope": 3615, + "src": "8087:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8087:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3599, + "nodeType": "ArrayTypeName", + "src": "8087:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8086:31:30" + }, + "returnParameters": { + "id": 3607, + "nodeType": "ParameterList", + "parameters": [], + "src": "8176:0:30" + }, + "scope": 4141, + "src": "8073:149:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 3673, + "nodeType": "Block", + "src": "8305:446:30", + "statements": [ + { + "assignments": [ + 3624 + ], + "declarations": [ + { + "constant": false, + "id": 3624, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8320:9:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8315:14:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3623, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8315:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3628, + "initialValue": { + "arguments": [ + { + "id": 3626, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8346:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3625, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "8332:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8332:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8315:36:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3629, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8366:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8379:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8366:14:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3635, + "nodeType": "IfStatement", + "src": "8362:40:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3632, + "name": "NoVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "8389:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8389:13:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3634, + "nodeType": "RevertStatement", + "src": "8382:20:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3637, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8433:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3636, + "name": "_validateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6067, + "src": "8413:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 3638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8413:31:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3639, + "nodeType": "ExpressionStatement", + "src": "8413:31:30" + }, + { + "assignments": [ + 3641 + ], + "declarations": [ + { + "constant": false, + "id": 3641, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "8463:8:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8455:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3640, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8455:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3642, + "nodeType": "VariableDeclarationStatement", + "src": "8455:16:30" + }, + { + "assignments": [ + 3644 + ], + "declarations": [ + { + "constant": false, + "id": 3644, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "8487:10:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8482:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3643, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8482:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3647, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3645, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8500:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8500:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8482:41:30" + }, + { + "condition": { + "arguments": [ + { + "id": 3649, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8547:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3648, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8538:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8538:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3657, + "nodeType": "IfStatement", + "src": "8534:82:30", + "trueBody": { + "id": 3656, + "nodeType": "Block", + "src": "8554:62:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3652, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8588:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3653, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8594:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3651, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8568:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8568:37:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "8568:37:30" + } + ] + } + }, + { + "expression": { + "id": 3664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3658, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8626:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3660, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8649:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3661, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8655:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3662, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8666:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3659, + "name": "_recordVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6150, + "src": "8637:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_address_$dyn_calldata_ptr_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,address[] calldata) returns (bytes32)" + } + }, + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8637:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "8626:51:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 3665, + "nodeType": "ExpressionStatement", + "src": "8626:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3667, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8706:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3668, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8712:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3669, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8722:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3670, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8734:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3666, + "name": "VoteRecorded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4467, + "src": "8693:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8693:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3672, + "nodeType": "EmitStatement", + "src": "8688:56:30" + } + ] + }, + "id": 3674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_cast", + "nameLocation": "8237:5:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3617, + "mutability": "mutable", + "name": "user", + "nameLocation": "8251:4:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8243:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8243:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3620, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8276:10:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8257:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3618, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8257:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3619, + "nodeType": "ArrayTypeName", + "src": "8257:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8242:45:30" + }, + "returnParameters": { + "id": 3622, + "nodeType": "ParameterList", + "parameters": [], + "src": "8305:0:30" + }, + "scope": 4141, + "src": "8228:523:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2598 + ], + "body": { + "id": 3699, + "nodeType": "Block", + "src": "8833:157:30", + "statements": [ + { + "condition": { + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8847:21:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3683, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8857:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8857:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3682, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8848:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8848:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3691, + "nodeType": "IfStatement", + "src": "8843:74:30", + "trueBody": { + "id": 3690, + "nodeType": "Block", + "src": "8870:47:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3687, + "name": "VoteNotCasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4356, + "src": "8891:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8891:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3689, + "nodeType": "RevertStatement", + "src": "8884:22:30" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3693, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8947:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8947:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3695, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8959:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8959:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3692, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8927:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8927:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3698, + "nodeType": "ExpressionStatement", + "src": "8927:56:30" + } + ] + }, + "functionSelector": "d83eb231", + "id": 3700, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3678, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8812:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8812:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3680, + "kind": "modifierInvocation", + "modifierName": { + "id": 3677, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8799:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8799:33:30" + } + ], + "name": "withdrawVote", + "nameLocation": "8766:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3676, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8790:8:30" + }, + "parameters": { + "id": 3675, + "nodeType": "ParameterList", + "parameters": [], + "src": "8778:2:30" + }, + "returnParameters": { + "id": 3681, + "nodeType": "ParameterList", + "parameters": [], + "src": "8833:0:30" + }, + "scope": 4141, + "src": "8757:233:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2604 + ], + "body": { + "id": 3763, + "nodeType": "Block", + "src": "9170:599:30", + "statements": [ + { + "assignments": [ + 3713 + ], + "declarations": [ + { + "constant": false, + "id": 3713, + "mutability": "mutable", + "name": "election", + "nameLocation": "9201:8:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9180:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3711, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9180:12:30" + }, + "referencedDeclaration": 4299, + "src": "9180:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3716, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3714, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9212:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9212:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9180:53:30" + }, + { + "condition": { + "expression": { + "id": 3717, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9248:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9248:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3722, + "nodeType": "IfStatement", + "src": "9244:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3719, + "name": "ElectionAlreadyEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4346, + "src": "9275:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9275:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3721, + "nodeType": "RevertStatement", + "src": "9268:33:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3724, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3703, + "src": "9337:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3723, + "name": "_evaluateNextBallotBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5695, + "src": "9312:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9312:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3726, + "nodeType": "ExpressionStatement", + "src": "9312:36:30" + }, + { + "assignments": [ + 3728 + ], + "declarations": [ + { + "constant": false, + "id": 3728, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "9364:17:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9359:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3727, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9359:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3731, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3729, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "9384:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9384:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9359:48:30" + }, + { + "assignments": [ + 3733 + ], + "declarations": [ + { + "constant": false, + "id": 3733, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "9423:12:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9418:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3732, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9418:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3737, + "initialValue": { + "expression": { + "expression": { + "id": 3734, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9438:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3735, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "9438:18:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 3736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9438:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9418:45:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3738, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9477:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3739, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9477:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 3740, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9508:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9477:43:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3761, + "nodeType": "Block", + "src": "9643:120:30", + "statements": [ + { + "expression": { + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3750, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9657:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9657:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9678:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "9657:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3755, + "nodeType": "ExpressionStatement", + "src": "9657:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3757, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9720:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3758, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9739:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3756, + "name": "ElectionEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4483, + "src": "9702:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9702:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3760, + "nodeType": "EmitStatement", + "src": "9697:55:30" + } + ] + }, + "id": 3762, + "nodeType": "IfStatement", + "src": "9473:290:30", + "trueBody": { + "id": 3749, + "nodeType": "Block", + "src": "9522:115:30", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "id": 3743, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9564:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3744, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9583:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9583:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3746, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9613:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3742, + "name": "ElectionBatchEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "9541:22:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9541:85:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3748, + "nodeType": "EmitStatement", + "src": "9536:90:30" + } + ] + } + } + ] + }, + "documentation": { + "id": 3701, + "nodeType": "StructuredDocumentation", + "src": "8996:76:30", + "text": "@dev ElectionTally needs to be extended to specify how votes are counted" + }, + "functionSelector": "37143233", + "id": 3764, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3707, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9143:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9143:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3709, + "kind": "modifierInvocation", + "modifierName": { + "id": 3706, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9130:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9130:39:30" + } + ], + "name": "evaluate", + "nameLocation": "9086:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3705, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9121:8:30" + }, + "parameters": { + "id": 3704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3703, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "9100:10:30", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "9095:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3702, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9095:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9094:17:30" + }, + "returnParameters": { + "id": 3710, + "nodeType": "ParameterList", + "parameters": [], + "src": "9170:0:30" + }, + "scope": 4141, + "src": "9077:692:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2608 + ], + "body": { + "id": 3821, + "nodeType": "Block", + "src": "9904:462:30", + "statements": [ + { + "assignments": [ + 3775 + ], + "declarations": [ + { + "constant": false, + "id": 3775, + "mutability": "mutable", + "name": "election", + "nameLocation": "9935:8:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "9914:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3774, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3773, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9914:12:30" + }, + "referencedDeclaration": 4299, + "src": "9914:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3778, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3776, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9946:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9946:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9914:53:30" + }, + { + "condition": { + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9982:19:30", + "subExpression": { + "expression": { + "id": 3779, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "9983:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9983:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3785, + "nodeType": "IfStatement", + "src": "9978:54:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3782, + "name": "ElectionNotEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4344, + "src": "10010:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10010:22:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3784, + "nodeType": "RevertStatement", + "src": "10003:29:30" + } + }, + { + "assignments": [ + 3787 + ], + "declarations": [ + { + "constant": false, + "id": 3787, + "mutability": "mutable", + "name": "newEpochIndex", + "nameLocation": "10048:13:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "10043:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10043:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3792, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3788, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "10064:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10064:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10090:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10064:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10043:48:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3794, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10127:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3793, + "name": "_removeAllCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "10102:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3796, + "nodeType": "ExpressionStatement", + "src": "10102:39:30" + }, + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 3798, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10170:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "10170:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "10170:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10170:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3802, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10197:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3797, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "10151:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10151:60:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3804, + "nodeType": "ExpressionStatement", + "src": "10151:60:30" + }, + { + "expression": { + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3805, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10222:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "resolved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4274, + "src": "10222:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10242:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10222:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3810, + "nodeType": "ExpressionStatement", + "src": "10222:24:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3811, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "10257:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10257:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3813, + "nodeType": "ExpressionStatement", + "src": "10257:17:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3814, + "name": "_copyScheduleFromPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5512, + "src": "10284:30:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10284:32:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3816, + "nodeType": "ExpressionStatement", + "src": "10284:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3818, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10345:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3817, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "10332:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10332:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3820, + "nodeType": "EmitStatement", + "src": "10327:32:30" + } + ] + }, + "documentation": { + "id": 3765, + "nodeType": "StructuredDocumentation", + "src": "9775:47:30", + "text": "@dev Burns previous NFTs and mints new ones" + }, + "functionSelector": "2810e1d6", + "id": 3822, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3769, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9877:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9877:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3771, + "kind": "modifierInvocation", + "modifierName": { + "id": 3768, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9864:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9864:39:30" + } + ], + "name": "resolve", + "nameLocation": "9836:7:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3767, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9855:8:30" + }, + "parameters": { + "id": 3766, + "nodeType": "ParameterList", + "parameters": [], + "src": "9843:2:30" + }, + "returnParameters": { + "id": 3772, + "nodeType": "ParameterList", + "parameters": [], + "src": "9904:0:30" + }, + "scope": 4141, + "src": "9827:539:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2618 + ], + "body": { + "id": 3846, + "nodeType": "Block", + "src": "10611:189:30", + "statements": [ + { + "assignments": [ + 3834 + ], + "declarations": [ + { + "constant": false, + "id": 3834, + "mutability": "mutable", + "name": "settings", + "nameLocation": "10646:8:30", + "nodeType": "VariableDeclaration", + "scope": 3846, + "src": "10621:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3833, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3832, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "10621:16:30" + }, + "referencedDeclaration": 4261, + "src": "10621:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3837, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3835, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10657:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10657:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10621:55:30" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 3838, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10695:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3839, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "10695:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3840, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10733:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3841, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "10733:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3842, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10767:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3843, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "10767:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "id": 3844, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10694:99:30", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint64_$_t_uint64_$_t_uint64_$", + "typeString": "tuple(uint64,uint64,uint64)" + } + }, + "functionReturnParameters": 3831, + "id": 3845, + "nodeType": "Return", + "src": "10687:106:30" + } + ] + }, + "functionSelector": "8625c053", + "id": 3847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "10381:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3824, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10442:8:30" + }, + "parameters": { + "id": 3823, + "nodeType": "ParameterList", + "parameters": [], + "src": "10401:2:30" + }, + "returnParameters": { + "id": 3831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3826, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "10488:27:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10481:34:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3825, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10481:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3828, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "10536:23:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10529:30:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3827, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10529:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3830, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "10580:16:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10573:23:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3829, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10573:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10467:139:30" + }, + "scope": 4141, + "src": "10372:428:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2624 + ], + "body": { + "id": 3857, + "nodeType": "Block", + "src": "10887:70:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3853, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10904:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10904:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "10904:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3852, + "id": 3856, + "nodeType": "Return", + "src": "10897:53:30" + } + ] + }, + "functionSelector": "e9544a51", + "id": 3858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "10815:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10861:8:30" + }, + "parameters": { + "id": 3848, + "nodeType": "ParameterList", + "parameters": [], + "src": "10844:2:30" + }, + "returnParameters": { + "id": 3852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "10879:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10879:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10878:8:30" + }, + "scope": 4141, + "src": "10806:151:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2630 + ], + "body": { + "id": 3868, + "nodeType": "Block", + "src": "11048:76:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3864, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11065:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3866, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "11065:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3863, + "id": 3867, + "nodeType": "Return", + "src": "11058:59:30" + } + ] + }, + "functionSelector": "0f98dfba", + "id": 3869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "10972:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11024:8:30" + }, + "parameters": { + "id": 3859, + "nodeType": "ParameterList", + "parameters": [], + "src": "11007:2:30" + }, + "returnParameters": { + "id": 3863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3862, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3869, + "src": "11042:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3861, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11042:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11041:6:30" + }, + "scope": 4141, + "src": "10963:161:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2636 + ], + "body": { + "id": 3879, + "nodeType": "Block", + "src": "11202:62:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3875, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11219:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11219:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "11219:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3874, + "id": 3878, + "nodeType": "Return", + "src": "11212:45:30" + } + ] + }, + "functionSelector": "447068ef", + "id": 3880, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "11139:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3871, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11177:8:30" + }, + "parameters": { + "id": 3870, + "nodeType": "ParameterList", + "parameters": [], + "src": "11160:2:30" + }, + "returnParameters": { + "id": 3874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3873, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3880, + "src": "11195:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3872, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11195:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11194:7:30" + }, + "scope": 4141, + "src": "11130:134:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2642 + ], + "body": { + "id": 3890, + "nodeType": "Block", + "src": "11344:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3886, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11361:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3888, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "11361:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3885, + "id": 3889, + "nodeType": "Return", + "src": "11354:47:30" + } + ] + }, + "functionSelector": "85160425", + "id": 3891, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "11279:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11319:8:30" + }, + "parameters": { + "id": 3881, + "nodeType": "ParameterList", + "parameters": [], + "src": "11302:2:30" + }, + "returnParameters": { + "id": 3885, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3884, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3891, + "src": "11337:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3883, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11337:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11336:7:30" + }, + "scope": 4141, + "src": "11270:138:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2648 + ], + "body": { + "id": 3900, + "nodeType": "Block", + "src": "11477:47:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3897, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "11494:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11494:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3896, + "id": 3899, + "nodeType": "Return", + "src": "11487:30:30" + } + ] + }, + "functionSelector": "ffe7f643", + "id": 3901, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "11423:13:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3893, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11453:8:30" + }, + "parameters": { + "id": 3892, + "nodeType": "ParameterList", + "parameters": [], + "src": "11436:2:30" + }, + "returnParameters": { + "id": 3896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3895, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3901, + "src": "11471:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3894, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11471:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11470:6:30" + }, + "scope": 4141, + "src": "11414:110:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2654 + ], + "body": { + "id": 3911, + "nodeType": "Block", + "src": "11599:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3907, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11616:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11616:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "11616:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3906, + "id": 3910, + "nodeType": "Return", + "src": "11609:35:30" + } + ] + }, + "functionSelector": "ce04e44c", + "id": 3912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "11539:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3903, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11573:8:30" + }, + "parameters": { + "id": 3902, + "nodeType": "ParameterList", + "parameters": [], + "src": "11556:2:30" + }, + "returnParameters": { + "id": 3906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3905, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3912, + "src": "11591:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3904, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11591:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11590:8:30" + }, + "scope": 4141, + "src": "11530:121:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2660 + ], + "body": { + "id": 3922, + "nodeType": "Block", + "src": "11724:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3918, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11741:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3920, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "11741:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3917, + "id": 3921, + "nodeType": "Return", + "src": "11734:33:30" + } + ] + }, + "functionSelector": "362c906d", + "id": 3923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "11666:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3914, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11698:8:30" + }, + "parameters": { + "id": 3913, + "nodeType": "ParameterList", + "parameters": [], + "src": "11681:2:30" + }, + "returnParameters": { + "id": 3917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3916, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3923, + "src": "11716:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3915, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11716:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11715:8:30" + }, + "scope": 4141, + "src": "11657:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2666 + ], + "body": { + "id": 3933, + "nodeType": "Block", + "src": "11860:68:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3929, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11877:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11877:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "11877:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3928, + "id": 3932, + "nodeType": "Return", + "src": "11870:51:30" + } + ] + }, + "functionSelector": "e420d7f9", + "id": 3934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "11789:28:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3925, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11834:8:30" + }, + "parameters": { + "id": 3924, + "nodeType": "ParameterList", + "parameters": [], + "src": "11817:2:30" + }, + "returnParameters": { + "id": 3928, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3927, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3934, + "src": "11852:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3926, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11852:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11851:8:30" + }, + "scope": 4141, + "src": "11780:148:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2672 + ], + "body": { + "id": 3944, + "nodeType": "Block", + "src": "12010:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3940, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "12027:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "12027:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3939, + "id": 3943, + "nodeType": "Return", + "src": "12020:47:30" + } + ] + }, + "functionSelector": "e1509015", + "id": 3945, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "11943:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3936, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11984:8:30" + }, + "parameters": { + "id": 3935, + "nodeType": "ParameterList", + "parameters": [], + "src": "11967:2:30" + }, + "returnParameters": { + "id": 3939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3938, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3945, + "src": "12002:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3937, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "12002:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "12001:8:30" + }, + "scope": 4141, + "src": "11934:140:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2678 + ], + "body": { + "id": 3957, + "nodeType": "Block", + "src": "12146:49:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3953, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "12168:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12168:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12163:4:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3951, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12163:4:30", + "typeDescriptions": {} + } + }, + "id": 3955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3950, + "id": 3956, + "nodeType": "Return", + "src": "12156:32:30" + } + ] + }, + "functionSelector": "086146d2", + "id": 3958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "12089:16:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3947, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12122:8:30" + }, + "parameters": { + "id": 3946, + "nodeType": "ParameterList", + "parameters": [], + "src": "12105:2:30" + }, + "returnParameters": { + "id": 3950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3949, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3958, + "src": "12140:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3948, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12140:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12139:6:30" + }, + "scope": 4141, + "src": "12080:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2686 + ], + "body": { + "id": 3973, + "nodeType": "Block", + "src": "12279:74:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3970, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3960, + "src": "12336:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3966, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12296:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12296:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3969, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "12296:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3965, + "id": 3972, + "nodeType": "Return", + "src": "12289:57:30" + } + ] + }, + "functionSelector": "3a3e6c81", + "id": 3974, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "12210:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3962, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12255:8:30" + }, + "parameters": { + "id": 3961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3960, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "12230:9:30", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12222:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12222:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12221:19:30" + }, + "returnParameters": { + "id": 3965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3964, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12273:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3963, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12273:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12272:6:30" + }, + "scope": 4141, + "src": "12201:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2693 + ], + "body": { + "id": 3987, + "nodeType": "Block", + "src": "12432:63:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3981, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12449:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3983, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12449:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3984, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "12449:37:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 3980, + "id": 3986, + "nodeType": "Return", + "src": "12442:46:30" + } + ] + }, + "functionSelector": "9636f67c", + "id": 3988, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "12368:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3976, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12396:8:30" + }, + "parameters": { + "id": 3975, + "nodeType": "ParameterList", + "parameters": [], + "src": "12379:2:30" + }, + "returnParameters": { + "id": 3980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3979, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3988, + "src": "12414:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12414:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3978, + "nodeType": "ArrayTypeName", + "src": "12414:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12413:18:30" + }, + "scope": 4141, + "src": "12359:136:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2702 + ], + "body": { + "id": 4001, + "nodeType": "Block", + "src": "12600:54:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3998, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3991, + "src": "12636:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3997, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "12617:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12617:30:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3996, + "id": 4000, + "nodeType": "Return", + "src": "12610:37:30" + } + ] + }, + "functionSelector": "edc968ba", + "id": 4002, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "12510:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3993, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12573:8:30" + }, + "parameters": { + "id": 3992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3991, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "12547:10:30", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12528:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3989, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12528:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3990, + "nodeType": "ArrayTypeName", + "src": "12528:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12527:31:30" + }, + "returnParameters": { + "id": 3996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3995, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12591:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3994, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12591:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12590:9:30" + }, + "scope": 4141, + "src": "12501:153:30", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2710 + ], + "body": { + "id": 4014, + "nodeType": "Block", + "src": "12737:45:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4011, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4004, + "src": "12770:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4010, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12754:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4009, + "id": 4013, + "nodeType": "Return", + "src": "12747:28:30" + } + ] + }, + "functionSelector": "95ff6584", + "id": 4015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "12669:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4006, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12710:8:30" + }, + "parameters": { + "id": 4005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4004, + "mutability": "mutable", + "name": "user", + "nameLocation": "12692:4:30", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12684:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12684:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12683:14:30" + }, + "returnParameters": { + "id": 4009, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4008, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12728:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4007, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12728:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12727:9:30" + }, + "scope": 4141, + "src": "12660:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2718 + ], + "body": { + "id": 4032, + "nodeType": "Block", + "src": "12856:59:30", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4024, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4017, + "src": "12889:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4023, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12873:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12906:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12898:7:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4026, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12898:7:30", + "typeDescriptions": {} + } + }, + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12898:10:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12873:35:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4022, + "id": 4031, + "nodeType": "Return", + "src": "12866:42:30" + } + ] + }, + "functionSelector": "09eef43e", + "id": 4033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "12797:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4019, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12832:8:30" + }, + "parameters": { + "id": 4018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4017, + "mutability": "mutable", + "name": "user", + "nameLocation": "12814:4:30", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12806:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4016, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12806:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12805:14:30" + }, + "returnParameters": { + "id": 4022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12850:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12850:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12849:6:30" + }, + "scope": 4141, + "src": "12788:127:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2726 + ], + "body": { + "id": 4045, + "nodeType": "Block", + "src": "12995:43:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4042, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "13026:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4041, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "13012:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 4043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13012:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4040, + "id": 4044, + "nodeType": "Return", + "src": "13005:26:30" + } + ] + }, + "functionSelector": "bb9c0920", + "id": 4046, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "12930:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4037, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12971:8:30" + }, + "parameters": { + "id": 4036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "user", + "nameLocation": "12951:4:30", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12943:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12943:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12942:14:30" + }, + "returnParameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4039, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12989:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12989:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12988:6:30" + }, + "scope": 4141, + "src": "12921:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2734 + ], + "body": { + "id": 4059, + "nodeType": "Block", + "src": "13124:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4055, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4048, + "src": "13152:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4054, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13141:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13141:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "13141:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4053, + "id": 4058, + "nodeType": "Return", + "src": "13134:33:30" + } + ] + }, + "functionSelector": "7a3bc0ee", + "id": 4060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "13053:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13100:8:30" + }, + "parameters": { + "id": 4049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4048, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13076:8:30", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13068:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13068:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13067:18:30" + }, + "returnParameters": { + "id": 4053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4052, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13118:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13118:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13117:6:30" + }, + "scope": 4141, + "src": "13044:130:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2743 + ], + "body": { + "id": 4074, + "nodeType": "Block", + "src": "13277:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4070, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4062, + "src": "13305:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4069, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13294:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13294:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "13294:31:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 4068, + "id": 4073, + "nodeType": "Return", + "src": "13287:38:30" + } + ] + }, + "functionSelector": "655aaaca", + "id": 4075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "13189:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4064, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13241:8:30" + }, + "parameters": { + "id": 4063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4062, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13217:8:30", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13209:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4061, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13209:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13208:18:30" + }, + "returnParameters": { + "id": 4068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13259:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4065, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13259:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4066, + "nodeType": "ArrayTypeName", + "src": "13259:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13258:18:30" + }, + "scope": 4141, + "src": "13180:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2749 + ], + "body": { + "id": 4085, + "nodeType": "Block", + "src": "13405:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4081, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13422:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13422:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4083, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "13422:31:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4080, + "id": 4084, + "nodeType": "Return", + "src": "13415:38:30" + } + ] + }, + "functionSelector": "e327b585", + "id": 4086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "13347:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4077, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13381:8:30" + }, + "parameters": { + "id": 4076, + "nodeType": "ParameterList", + "parameters": [], + "src": "13366:2:30" + }, + "returnParameters": { + "id": 4080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "13399:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4078, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13399:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "13398:6:30" + }, + "scope": 4141, + "src": "13338:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2757 + ], + "body": { + "id": 4100, + "nodeType": "Block", + "src": "13550:71:30", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4094, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13567:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13567:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4096, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "13567:36:30", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4098, + "indexExpression": { + "id": 4097, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4088, + "src": "13604:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13567:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4093, + "id": 4099, + "nodeType": "Return", + "src": "13560:54:30" + } + ] + }, + "functionSelector": "d82f25f0", + "id": 4101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "13475:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4090, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13526:8:30" + }, + "parameters": { + "id": 4089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4088, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "13501:9:30", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13493:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13492:19:30" + }, + "returnParameters": { + "id": 4093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4092, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13544:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13544:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13543:6:30" + }, + "scope": 4141, + "src": "13466:155:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2764 + ], + "body": { + "id": 4114, + "nodeType": "Block", + "src": "13707:62:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4108, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13724:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4110, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "13724:29:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13724:36:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:38:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4107, + "id": 4113, + "nodeType": "Return", + "src": "13717:45:30" + } + ] + }, + "functionSelector": "f2516dbf", + "id": 4115, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "13636:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4103, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13671:8:30" + }, + "parameters": { + "id": 4102, + "nodeType": "ParameterList", + "parameters": [], + "src": "13654:2:30" + }, + "returnParameters": { + "id": 4107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4106, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4115, + "src": "13689:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13689:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4105, + "nodeType": "ArrayTypeName", + "src": "13689:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13688:18:30" + }, + "scope": 4141, + "src": "13627:142:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2770 + ], + "body": { + "id": 4125, + "nodeType": "Block", + "src": "13841:53:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4121, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13858:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13858:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "13858:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4120, + "id": 4124, + "nodeType": "Return", + "src": "13851:36:30" + } + ] + }, + "functionSelector": "c07de0d3", + "id": 4126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "13784:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4117, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13814:8:30" + }, + "parameters": { + "id": 4116, + "nodeType": "ParameterList", + "parameters": [], + "src": "13799:2:30" + }, + "returnParameters": { + "id": 4120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4119, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4126, + "src": "13832:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13832:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13831:9:30" + }, + "scope": 4141, + "src": "13775:119:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2777 + ], + "body": { + "id": 4139, + "nodeType": "Block", + "src": "13979:64:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4133, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13996:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "13996:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4136, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13996:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4132, + "id": 4138, + "nodeType": "Return", + "src": "13989:47:30" + } + ] + }, + "functionSelector": "606a6b76", + "id": 4140, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "13909:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4128, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13943:8:30" + }, + "parameters": { + "id": 4127, + "nodeType": "ParameterList", + "parameters": [], + "src": "13926:2:30" + }, + "returnParameters": { + "id": 4132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4131, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4140, + "src": "13961:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13961:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4130, + "nodeType": "ArrayTypeName", + "src": "13961:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13960:18:30" + }, + "scope": 4141, + "src": "13900:143:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4142, + "src": "543:13502:30", + "usedErrors": [ + 5, + 19, + 29, + 31, + 1995, + 1997, + 1999, + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:14015:30" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module for electing a council, represented by a set of NFT holders\ninterface IElectionModule {\n // ---------------------------------------\n // Initialization\n // ---------------------------------------\n\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external;\n\n /// @notice Shows whether the module has been initialized\n function isElectionModuleInitialized() external view returns (bool);\n\n // ---------------------------------------\n // Owner write functions\n // ---------------------------------------\n\n /// @notice Upgrades the implementation of the existing council NFT token\n function upgradeCouncilToken(address newCouncilTokenImplementation) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Determines minimum values for epoch schedule adjustments\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external;\n\n /// @notice Determines adjustment size for tweakEpochSchedule\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external;\n\n /// @notice Determines batch size when evaluate() is called with numBallots = 0\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external;\n\n /// @notice Determines the number of council members in the next epoch\n function setNextEpochSeatCount(uint8 newSeatCount) external;\n\n /// @notice Determines the minimum number of council members before triggering an emergency election\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external;\n\n /// @notice Allows the owner to remove one or more council members, triggering an election if a threshold is met\n function dismissMembers(address[] calldata members) external;\n\n // ---------------------------------------\n // User write functions\n // ---------------------------------------\n\n /// @notice Allows anyone to self-nominate during the Nomination period\n function nominate() external;\n\n /// @notice Self-withdrawal of nominations during the Nomination period\n function withdrawNomination() external;\n\n /// @notice Allows anyone with vote power to vote on nominated candidates during the Voting period\n function cast(address[] calldata candidates) external;\n\n /// @notice Allows votes to be withdraw\n function withdrawVote() external;\n\n /// @notice Processes ballots in batches during the Evaluation period (after epochEndDate)\n function evaluate(uint numBallots) external;\n\n /// @notice Shuffles NFTs and resolves an election after it has been evaluated\n function resolve() external;\n\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Exposes minimum durations required when adjusting epoch schedules\n function getMinEpochDurations()\n external\n view\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n\n /// @notice Exposes maximum size of adjustments when calling tweakEpochSchedule\n function getMaxDateAdjustmentTolerance() external view returns (uint64);\n\n /// @notice Shows the default batch size when calling evaluate() with numBallots = 0\n function getDefaultBallotEvaluationBatchSize() external view returns (uint);\n\n /// @notice Shows the number of council members that the next epoch will have\n function getNextEpochSeatCount() external view returns (uint8);\n\n /// @notice Returns the minimum active members that the council needs to avoid an emergency election\n function getMinimumActiveMembers() external view returns (uint8);\n\n /// @notice Returns the index of the current epoch. The first epoch's index is 1\n function getEpochIndex() external view returns (uint);\n\n /// @notice Returns the date in which the current epoch started\n function getEpochStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the current epoch will end\n function getEpochEndDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the current epoch will start\n function getNominationPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the current epoch will start\n function getVotingPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the current period type: Administration, Nomination, Voting, Evaluation\n function getCurrentPeriod() external view returns (uint);\n\n /// @notice Shows if a candidate has been nominated in the current epoch\n function isNominated(address candidate) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the current epoch\n function getNominees() external view returns (address[] memory);\n\n /// @notice Hashes a list of candidates (used for identifying and storing ballots)\n function calculateBallotId(address[] calldata candidates) external pure returns (bytes32);\n\n /// @notice Returns the ballot id that user voted on in the current election\n function getBallotVoted(address user) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the current election\n function hasVoted(address user) external view returns (bool);\n\n /// @notice Returns the vote power of user in the current election\n function getVotePower(address user) external view returns (uint);\n\n /// @notice Returns the number of votes given to a particular ballot\n function getBallotVotes(bytes32 ballotId) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has\n function getBallotCandidates(bytes32 ballotId) external view returns (address[] memory);\n\n /// @notice Returns whether all ballots in the current election have been counted\n function isElectionEvaluated() external view returns (bool);\n\n /// @notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated\n function getCandidateVotes(address candidate) external view returns (uint);\n\n /// @notice Returns the winners of the current election. Requires the election to be partially or totally evaluated\n function getElectionWinners() external view returns (address[] memory);\n\n /// @notice Returns the address of the council NFT token\n function getCouncilToken() external view returns (address);\n\n /// @notice Returns the current NFT token holders\n function getCouncilMembers() external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "exportedSymbols": { + "IElectionModule": [ + 2778 + ] + }, + "id": 2779, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2486, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:27" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2487, + "nodeType": "StructuredDocumentation", + "src": "56:78:27", + "text": "@title Module for electing a council, represented by a set of NFT holders" + }, + "fullyImplemented": false, + "id": 2778, + "linearizedBaseContracts": [ + 2778 + ], + "name": "IElectionModule", + "nameLocation": "144:15:27", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2488, + "nodeType": "StructuredDocumentation", + "src": "283:73:27", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "ee695137", + "id": 2506, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "370:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2490, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "418:16:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "404:30:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2489, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "404:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2492, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "458:18:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "444:32:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2491, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "444:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2495, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "503:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "486:29:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2493, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "486:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2494, + "nodeType": "ArrayTypeName", + "src": "486:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2497, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "531:20:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "525:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2496, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "525:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2499, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "568:25:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "561:32:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2498, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "561:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2501, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "610:21:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "603:28:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2500, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "603:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2503, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "648:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "641:19:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2502, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "641:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "394:272:27" + }, + "returnParameters": { + "id": 2505, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:0:27" + }, + "scope": 2778, + "src": "361:315:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2507, + "nodeType": "StructuredDocumentation", + "src": "682:57:27", + "text": "@notice Shows whether the module has been initialized" + }, + "functionSelector": "c5798523", + "id": 2512, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "753:27:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2508, + "nodeType": "ParameterList", + "parameters": [], + "src": "780:2:27" + }, + "returnParameters": { + "id": 2511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2510, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "806:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2509, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "806:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "805:6:27" + }, + "scope": 2778, + "src": "744:68:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2513, + "nodeType": "StructuredDocumentation", + "src": "942:73:27", + "text": "@notice Upgrades the implementation of the existing council NFT token" + }, + "functionSelector": "54520478", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeCouncilToken", + "nameLocation": "1029:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2515, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "1057:29:27", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "1049:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2514, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1049:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1048:39:27" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [], + "src": "1096:0:27" + }, + "scope": 2778, + "src": "1020:77:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2519, + "nodeType": "StructuredDocumentation", + "src": "1103:167:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)" + }, + "functionSelector": "8f701997", + "id": 2528, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tweakEpochSchedule", + "nameLocation": "1284:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2521, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1319:28:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1312:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2520, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1312:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1364:24:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1357:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2522, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1357:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1405:15:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1398:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2524, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1398:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1302:124:27" + }, + "returnParameters": { + "id": 2527, + "nodeType": "ParameterList", + "parameters": [], + "src": "1435:0:27" + }, + "scope": 2778, + "src": "1275:161:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2529, + "nodeType": "StructuredDocumentation", + "src": "1442:103:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration" + }, + "functionSelector": "c14d0528", + "id": 2538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "modifyEpochSchedule", + "nameLocation": "1559:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1595:28:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1588:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2530, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1588:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2533, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1640:24:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1633:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2532, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2535, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1681:15:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1674:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2534, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1674:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1578:124:27" + }, + "returnParameters": { + "id": 2537, + "nodeType": "ParameterList", + "parameters": [], + "src": "1711:0:27" + }, + "scope": 2778, + "src": "1550:162:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2539, + "nodeType": "StructuredDocumentation", + "src": "1718:68:27", + "text": "@notice Determines minimum values for epoch schedule adjustments" + }, + "functionSelector": "a25a9f3a", + "id": 2548, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinEpochDurations", + "nameLocation": "1800:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2541, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "1837:30:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1830:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2540, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1830:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2543, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "1884:26:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1877:33:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2542, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1877:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2545, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "1927:19:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1920:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2544, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1920:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1820:132:27" + }, + "returnParameters": { + "id": 2547, + "nodeType": "ParameterList", + "parameters": [], + "src": "1961:0:27" + }, + "scope": 2778, + "src": "1791:171:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2549, + "nodeType": "StructuredDocumentation", + "src": "1968:61:27", + "text": "@notice Determines adjustment size for tweakEpochSchedule" + }, + "functionSelector": "3ac1c5fe", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "2043:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "2080:29:27", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "2073:36:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2550, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2073:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2072:38:27" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "2119:0:27" + }, + "scope": 2778, + "src": "2034:86:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "2126:79:27", + "text": "@notice Determines batch size when evaluate() is called with numBallots = 0" + }, + "functionSelector": "64deab73", + "id": 2560, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "2219:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2557, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "2260:35:27", + "nodeType": "VariableDeclaration", + "scope": 2560, + "src": "2255:40:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2556, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2255:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2254:42:27" + }, + "returnParameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [], + "src": "2305:0:27" + }, + "scope": 2778, + "src": "2210:96:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2561, + "nodeType": "StructuredDocumentation", + "src": "2312:70:27", + "text": "@notice Determines the number of council members in the next epoch" + }, + "functionSelector": "4b5dacac", + "id": 2566, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setNextEpochSeatCount", + "nameLocation": "2396:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "2424:12:27", + "nodeType": "VariableDeclaration", + "scope": 2566, + "src": "2418:18:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2562, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2418:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2417:20:27" + }, + "returnParameters": { + "id": 2565, + "nodeType": "ParameterList", + "parameters": [], + "src": "2446:0:27" + }, + "scope": 2778, + "src": "2387:60:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2567, + "nodeType": "StructuredDocumentation", + "src": "2453:100:27", + "text": "@notice Determines the minimum number of council members before triggering an emergency election" + }, + "functionSelector": "0438d06e", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinimumActiveMembers", + "nameLocation": "2567:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "2597:23:27", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "2591:29:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2568, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2591:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2590:31:27" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "2630:0:27" + }, + "scope": 2778, + "src": "2558:73:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2573, + "nodeType": "StructuredDocumentation", + "src": "2637:112:27", + "text": "@notice Allows the owner to remove one or more council members, triggering an election if a threshold is met" + }, + "functionSelector": "9a25eaf3", + "id": 2579, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "dismissMembers", + "nameLocation": "2763:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2576, + "mutability": "mutable", + "name": "members", + "nameLocation": "2797:7:27", + "nodeType": "VariableDeclaration", + "scope": 2579, + "src": "2778:26:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2778:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2575, + "nodeType": "ArrayTypeName", + "src": "2778:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2777:28:27" + }, + "returnParameters": { + "id": 2578, + "nodeType": "ParameterList", + "parameters": [], + "src": "2814:0:27" + }, + "scope": 2778, + "src": "2754:61:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2580, + "nodeType": "StructuredDocumentation", + "src": "2944:71:27", + "text": "@notice Allows anyone to self-nominate during the Nomination period" + }, + "functionSelector": "fcd7e1d7", + "id": 2583, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominate", + "nameLocation": "3029:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "3037:2:27" + }, + "returnParameters": { + "id": 2582, + "nodeType": "ParameterList", + "parameters": [], + "src": "3048:0:27" + }, + "scope": 2778, + "src": "3020:29:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2584, + "nodeType": "StructuredDocumentation", + "src": "3055:71:27", + "text": "@notice Self-withdrawal of nominations during the Nomination period" + }, + "functionSelector": "d11801cf", + "id": 2587, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawNomination", + "nameLocation": "3140:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2585, + "nodeType": "ParameterList", + "parameters": [], + "src": "3158:2:27" + }, + "returnParameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [], + "src": "3169:0:27" + }, + "scope": 2778, + "src": "3131:39:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2588, + "nodeType": "StructuredDocumentation", + "src": "3176:98:27", + "text": "@notice Allows anyone with vote power to vote on nominated candidates during the Voting period" + }, + "functionSelector": "84ae670c", + "id": 2594, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "cast", + "nameLocation": "3288:4:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2591, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3312:10:27", + "nodeType": "VariableDeclaration", + "scope": 2594, + "src": "3293:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3293:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2590, + "nodeType": "ArrayTypeName", + "src": "3293:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3292:31:27" + }, + "returnParameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [], + "src": "3332:0:27" + }, + "scope": 2778, + "src": "3279:54:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2595, + "nodeType": "StructuredDocumentation", + "src": "3339:39:27", + "text": "@notice Allows votes to be withdraw" + }, + "functionSelector": "d83eb231", + "id": 2598, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawVote", + "nameLocation": "3392:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [], + "src": "3404:2:27" + }, + "returnParameters": { + "id": 2597, + "nodeType": "ParameterList", + "parameters": [], + "src": "3415:0:27" + }, + "scope": 2778, + "src": "3383:33:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2599, + "nodeType": "StructuredDocumentation", + "src": "3422:90:27", + "text": "@notice Processes ballots in batches during the Evaluation period (after epochEndDate)" + }, + "functionSelector": "37143233", + "id": 2604, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "evaluate", + "nameLocation": "3526:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2601, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "3540:10:27", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "3535:15:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2600, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3535:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3534:17:27" + }, + "returnParameters": { + "id": 2603, + "nodeType": "ParameterList", + "parameters": [], + "src": "3560:0:27" + }, + "scope": 2778, + "src": "3517:44:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2605, + "nodeType": "StructuredDocumentation", + "src": "3567:78:27", + "text": "@notice Shuffles NFTs and resolves an election after it has been evaluated" + }, + "functionSelector": "2810e1d6", + "id": 2608, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "resolve", + "nameLocation": "3659:7:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2606, + "nodeType": "ParameterList", + "parameters": [], + "src": "3666:2:27" + }, + "returnParameters": { + "id": 2607, + "nodeType": "ParameterList", + "parameters": [], + "src": "3677:0:27" + }, + "scope": 2778, + "src": "3650:28:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2609, + "nodeType": "StructuredDocumentation", + "src": "3801:77:27", + "text": "@notice Exposes minimum durations required when adjusting epoch schedules" + }, + "functionSelector": "8625c053", + "id": 2618, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "3892:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2610, + "nodeType": "ParameterList", + "parameters": [], + "src": "3912:2:27" + }, + "returnParameters": { + "id": 2617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2612, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "3982:27:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "3975:34:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2611, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3975:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2614, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "4030:23:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4023:30:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2613, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4023:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2616, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "4074:16:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4067:23:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2615, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4067:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3961:139:27" + }, + "scope": 2778, + "src": "3883:218:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2619, + "nodeType": "StructuredDocumentation", + "src": "4107:79:27", + "text": "@notice Exposes maximum size of adjustments when calling tweakEpochSchedule" + }, + "functionSelector": "e9544a51", + "id": 2624, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "4200:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2620, + "nodeType": "ParameterList", + "parameters": [], + "src": "4229:2:27" + }, + "returnParameters": { + "id": 2623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2622, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2624, + "src": "4255:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2621, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4255:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4254:8:27" + }, + "scope": 2778, + "src": "4191:72:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2625, + "nodeType": "StructuredDocumentation", + "src": "4269:84:27", + "text": "@notice Shows the default batch size when calling evaluate() with numBallots = 0" + }, + "functionSelector": "0f98dfba", + "id": 2630, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "4367:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "4402:2:27" + }, + "returnParameters": { + "id": 2629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2630, + "src": "4428:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2627, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4428:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4427:6:27" + }, + "scope": 2778, + "src": "4358:76:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2631, + "nodeType": "StructuredDocumentation", + "src": "4440:77:27", + "text": "@notice Shows the number of council members that the next epoch will have" + }, + "functionSelector": "447068ef", + "id": 2636, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "4531:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2632, + "nodeType": "ParameterList", + "parameters": [], + "src": "4552:2:27" + }, + "returnParameters": { + "id": 2635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2634, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "4578:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2633, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4578:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4577:7:27" + }, + "scope": 2778, + "src": "4522:63:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2637, + "nodeType": "StructuredDocumentation", + "src": "4591:100:27", + "text": "@notice Returns the minimum active members that the council needs to avoid an emergency election" + }, + "functionSelector": "85160425", + "id": 2642, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "4705:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2638, + "nodeType": "ParameterList", + "parameters": [], + "src": "4728:2:27" + }, + "returnParameters": { + "id": 2641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "4754:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2639, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4754:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4753:7:27" + }, + "scope": 2778, + "src": "4696:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2643, + "nodeType": "StructuredDocumentation", + "src": "4767:80:27", + "text": "@notice Returns the index of the current epoch. The first epoch's index is 1" + }, + "functionSelector": "ffe7f643", + "id": 2648, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "4861:13:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2644, + "nodeType": "ParameterList", + "parameters": [], + "src": "4874:2:27" + }, + "returnParameters": { + "id": 2647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2646, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2648, + "src": "4900:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2645, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4900:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4899:6:27" + }, + "scope": 2778, + "src": "4852:54:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2649, + "nodeType": "StructuredDocumentation", + "src": "4912:63:27", + "text": "@notice Returns the date in which the current epoch started" + }, + "functionSelector": "ce04e44c", + "id": 2654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "4989:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2650, + "nodeType": "ParameterList", + "parameters": [], + "src": "5006:2:27" + }, + "returnParameters": { + "id": 2653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2652, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2654, + "src": "5032:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2651, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5032:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5031:8:27" + }, + "scope": 2778, + "src": "4980:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2655, + "nodeType": "StructuredDocumentation", + "src": "5046:64:27", + "text": "@notice Returns the date in which the current epoch will end" + }, + "functionSelector": "362c906d", + "id": 2660, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "5124:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2656, + "nodeType": "ParameterList", + "parameters": [], + "src": "5139:2:27" + }, + "returnParameters": { + "id": 2659, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2658, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2660, + "src": "5165:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2657, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5165:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5164:8:27" + }, + "scope": 2778, + "src": "5115:58:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2661, + "nodeType": "StructuredDocumentation", + "src": "5179:91:27", + "text": "@notice Returns the date in which the Nomination period in the current epoch will start" + }, + "functionSelector": "e420d7f9", + "id": 2666, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "5284:28:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2662, + "nodeType": "ParameterList", + "parameters": [], + "src": "5312:2:27" + }, + "returnParameters": { + "id": 2665, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2664, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2666, + "src": "5338:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2663, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5338:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5337:8:27" + }, + "scope": 2778, + "src": "5275:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2667, + "nodeType": "StructuredDocumentation", + "src": "5352:87:27", + "text": "@notice Returns the date in which the Voting period in the current epoch will start" + }, + "functionSelector": "e1509015", + "id": 2672, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "5453:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2668, + "nodeType": "ParameterList", + "parameters": [], + "src": "5477:2:27" + }, + "returnParameters": { + "id": 2671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2670, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2672, + "src": "5503:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2669, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5503:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5502:8:27" + }, + "scope": 2778, + "src": "5444:67:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2673, + "nodeType": "StructuredDocumentation", + "src": "5517:91:27", + "text": "@notice Returns the current period type: Administration, Nomination, Voting, Evaluation" + }, + "functionSelector": "086146d2", + "id": 2678, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "5622:16:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2674, + "nodeType": "ParameterList", + "parameters": [], + "src": "5638:2:27" + }, + "returnParameters": { + "id": 2677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2678, + "src": "5664:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2675, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5664:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5663:6:27" + }, + "scope": 2778, + "src": "5613:57:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2679, + "nodeType": "StructuredDocumentation", + "src": "5676:72:27", + "text": "@notice Shows if a candidate has been nominated in the current epoch" + }, + "functionSelector": "3a3e6c81", + "id": 2686, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "5762:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2681, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "5782:9:27", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5774:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5774:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5773:19:27" + }, + "returnParameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5816:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5816:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5815:6:27" + }, + "scope": 2778, + "src": "5753:69:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2687, + "nodeType": "StructuredDocumentation", + "src": "5828:75:27", + "text": "@notice Returns a list of all nominated candidates in the current epoch" + }, + "functionSelector": "9636f67c", + "id": 2693, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "5917:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2688, + "nodeType": "ParameterList", + "parameters": [], + "src": "5928:2:27" + }, + "returnParameters": { + "id": 2692, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2691, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2693, + "src": "5954:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2689, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5954:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ArrayTypeName", + "src": "5954:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5953:18:27" + }, + "scope": 2778, + "src": "5908:64:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2694, + "nodeType": "StructuredDocumentation", + "src": "5978:82:27", + "text": "@notice Hashes a list of candidates (used for identifying and storing ballots)" + }, + "functionSelector": "edc968ba", + "id": 2702, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "6074:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2697, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6111:10:27", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6092:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6092:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2696, + "nodeType": "ArrayTypeName", + "src": "6092:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6091:31:27" + }, + "returnParameters": { + "id": 2701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2700, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6146:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2699, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6146:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6145:9:27" + }, + "scope": 2778, + "src": "6065:90:27", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2703, + "nodeType": "StructuredDocumentation", + "src": "6161:76:27", + "text": "@notice Returns the ballot id that user voted on in the current election" + }, + "functionSelector": "95ff6584", + "id": 2710, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "6251:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2706, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "user", + "nameLocation": "6274:4:27", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6266:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6266:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6265:14:27" + }, + "returnParameters": { + "id": 2709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2708, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6303:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2707, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6303:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6302:9:27" + }, + "scope": 2778, + "src": "6242:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2711, + "nodeType": "StructuredDocumentation", + "src": "6318:61:27", + "text": "@notice Returns if user has voted in the current election" + }, + "functionSelector": "09eef43e", + "id": 2718, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "6393:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2713, + "mutability": "mutable", + "name": "user", + "nameLocation": "6410:4:27", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6402:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6402:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6401:14:27" + }, + "returnParameters": { + "id": 2717, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2716, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6439:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6439:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "6438:6:27" + }, + "scope": 2778, + "src": "6384:61:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2719, + "nodeType": "StructuredDocumentation", + "src": "6451:66:27", + "text": "@notice Returns the vote power of user in the current election" + }, + "functionSelector": "bb9c0920", + "id": 2726, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "6531:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "user", + "nameLocation": "6552:4:27", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6544:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2720, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6544:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6543:14:27" + }, + "returnParameters": { + "id": 2725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2724, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6581:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2723, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6581:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6580:6:27" + }, + "scope": 2778, + "src": "6522:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2727, + "nodeType": "StructuredDocumentation", + "src": "6593:68:27", + "text": "@notice Returns the number of votes given to a particular ballot" + }, + "functionSelector": "7a3bc0ee", + "id": 2734, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "6675:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2729, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6698:8:27", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6690:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2728, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6690:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6689:18:27" + }, + "returnParameters": { + "id": 2733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2732, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6731:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2731, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6731:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6730:6:27" + }, + "scope": 2778, + "src": "6666:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2735, + "nodeType": "StructuredDocumentation", + "src": "6743:71:27", + "text": "@notice Returns the list of candidates that a particular ballot has" + }, + "functionSelector": "655aaaca", + "id": 2743, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "6828:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2738, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2737, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6856:8:27", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6848:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2736, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6848:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6847:18:27" + }, + "returnParameters": { + "id": 2742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2741, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6889:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6889:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2740, + "nodeType": "ArrayTypeName", + "src": "6889:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6888:18:27" + }, + "scope": 2778, + "src": "6819:88:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2744, + "nodeType": "StructuredDocumentation", + "src": "6913:81:27", + "text": "@notice Returns whether all ballots in the current election have been counted" + }, + "functionSelector": "e327b585", + "id": 2749, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "7008:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2745, + "nodeType": "ParameterList", + "parameters": [], + "src": "7027:2:27" + }, + "returnParameters": { + "id": 2748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2747, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2749, + "src": "7053:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2746, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7053:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7052:6:27" + }, + "scope": 2778, + "src": "6999:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2750, + "nodeType": "StructuredDocumentation", + "src": "7065:120:27", + "text": "@notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "d82f25f0", + "id": 2757, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "7199:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2752, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "7225:9:27", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7217:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7217:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7216:19:27" + }, + "returnParameters": { + "id": 2756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2755, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7259:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2754, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7259:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7258:6:27" + }, + "scope": 2778, + "src": "7190:75:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2758, + "nodeType": "StructuredDocumentation", + "src": "7271:115:27", + "text": "@notice Returns the winners of the current election. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "f2516dbf", + "id": 2764, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "7400:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2759, + "nodeType": "ParameterList", + "parameters": [], + "src": "7418:2:27" + }, + "returnParameters": { + "id": 2763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2762, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7444:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7444:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2761, + "nodeType": "ArrayTypeName", + "src": "7444:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7443:18:27" + }, + "scope": 2778, + "src": "7391:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2765, + "nodeType": "StructuredDocumentation", + "src": "7468:56:27", + "text": "@notice Returns the address of the council NFT token" + }, + "functionSelector": "c07de0d3", + "id": 2770, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "7538:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2766, + "nodeType": "ParameterList", + "parameters": [], + "src": "7553:2:27" + }, + "returnParameters": { + "id": 2769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2768, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2770, + "src": "7579:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7579:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7578:9:27" + }, + "scope": 2778, + "src": "7529:59:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2771, + "nodeType": "StructuredDocumentation", + "src": "7594:49:27", + "text": "@notice Returns the current NFT token holders" + }, + "functionSelector": "606a6b76", + "id": 2777, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "7657:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2772, + "nodeType": "ParameterList", + "parameters": [], + "src": "7674:2:27" + }, + "returnParameters": { + "id": 2776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2775, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2777, + "src": "7700:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7700:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2774, + "nodeType": "ArrayTypeName", + "src": "7700:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7699:18:27" + }, + "scope": 2778, + "src": "7648:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2779, + "src": "134:7586:27", + "usedErrors": [] + } + ], + "src": "31:7690:27" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\n\n/// @dev Provides core schedule functionality. I.e. dates, periods, etc\ncontract ElectionSchedule is ElectionBase {\n /// @dev Used to allow certain functions to only operate within a given period\n modifier onlyInPeriod(ElectionPeriod period) {\n _onlyInPeriod(period);\n\n _;\n }\n\n function _onlyInPeriod(ElectionPeriod period) private view {\n if (_getCurrentPeriod() != period) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Only allow to run in any of the given two periods\n modifier onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) {\n _onlyInPeriods(period1, period2);\n\n _;\n }\n\n function _onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) private view {\n ElectionPeriod currentPeriod = _getCurrentPeriod();\n\n if (currentPeriod != period1 && currentPeriod != period2) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Determines the current period type according to the current time and the epoch's dates\n function _getCurrentPeriod() internal view returns (ElectionPeriod) {\n if (!_electionStore().initialized) {\n revert InitError.NotInitialized();\n }\n\n EpochData storage epoch = _getCurrentEpoch();\n\n uint64 currentTime = uint64(block.timestamp);\n\n if (currentTime >= epoch.endDate) {\n return ElectionPeriod.Evaluation;\n }\n\n if (currentTime >= epoch.votingPeriodStartDate) {\n return ElectionPeriod.Vote;\n }\n\n if (currentTime >= epoch.nominationPeriodStartDate) {\n return ElectionPeriod.Nomination;\n }\n\n return ElectionPeriod.Administration;\n }\n\n /// @dev Sets dates within an epoch, with validations\n function _configureEpochSchedule(\n EpochData storage epoch,\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n _validateEpochSchedule(epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n epoch.startDate = epochStartDate;\n epoch.nominationPeriodStartDate = nominationPeriodStartDate;\n epoch.votingPeriodStartDate = votingPeriodStartDate;\n epoch.endDate = epochEndDate;\n }\n\n /// @dev Ensures epoch dates are in the correct order, durations are above minimums, etc\n function _validateEpochSchedule(\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) private view {\n if (\n epochEndDate <= votingPeriodStartDate ||\n votingPeriodStartDate <= nominationPeriodStartDate ||\n nominationPeriodStartDate <= epochStartDate\n ) {\n revert InvalidEpochConfiguration();\n }\n\n uint64 epochDuration = epochEndDate - epochStartDate;\n uint64 votingPeriodDuration = epochEndDate - votingPeriodStartDate;\n uint64 nominationPeriodDuration = votingPeriodStartDate - nominationPeriodStartDate;\n\n ElectionSettings storage settings = _electionSettings();\n\n if (\n epochDuration < settings.minEpochDuration ||\n nominationPeriodDuration < settings.minNominationPeriodDuration ||\n votingPeriodDuration < settings.minVotingPeriodDuration\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n /// @dev Changes epoch dates, with validations\n function _adjustEpochSchedule(\n EpochData storage epoch,\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate,\n bool ensureChangesAreSmall\n ) internal {\n uint64 maxDateAdjustmentTolerance = _electionSettings().maxDateAdjustmentTolerance;\n ElectionPeriod initialPeriod = _getCurrentPeriod();\n\n if (ensureChangesAreSmall) {\n if (\n _uint64AbsDifference(newEpochEndDate, epoch.endDate) > maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newNominationPeriodStartDate, epoch.nominationPeriodStartDate) >\n maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newVotingPeriodStartDate, epoch.votingPeriodStartDate) > maxDateAdjustmentTolerance\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n _configureEpochSchedule(\n epoch,\n epoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n\n if (_getCurrentPeriod() != initialPeriod) {\n revert ChangesCurrentPeriod();\n }\n }\n\n /// @dev Moves schedule forward to immediately jump to the nomination period\n function _jumpToNominationPeriod() internal {\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 nominationPeriodDuration = _getNominationPeriodDuration(currentEpoch);\n uint64 votingPeriodDuration = _getVotingPeriodDuration(currentEpoch);\n\n // Keep the previous durations, but shift everything back\n // so that nominations start now\n uint64 newNominationPeriodStartDate = uint64(block.timestamp);\n uint64 newVotingPeriodStartDate = newNominationPeriodStartDate + nominationPeriodDuration;\n uint64 newEpochEndDate = newVotingPeriodStartDate + votingPeriodDuration;\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n }\n\n /// @dev Copies the current epoch schedule to the next epoch, maintaining durations\n function _copyScheduleFromPreviousEpoch() internal {\n EpochData storage previousEpoch = _getPreviousEpoch();\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 currentEpochStartDate = uint64(block.timestamp);\n uint64 currentEpochEndDate = currentEpochStartDate + _getEpochDuration(previousEpoch);\n uint64 currentVotingPeriodStartDate = currentEpochEndDate - _getVotingPeriodDuration(previousEpoch);\n uint64 currentNominationPeriodStartDate = currentVotingPeriodStartDate - _getNominationPeriodDuration(previousEpoch);\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpochStartDate,\n currentNominationPeriodStartDate,\n currentVotingPeriodStartDate,\n currentEpochEndDate\n );\n }\n\n /// @dev Sets the minimum epoch durations, with validations\n function _setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) internal {\n ElectionSettings storage settings = _electionSettings();\n\n if (newMinNominationPeriodDuration == 0 || newMinVotingPeriodDuration == 0 || newMinEpochDuration == 0) {\n revert InvalidElectionSettings();\n }\n\n settings.minNominationPeriodDuration = newMinNominationPeriodDuration;\n settings.minVotingPeriodDuration = newMinVotingPeriodDuration;\n settings.minEpochDuration = newMinEpochDuration;\n }\n\n function _uint64AbsDifference(uint64 valueA, uint64 valueB) private pure returns (uint64) {\n return valueA > valueB ? valueA - valueB : valueB - valueA;\n }\n\n function _getEpochDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.startDate;\n }\n\n function _getVotingPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.votingPeriodStartDate;\n }\n\n function _getNominationPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.votingPeriodStartDate - epoch.nominationPeriodStartDate;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "InitError": [ + 32 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5631, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5067, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:36" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5068, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 4684, + "src": "56:28:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 5069, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 33, + "src": "85:68:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5071, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "256:12:36" + }, + "id": 5072, + "nodeType": "InheritanceSpecifier", + "src": "256:12:36" + } + ], + "canonicalName": "ElectionSchedule", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5070, + "nodeType": "StructuredDocumentation", + "src": "155:72:36", + "text": "@dev Provides core schedule functionality. I.e. dates, periods, etc" + }, + "fullyImplemented": true, + "id": 5630, + "linearizedBaseContracts": [ + 5630, + 4683, + 4331 + ], + "name": "ElectionSchedule", + "nameLocation": "236:16:36", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 5083, + "nodeType": "Block", + "src": "403:50:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5079, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5076, + "src": "427:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5078, + "name": "_onlyInPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "413:13:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "413:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5081, + "nodeType": "ExpressionStatement", + "src": "413:21:36" + }, + { + "id": 5082, + "nodeType": "PlaceholderStatement", + "src": "445:1:36" + } + ] + }, + "documentation": { + "id": 5073, + "nodeType": "StructuredDocumentation", + "src": "275:78:36", + "text": "@dev Used to allow certain functions to only operate within a given period" + }, + "id": 5084, + "name": "onlyInPeriod", + "nameLocation": "367:12:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5076, + "mutability": "mutable", + "name": "period", + "nameLocation": "395:6:36", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "380:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5074, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "380:14:36" + }, + "referencedDeclaration": 4342, + "src": "380:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "379:23:36" + }, + "src": "358:95:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5099, + "nodeType": "Block", + "src": "518:111:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5090, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "532:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "532:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5092, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "532:29:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5098, + "nodeType": "IfStatement", + "src": "528:95:36", + "trueBody": { + "id": 5097, + "nodeType": "Block", + "src": "563:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5094, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "584:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "584:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5096, + "nodeType": "RevertStatement", + "src": "577:35:36" + } + ] + } + } + ] + }, + "id": 5100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriod", + "nameLocation": "468:13:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5087, + "mutability": "mutable", + "name": "period", + "nameLocation": "497:6:36", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "482:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5085, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "482:14:36" + }, + "referencedDeclaration": 4342, + "src": "482:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "481:23:36" + }, + "returnParameters": { + "id": 5089, + "nodeType": "ParameterList", + "parameters": [], + "src": "518:0:36" + }, + "scope": 5630, + "src": "459:170:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5115, + "nodeType": "Block", + "src": "769:61:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5110, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "794:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "id": 5111, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5107, + "src": "803:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5109, + "name": "_onlyInPeriods", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5144, + "src": "779:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod,enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "779:32:36" + }, + { + "id": 5114, + "nodeType": "PlaceholderStatement", + "src": "822:1:36" + } + ] + }, + "documentation": { + "id": 5101, + "nodeType": "StructuredDocumentation", + "src": "635:58:36", + "text": "@dev Only allow to run in any of the given two periods" + }, + "id": 5116, + "name": "onlyInPeriods", + "nameLocation": "707:13:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5104, + "mutability": "mutable", + "name": "period1", + "nameLocation": "736:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "721:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5103, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5102, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "721:14:36" + }, + "referencedDeclaration": 4342, + "src": "721:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5107, + "mutability": "mutable", + "name": "period2", + "nameLocation": "760:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "745:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5106, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5105, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "745:14:36" + }, + "referencedDeclaration": 4342, + "src": "745:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "720:48:36" + }, + "src": "698:132:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5143, + "nodeType": "Block", + "src": "921:195:36", + "statements": [ + { + "assignments": [ + 5127 + ], + "declarations": [ + { + "constant": false, + "id": 5127, + "mutability": "mutable", + "name": "currentPeriod", + "nameLocation": "946:13:36", + "nodeType": "VariableDeclaration", + "scope": 5143, + "src": "931:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5126, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5125, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "931:14:36" + }, + "referencedDeclaration": 4342, + "src": "931:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5130, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5128, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "962:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "962:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "931:50:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5131, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "996:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5132, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "1013:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "996:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5134, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "1024:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5135, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5122, + "src": "1041:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "1024:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "996:52:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5142, + "nodeType": "IfStatement", + "src": "992:118:36", + "trueBody": { + "id": 5141, + "nodeType": "Block", + "src": "1050:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5138, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "1071:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1071:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5140, + "nodeType": "RevertStatement", + "src": "1064:35:36" + } + ] + } + } + ] + }, + "id": 5144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriods", + "nameLocation": "845:14:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "period1", + "nameLocation": "875:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "860:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5118, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5117, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "860:14:36" + }, + "referencedDeclaration": 4342, + "src": "860:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5122, + "mutability": "mutable", + "name": "period2", + "nameLocation": "899:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "884:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5121, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5120, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "884:14:36" + }, + "referencedDeclaration": 4342, + "src": "884:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "859:48:36" + }, + "returnParameters": { + "id": 5124, + "nodeType": "ParameterList", + "parameters": [], + "src": "921:0:36" + }, + "scope": 5630, + "src": "836:280:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5206, + "nodeType": "Block", + "src": "1290:595:36", + "statements": [ + { + "condition": { + "id": 5154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1304:29:36", + "subExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5151, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1305:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1305:16:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "1305:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5161, + "nodeType": "IfStatement", + "src": "1300:93:36", + "trueBody": { + "id": 5160, + "nodeType": "Block", + "src": "1335:58:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5155, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1356:9:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 5157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "1356:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1356:26:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5159, + "nodeType": "RevertStatement", + "src": "1349:33:36" + } + ] + } + }, + { + "assignments": [ + 5164 + ], + "declarations": [ + { + "constant": false, + "id": 5164, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "1421:5:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1403:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5163, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5162, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1403:9:36" + }, + "referencedDeclaration": 4270, + "src": "1403:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5167, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5165, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "1429:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1403:44:36" + }, + { + "assignments": [ + 5169 + ], + "declarations": [ + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "currentTime", + "nameLocation": "1465:11:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1458:18:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5168, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1458:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5175, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5172, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1486:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1486:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1479:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5170, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1479:6:36", + "typeDescriptions": {} + } + }, + "id": 5174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1479:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1458:44:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5176, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1517:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5177, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1532:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "1532:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1517:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5184, + "nodeType": "IfStatement", + "src": "1513:91:36", + "trueBody": { + "id": 5183, + "nodeType": "Block", + "src": "1547:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5180, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1568:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "1568:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5182, + "nodeType": "Return", + "src": "1561:32:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5185, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1618:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5186, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1633:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "1633:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1618:42:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5193, + "nodeType": "IfStatement", + "src": "1614:99:36", + "trueBody": { + "id": 5192, + "nodeType": "Block", + "src": "1662:51:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5189, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1683:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "1683:19:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5191, + "nodeType": "Return", + "src": "1676:26:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5194, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1727:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5195, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1742:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "1742:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1727:46:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5202, + "nodeType": "IfStatement", + "src": "1723:109:36", + "trueBody": { + "id": 5201, + "nodeType": "Block", + "src": "1775:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5198, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1796:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "1796:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5200, + "nodeType": "Return", + "src": "1789:32:36" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 5203, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1849:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "1849:29:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5205, + "nodeType": "Return", + "src": "1842:36:36" + } + ] + }, + "documentation": { + "id": 5145, + "nodeType": "StructuredDocumentation", + "src": "1122:95:36", + "text": "@dev Determines the current period type according to the current time and the epoch's dates" + }, + "id": 5207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentPeriod", + "nameLocation": "1231:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5146, + "nodeType": "ParameterList", + "parameters": [], + "src": "1248:2:36" + }, + "returnParameters": { + "id": 5150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5149, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5207, + "src": "1274:14:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5148, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5147, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "1274:14:36" + }, + "referencedDeclaration": 4342, + "src": "1274:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "1273:16:36" + }, + "scope": 5630, + "src": "1222:663:36", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5253, + "nodeType": "Block", + "src": "2170:330:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5223, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2203:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5224, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2219:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5225, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2246:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5226, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2269:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5222, + "name": "_validateEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "2180:22:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64,uint64) view" + } + }, + "id": 5227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2180:102:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5228, + "nodeType": "ExpressionStatement", + "src": "2180:102:36" + }, + { + "expression": { + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5229, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2293:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "2293:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5232, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2311:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2293:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5234, + "nodeType": "ExpressionStatement", + "src": "2293:32:36" + }, + { + "expression": { + "id": 5239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5235, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2335:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "2335:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5238, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2369:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2335:59:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5240, + "nodeType": "ExpressionStatement", + "src": "2335:59:36" + }, + { + "expression": { + "id": 5245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5241, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2404:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "2404:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5244, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2434:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2404:51:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5246, + "nodeType": "ExpressionStatement", + "src": "2404:51:36" + }, + { + "expression": { + "id": 5251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5247, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2465:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "2465:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5250, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2481:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2465:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5252, + "nodeType": "ExpressionStatement", + "src": "2465:28:36" + } + ] + }, + "documentation": { + "id": 5208, + "nodeType": "StructuredDocumentation", + "src": "1891:53:36", + "text": "@dev Sets dates within an epoch, with validations" + }, + "id": 5254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_configureEpochSchedule", + "nameLocation": "1958:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5211, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "2009:5:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "1991:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5210, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5209, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1991:9:36" + }, + "referencedDeclaration": 4270, + "src": "1991:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5213, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2031:14:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2024:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5212, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2024:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5215, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2062:25:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2055:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5214, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2055:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5217, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2104:21:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2097:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5216, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2097:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5219, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2142:12:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2135:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2135:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1981:179:36" + }, + "returnParameters": { + "id": 5221, + "nodeType": "ParameterList", + "parameters": [], + "src": "2170:0:36" + }, + "scope": 5630, + "src": "1949:551:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5325, + "nodeType": "Block", + "src": "2790:851:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5266, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "2817:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5267, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2833:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2817:37:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5269, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2870:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5270, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2895:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2870:50:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:103:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5273, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2936:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5274, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "2965:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2936:43:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:162:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5281, + "nodeType": "IfStatement", + "src": "2800:249:36", + "trueBody": { + "id": 5280, + "nodeType": "Block", + "src": "2990:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5277, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3011:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3011:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5279, + "nodeType": "RevertStatement", + "src": "3004:34:36" + } + ] + } + }, + { + "assignments": [ + 5283 + ], + "declarations": [ + { + "constant": false, + "id": 5283, + "mutability": "mutable", + "name": "epochDuration", + "nameLocation": "3066:13:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3059:20:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5282, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3059:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5284, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3082:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5285, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "3097:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3082:29:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3059:52:36" + }, + { + "assignments": [ + 5289 + ], + "declarations": [ + { + "constant": false, + "id": 5289, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "3128:20:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3121:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5288, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3121:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5293, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5290, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3151:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5291, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3166:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3151:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3121:66:36" + }, + { + "assignments": [ + 5295 + ], + "declarations": [ + { + "constant": false, + "id": 5295, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "3204:24:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3197:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5294, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3197:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5299, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5296, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3231:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5297, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "3255:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3231:49:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3197:83:36" + }, + { + "assignments": [ + 5302 + ], + "declarations": [ + { + "constant": false, + "id": 5302, + "mutability": "mutable", + "name": "settings", + "nameLocation": "3316:8:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3291:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5301, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5300, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3291:16:36" + }, + "referencedDeclaration": 4261, + "src": "3291:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5305, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5303, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3327:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3327:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3291:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5306, + "name": "epochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3374:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5307, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3390:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "3390:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3374:41:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5310, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5295, + "src": "3431:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5311, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3458:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "3458:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3431:63:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:120:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5315, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "3510:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5316, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3533:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "3533:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3510:55:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:191:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5324, + "nodeType": "IfStatement", + "src": "3357:278:36", + "trueBody": { + "id": 5323, + "nodeType": "Block", + "src": "3576:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5320, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3597:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3597:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5322, + "nodeType": "RevertStatement", + "src": "3590:34:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5255, + "nodeType": "StructuredDocumentation", + "src": "2506:88:36", + "text": "@dev Ensures epoch dates are in the correct order, durations are above minimums, etc" + }, + "id": 5326, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateEpochSchedule", + "nameLocation": "2608:22:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5257, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2647:14:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2640:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5256, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2640:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5259, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2678:25:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2671:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5258, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2671:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5261, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2720:21:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2713:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5260, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2713:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5263, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2758:12:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2751:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2751:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2630:146:36" + }, + "returnParameters": { + "id": 5265, + "nodeType": "ParameterList", + "parameters": [], + "src": "2790:0:36" + }, + "scope": 5630, + "src": "2599:1042:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5402, + "nodeType": "Block", + "src": "3930:983:36", + "statements": [ + { + "assignments": [ + 5342 + ], + "declarations": [ + { + "constant": false, + "id": 5342, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "3947:26:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "3940:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5341, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3940:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5346, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5343, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3976:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3976:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "3976:46:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3940:82:36" + }, + { + "assignments": [ + 5349 + ], + "declarations": [ + { + "constant": false, + "id": 5349, + "mutability": "mutable", + "name": "initialPeriod", + "nameLocation": "4047:13:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "4032:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5348, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5347, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "4032:14:36" + }, + "referencedDeclaration": 4342, + "src": "4032:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5352, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5350, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4063:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4063:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4032:50:36" + }, + { + "condition": { + "id": 5353, + "name": "ensureChangesAreSmall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5338, + "src": "4097:21:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5383, + "nodeType": "IfStatement", + "src": "4093:507:36", + "trueBody": { + "id": 5382, + "nodeType": "Block", + "src": "4120:480:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5355, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4176:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5356, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4193:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5357, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "4193:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5354, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4155:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4155:52:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5359, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4210:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4155:81:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5362, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4277:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5363, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4307:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5364, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "4307:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5361, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4256:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4256:83:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5366, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4358:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4256:128:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:229:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5370, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4425:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5371, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4451:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "4451:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5369, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4404:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4404:75:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5374, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4482:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4404:104:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:353:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5381, + "nodeType": "IfStatement", + "src": "4134:456:36", + "trueBody": { + "id": 5380, + "nodeType": "Block", + "src": "4523:67:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5377, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "4548:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4548:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5379, + "nodeType": "RevertStatement", + "src": "4541:34:36" + } + ] + } + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5385, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4647:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5386, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4666:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5387, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "4666:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5388, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4695:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5389, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4737:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5390, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4775:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5384, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "4610:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4610:190:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5392, + "nodeType": "ExpressionStatement", + "src": "4610:190:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5393, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4815:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4815:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5395, + "name": "initialPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5349, + "src": "4838:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "4815:36:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5401, + "nodeType": "IfStatement", + "src": "4811:96:36", + "trueBody": { + "id": 5400, + "nodeType": "Block", + "src": "4853:54:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5397, + "name": "ChangesCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4366, + "src": "4874:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4874:22:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5399, + "nodeType": "RevertStatement", + "src": "4867:29:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5327, + "nodeType": "StructuredDocumentation", + "src": "3647:46:36", + "text": "@dev Changes epoch dates, with validations" + }, + "id": 5403, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_adjustEpochSchedule", + "nameLocation": "3707:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5330, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "3755:5:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3737:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5329, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5328, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3737:9:36" + }, + "referencedDeclaration": 4270, + "src": "3737:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3777:28:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3770:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3770:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5334, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3822:24:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3815:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5333, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3815:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5336, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3863:15:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3856:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5335, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3856:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5338, + "mutability": "mutable", + "name": "ensureChangesAreSmall", + "nameLocation": "3893:21:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3888:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5337, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3888:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3727:193:36" + }, + "returnParameters": { + "id": 5340, + "nodeType": "ParameterList", + "parameters": [], + "src": "3930:0:36" + }, + "scope": 5630, + "src": "3698:1215:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5454, + "nodeType": "Block", + "src": "5044:808:36", + "statements": [ + { + "assignments": [ + 5409 + ], + "declarations": [ + { + "constant": false, + "id": 5409, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "5072:12:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5054:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5408, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5407, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "5054:9:36" + }, + "referencedDeclaration": 4270, + "src": "5054:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5412, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5410, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "5087:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5054:51:36" + }, + { + "assignments": [ + 5414 + ], + "declarations": [ + { + "constant": false, + "id": 5414, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "5123:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5116:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5413, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5116:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5418, + "initialValue": { + "arguments": [ + { + "id": 5416, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5179:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5415, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "5150:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5150:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5116:76:36" + }, + { + "assignments": [ + 5420 + ], + "declarations": [ + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "5209:20:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5202:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5419, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5202:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5424, + "initialValue": { + "arguments": [ + { + "id": 5422, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5257:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5421, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "5232:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:38:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5202:68:36" + }, + { + "assignments": [ + 5426 + ], + "declarations": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "5395:28:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5388:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5425, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5388:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5432, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5429, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "5433:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "5433:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5426:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5427, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5426:6:36", + "typeDescriptions": {} + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5426:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5388:61:36" + }, + { + "assignments": [ + 5434 + ], + "declarations": [ + { + "constant": false, + "id": 5434, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "5466:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5459:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5433, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5459:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5438, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5435, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5493:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5436, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5414, + "src": "5524:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5493:55:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5459:89:36" + }, + { + "assignments": [ + 5440 + ], + "declarations": [ + { + "constant": false, + "id": 5440, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "5565:15:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5558:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5439, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5558:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5444, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5441, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5583:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5442, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "5610:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5583:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5558:72:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5446, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5678:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5447, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5704:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5448, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "5704:22:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5449, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5740:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5450, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5782:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5451, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5440, + "src": "5820:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5445, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "5641:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5641:204:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5453, + "nodeType": "ExpressionStatement", + "src": "5641:204:36" + } + ] + }, + "documentation": { + "id": 5404, + "nodeType": "StructuredDocumentation", + "src": "4919:76:36", + "text": "@dev Moves schedule forward to immediately jump to the nomination period" + }, + "id": 5455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_jumpToNominationPeriod", + "nameLocation": "5009:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5405, + "nodeType": "ParameterList", + "parameters": [], + "src": "5032:2:36" + }, + "returnParameters": { + "id": 5406, + "nodeType": "ParameterList", + "parameters": [], + "src": "5044:0:36" + }, + "scope": 5630, + "src": "5000:852:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5511, + "nodeType": "Block", + "src": "5997:752:36", + "statements": [ + { + "assignments": [ + 5461 + ], + "declarations": [ + { + "constant": false, + "id": 5461, + "mutability": "mutable", + "name": "previousEpoch", + "nameLocation": "6025:13:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6007:31:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5460, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5459, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6007:9:36" + }, + "referencedDeclaration": 4270, + "src": "6007:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5464, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5462, + "name": "_getPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4562, + "src": "6041:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6041:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6007:53:36" + }, + { + "assignments": [ + 5467 + ], + "declarations": [ + { + "constant": false, + "id": 5467, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "6088:12:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6070:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5466, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5465, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6070:9:36" + }, + "referencedDeclaration": 4270, + "src": "6070:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5470, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5468, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "6103:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6103:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6070:51:36" + }, + { + "assignments": [ + 5472 + ], + "declarations": [ + { + "constant": false, + "id": 5472, + "mutability": "mutable", + "name": "currentEpochStartDate", + "nameLocation": "6139:21:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6132:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5471, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6132:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5478, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6170:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "6170:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6163:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5473, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6163:6:36", + "typeDescriptions": {} + } + }, + "id": 5477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6132:54:36" + }, + { + "assignments": [ + 5480 + ], + "declarations": [ + { + "constant": false, + "id": 5480, + "mutability": "mutable", + "name": "currentEpochEndDate", + "nameLocation": "6203:19:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6196:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5479, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6196:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5486, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5481, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6225:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 5483, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6267:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5482, + "name": "_getEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5599, + "src": "6249:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6249:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6225:56:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6196:85:36" + }, + { + "assignments": [ + 5488 + ], + "declarations": [ + { + "constant": false, + "id": 5488, + "mutability": "mutable", + "name": "currentVotingPeriodStartDate", + "nameLocation": "6298:28:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6291:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5487, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6291:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5494, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5489, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6329:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5491, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6376:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5490, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "6351:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:39:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6329:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6291:99:36" + }, + { + "assignments": [ + 5496 + ], + "declarations": [ + { + "constant": false, + "id": 5496, + "mutability": "mutable", + "name": "currentNominationPeriodStartDate", + "nameLocation": "6407:32:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6400:39:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5495, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6400:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5502, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5497, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6442:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5499, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6502:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5498, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "6473:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6473:43:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6442:74:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6400:116:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5504, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5467, + "src": "6564:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 5505, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6590:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5506, + "name": "currentNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "6625:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5507, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6671:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5508, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6713:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5503, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "6527:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6527:215:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5510, + "nodeType": "ExpressionStatement", + "src": "6527:215:36" + } + ] + }, + "documentation": { + "id": 5456, + "nodeType": "StructuredDocumentation", + "src": "5858:83:36", + "text": "@dev Copies the current epoch schedule to the next epoch, maintaining durations" + }, + "id": 5512, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_copyScheduleFromPreviousEpoch", + "nameLocation": "5955:30:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5985:2:36" + }, + "returnParameters": { + "id": 5458, + "nodeType": "ParameterList", + "parameters": [], + "src": "5997:0:36" + }, + "scope": 5630, + "src": "5946:803:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5562, + "nodeType": "Block", + "src": "6991:451:36", + "statements": [ + { + "assignments": [ + 5524 + ], + "declarations": [ + { + "constant": false, + "id": 5524, + "mutability": "mutable", + "name": "settings", + "nameLocation": "7026:8:36", + "nodeType": "VariableDeclaration", + "scope": 5562, + "src": "7001:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5523, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5522, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "7001:16:36" + }, + "referencedDeclaration": 4261, + "src": "7001:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5527, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5525, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7037:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7001:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5528, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7071:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7105:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7071:35:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5531, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7110:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7110:31:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:70:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5535, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7145:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7168:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7145:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:98:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5543, + "nodeType": "IfStatement", + "src": "7067:161:36", + "trueBody": { + "id": 5542, + "nodeType": "Block", + "src": "7171:57:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5539, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "7192:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5541, + "nodeType": "RevertStatement", + "src": "7185:32:36" + } + ] + } + }, + { + "expression": { + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5544, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7238:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "7238:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5547, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7277:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7238:69:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5549, + "nodeType": "ExpressionStatement", + "src": "7238:69:36" + }, + { + "expression": { + "id": 5554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5550, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7317:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5552, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "7317:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5553, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7352:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7317:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5555, + "nodeType": "ExpressionStatement", + "src": "7317:61:36" + }, + { + "expression": { + "id": 5560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5556, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7388:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "7388:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5559, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7416:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7388:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5561, + "nodeType": "ExpressionStatement", + "src": "7388:47:36" + } + ] + }, + "documentation": { + "id": 5513, + "nodeType": "StructuredDocumentation", + "src": "6755:59:36", + "text": "@dev Sets the minimum epoch durations, with validations" + }, + "id": 5563, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setMinEpochDurations", + "nameLocation": "6828:21:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5515, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "6866:30:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6859:37:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5514, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6859:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "6913:26:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6906:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5516, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6906:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5519, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "6956:19:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6949:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5518, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6949:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "6849:132:36" + }, + "returnParameters": { + "id": 5521, + "nodeType": "ParameterList", + "parameters": [], + "src": "6991:0:36" + }, + "scope": 5630, + "src": "6819:623:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5583, + "nodeType": "Block", + "src": "7538:75:36", + "statements": [ + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5572, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5573, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7564:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7555:15:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5578, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7591:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5579, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7600:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7591:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "7555:51:36", + "trueExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5575, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7573:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5576, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7582:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7573:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5571, + "id": 5582, + "nodeType": "Return", + "src": "7548:58:36" + } + ] + }, + "id": 5584, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_uint64AbsDifference", + "nameLocation": "7457:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5565, + "mutability": "mutable", + "name": "valueA", + "nameLocation": "7485:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7478:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5564, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7478:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5567, + "mutability": "mutable", + "name": "valueB", + "nameLocation": "7500:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7493:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5566, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7493:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7477:30:36" + }, + "returnParameters": { + "id": 5571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5570, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7530:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5569, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7530:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7529:8:36" + }, + "scope": 5630, + "src": "7448:165:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5598, + "nodeType": "Block", + "src": "7701:55:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5592, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7718:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7718:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5594, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7734:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "7734:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7718:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5591, + "id": 5597, + "nodeType": "Return", + "src": "7711:38:36" + } + ] + }, + "id": 5599, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochDuration", + "nameLocation": "7628:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5587, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7664:5:36", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7646:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5586, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5585, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7646:9:36" + }, + "referencedDeclaration": 4270, + "src": "7646:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7645:25:36" + }, + "returnParameters": { + "id": 5591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5590, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7693:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5589, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7693:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7692:8:36" + }, + "scope": 5630, + "src": "7619:137:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5613, + "nodeType": "Block", + "src": "7851:67:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5607, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7868:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7868:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5609, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7884:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "7884:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7868:43:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5606, + "id": 5612, + "nodeType": "Return", + "src": "7861:50:36" + } + ] + }, + "id": 5614, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotingPeriodDuration", + "nameLocation": "7771:24:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5602, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7814:5:36", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7796:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5601, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5600, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7796:9:36" + }, + "referencedDeclaration": 4270, + "src": "7796:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7795:25:36" + }, + "returnParameters": { + "id": 5606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5605, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7843:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5604, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7843:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7842:8:36" + }, + "scope": 5630, + "src": "7762:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5628, + "nodeType": "Block", + "src": "8017:85:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5622, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8034:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5623, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "8034:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5624, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8064:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "8064:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "8034:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5621, + "id": 5627, + "nodeType": "Return", + "src": "8027:68:36" + } + ] + }, + "id": 5629, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getNominationPeriodDuration", + "nameLocation": "7933:28:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5617, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7980:5:36", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "7962:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5616, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5615, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7962:9:36" + }, + "referencedDeclaration": 4270, + "src": "7962:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7961:25:36" + }, + "returnParameters": { + "id": 5621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5620, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "8009:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5619, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8009:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "8008:8:36" + }, + "scope": 5630, + "src": "7924:178:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5631, + "src": "227:7877:36", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:8074:36" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\n\n/// @dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()\ncontract ElectionTally is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _evaluateNextBallotBatch(uint numBallots) internal {\n if (numBallots == 0) {\n numBallots = _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n ElectionData storage election = _getCurrentElection();\n uint totalBallots = election.ballotIds.length;\n\n uint firstBallotIndex = election.numEvaluatedBallots;\n\n uint lastBallotIndex = firstBallotIndex + numBallots;\n if (lastBallotIndex > totalBallots) {\n lastBallotIndex = totalBallots;\n }\n\n _evaluateBallotRange(election, firstBallotIndex, lastBallotIndex);\n }\n\n function _evaluateBallotRange(\n ElectionData storage election,\n uint fromIndex,\n uint toIndex\n ) private {\n ElectionSettings storage settings = _electionSettings();\n uint numSeats = settings.nextEpochSeatCount;\n\n for (uint ballotIndex = fromIndex; ballotIndex < toIndex; ballotIndex++) {\n bytes32 ballotId = election.ballotIds[ballotIndex];\n BallotData storage ballot = election.ballotsById[ballotId];\n\n _evaluateBallot(election, ballot, numSeats);\n }\n }\n\n function _evaluateBallot(\n ElectionData storage election,\n BallotData storage ballot,\n uint numSeats\n ) internal {\n uint ballotVotes = ballot.votes;\n\n uint numCandidates = ballot.candidates.length;\n for (uint candidateIndex = 0; candidateIndex < numCandidates; candidateIndex++) {\n address candidate = ballot.candidates[candidateIndex];\n\n uint currentCandidateVotes = election.candidateVotes[candidate];\n uint newCandidateVotes = currentCandidateVotes + ballotVotes;\n election.candidateVotes[candidate] = newCandidateVotes;\n\n _updateWinnerSet(election, candidate, newCandidateVotes, numSeats);\n }\n\n election.numEvaluatedBallots += 1;\n }\n\n function _updateWinnerSet(\n ElectionData storage election,\n address candidate,\n uint candidateVotes,\n uint numSeats\n ) private {\n SetUtil.AddressSet storage winners = election.winners;\n\n // Already a winner?\n if (winners.contains(candidate)) {\n return;\n }\n\n // Just take first empty seat if\n // the set is not complete yet.\n if (winners.length() < numSeats) {\n winners.add(candidate);\n\n return;\n }\n\n // Otherwise, replace the winner with the least votes\n // in the set.\n (address leastVotedWinner, uint leastVotes) = _findWinnerWithLeastVotes(election, winners);\n\n if (candidateVotes > leastVotes) {\n winners.replace(leastVotedWinner, candidate);\n }\n }\n\n function _findWinnerWithLeastVotes(ElectionData storage election, SetUtil.AddressSet storage winners)\n private\n view\n returns (address leastVotedWinner, uint leastVotes)\n {\n leastVotes = type(uint).max;\n\n uint numWinners = winners.length();\n\n for (uint8 winnerPosition = 1; winnerPosition <= numWinners; winnerPosition++) {\n address winner = winners.valueAt(winnerPosition);\n uint winnerVotes = election.candidateVotes[winner];\n\n if (winnerVotes < leastVotes) {\n leastVotes = winnerVotes;\n\n leastVotedWinner = winner;\n }\n }\n\n return (leastVotedWinner, leastVotes);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5962, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5632, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:37" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5633, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5962, + "sourceUnit": 4684, + "src": "56:28:37", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5635, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "211:12:37" + }, + "id": 5636, + "nodeType": "InheritanceSpecifier", + "src": "211:12:37" + } + ], + "canonicalName": "ElectionTally", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5634, + "nodeType": "StructuredDocumentation", + "src": "86:99:37", + "text": "@dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()" + }, + "fullyImplemented": true, + "id": 5961, + "linearizedBaseContracts": [ + 5961, + 4683, + 4331 + ], + "name": "ElectionTally", + "nameLocation": "194:13:37", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5640, + "libraryName": { + "id": 5637, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "236:7:37" + }, + "nodeType": "UsingForDirective", + "src": "230:37:37", + "typeName": { + "id": 5639, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5638, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "248:18:37" + }, + "referencedDeclaration": 1788, + "src": "248:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 5694, + "nodeType": "Block", + "src": "333:548:37", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5645, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "347:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "361:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "347:15:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5655, + "nodeType": "IfStatement", + "src": "343:111:37", + "trueBody": { + "id": 5654, + "nodeType": "Block", + "src": "364:90:37", + "statements": [ + { + "expression": { + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5648, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "378:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5649, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "391:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "391:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5651, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "391:52:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "378:65:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5653, + "nodeType": "ExpressionStatement", + "src": "378:65:37" + } + ] + } + }, + { + "assignments": [ + 5658 + ], + "declarations": [ + { + "constant": false, + "id": 5658, + "mutability": "mutable", + "name": "election", + "nameLocation": "485:8:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "464:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5657, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5656, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "464:12:37" + }, + "referencedDeclaration": 4299, + "src": "464:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 5661, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5659, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "496:19:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 5660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "496:21:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "464:53:37" + }, + { + "assignments": [ + 5663 + ], + "declarations": [ + { + "constant": false, + "id": 5663, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "532:12:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "527:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5662, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "527:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5667, + "initialValue": { + "expression": { + "expression": { + "id": 5664, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "547:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "547:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "547:25:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "527:45:37" + }, + { + "assignments": [ + 5669 + ], + "declarations": [ + { + "constant": false, + "id": 5669, + "mutability": "mutable", + "name": "firstBallotIndex", + "nameLocation": "588:16:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "583:21:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5668, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "583:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5672, + "initialValue": { + "expression": { + "id": 5670, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "607:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "607:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "583:52:37" + }, + { + "assignments": [ + 5674 + ], + "declarations": [ + { + "constant": false, + "id": 5674, + "mutability": "mutable", + "name": "lastBallotIndex", + "nameLocation": "651:15:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "646:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5673, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5678, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5675, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "669:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5676, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "688:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "669:29:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "646:52:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5679, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "712:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5680, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "730:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "712:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5687, + "nodeType": "IfStatement", + "src": "708:91:37", + "trueBody": { + "id": 5686, + "nodeType": "Block", + "src": "744:55:37", + "statements": [ + { + "expression": { + "id": 5684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5682, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "758:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5683, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "776:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "758:30:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5685, + "nodeType": "ExpressionStatement", + "src": "758:30:37" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5689, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "830:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5690, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "840:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5691, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "858:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5688, + "name": "_evaluateBallotRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5750, + "src": "809:20:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,uint256,uint256)" + } + }, + "id": 5692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "809:65:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5693, + "nodeType": "ExpressionStatement", + "src": "809:65:37" + } + ] + }, + "id": 5695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateNextBallotBatch", + "nameLocation": "282:24:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5642, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "312:10:37", + "nodeType": "VariableDeclaration", + "scope": 5695, + "src": "307:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "307:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "306:17:37" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [], + "src": "333:0:37" + }, + "scope": 5961, + "src": "273:608:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5749, + "nodeType": "Block", + "src": "1016:413:37", + "statements": [ + { + "assignments": [ + 5707 + ], + "declarations": [ + { + "constant": false, + "id": 5707, + "mutability": "mutable", + "name": "settings", + "nameLocation": "1051:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1026:33:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5706, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5705, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1026:16:37" + }, + "referencedDeclaration": 4261, + "src": "1026:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5708, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "1062:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1062:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1026:55:37" + }, + { + "assignments": [ + 5712 + ], + "declarations": [ + { + "constant": false, + "id": 5712, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1096:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1091:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1091:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5715, + "initialValue": { + "expression": { + "id": 5713, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5707, + "src": "1107:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5714, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "1107:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1091:43:37" + }, + { + "body": { + "id": 5747, + "nodeType": "Block", + "src": "1218:205:37", + "statements": [ + { + "assignments": [ + 5727 + ], + "declarations": [ + { + "constant": false, + "id": 5727, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1240:8:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1232:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5726, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1232:7:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 5732, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5728, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1251:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1251:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5731, + "indexExpression": { + "id": 5730, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1270:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1251:31:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1232:50:37" + }, + { + "assignments": [ + 5735 + ], + "declarations": [ + { + "constant": false, + "id": 5735, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1315:6:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1296:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5734, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5733, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1296:10:37" + }, + "referencedDeclaration": 4309, + "src": "1296:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 5740, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5736, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1324:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5737, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "1324:20:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 5739, + "indexExpression": { + "id": 5738, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5727, + "src": "1345:8:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1324:30:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1296:58:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5742, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1385:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5743, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5735, + "src": "1395:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + { + "id": 5744, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5712, + "src": "1403:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5741, + "name": "_evaluateBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5826, + "src": "1369:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_BallotData_$4309_storage_ptr_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct ElectionStorage.BallotData storage pointer,uint256)" + } + }, + "id": 5745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1369:43:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5746, + "nodeType": "ExpressionStatement", + "src": "1369:43:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5720, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1180:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5721, + "name": "toIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5702, + "src": "1194:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1180:21:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5748, + "initializationExpression": { + "assignments": [ + 5717 + ], + "declarations": [ + { + "constant": false, + "id": 5717, + "mutability": "mutable", + "name": "ballotIndex", + "nameLocation": "1155:11:37", + "nodeType": "VariableDeclaration", + "scope": 5748, + "src": "1150:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5716, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1150:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5719, + "initialValue": { + "id": 5718, + "name": "fromIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5700, + "src": "1169:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1150:28:37" + }, + "loopExpression": { + "expression": { + "id": 5724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1203:13:37", + "subExpression": { + "id": 5723, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1203:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5725, + "nodeType": "ExpressionStatement", + "src": "1203:13:37" + }, + "nodeType": "ForStatement", + "src": "1145:278:37" + } + ] + }, + "id": 5750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallotRange", + "nameLocation": "896:20:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5698, + "mutability": "mutable", + "name": "election", + "nameLocation": "947:8:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "926:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5697, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5696, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "926:12:37" + }, + "referencedDeclaration": 4299, + "src": "926:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5700, + "mutability": "mutable", + "name": "fromIndex", + "nameLocation": "970:9:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "965:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5699, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "965:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5702, + "mutability": "mutable", + "name": "toIndex", + "nameLocation": "994:7:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "989:12:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "989:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "916:91:37" + }, + "returnParameters": { + "id": 5704, + "nodeType": "ParameterList", + "parameters": [], + "src": "1016:0:37" + }, + "scope": 5961, + "src": "887:542:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5825, + "nodeType": "Block", + "src": "1572:616:37", + "statements": [ + { + "assignments": [ + 5762 + ], + "declarations": [ + { + "constant": false, + "id": 5762, + "mutability": "mutable", + "name": "ballotVotes", + "nameLocation": "1587:11:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1582:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5761, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1582:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5765, + "initialValue": { + "expression": { + "id": 5763, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1601:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5764, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1601:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1582:31:37" + }, + { + "assignments": [ + 5767 + ], + "declarations": [ + { + "constant": false, + "id": 5767, + "mutability": "mutable", + "name": "numCandidates", + "nameLocation": "1629:13:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1624:18:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5766, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1624:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5771, + "initialValue": { + "expression": { + "expression": { + "id": 5768, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1645:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1645:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1645:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1624:45:37" + }, + { + "body": { + "id": 5817, + "nodeType": "Block", + "src": "1759:379:37", + "statements": [ + { + "assignments": [ + 5783 + ], + "declarations": [ + { + "constant": false, + "id": 5783, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1781:9:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1773:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1773:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5788, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5784, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1793:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1793:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5787, + "indexExpression": { + "id": 5786, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1811:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1793:33:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1773:53:37" + }, + { + "assignments": [ + 5790 + ], + "declarations": [ + { + "constant": false, + "id": 5790, + "mutability": "mutable", + "name": "currentCandidateVotes", + "nameLocation": "1846:21:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1841:26:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1841:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5795, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5791, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1870:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1870:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5794, + "indexExpression": { + "id": 5793, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "1894:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1870:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1841:63:37" + }, + { + "assignments": [ + 5797 + ], + "declarations": [ + { + "constant": false, + "id": 5797, + "mutability": "mutable", + "name": "newCandidateVotes", + "nameLocation": "1923:17:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1918:22:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5796, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1918:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5801, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5798, + "name": "currentCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5790, + "src": "1943:21:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5799, + "name": "ballotVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5762, + "src": "1967:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1943:35:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1918:60:37" + }, + { + "expression": { + "id": 5808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5802, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1992:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1992:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5806, + "indexExpression": { + "id": 5804, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2016:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1992:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5807, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2029:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1992:54:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5809, + "nodeType": "ExpressionStatement", + "src": "1992:54:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5811, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2078:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5812, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2088:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5813, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2099:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5814, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5758, + "src": "2118:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5810, + "name": "_updateWinnerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "2061:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,address,uint256,uint256)" + } + }, + "id": 5815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2061:66:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5816, + "nodeType": "ExpressionStatement", + "src": "2061:66:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5776, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1709:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5777, + "name": "numCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "1726:13:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1709:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5818, + "initializationExpression": { + "assignments": [ + 5773 + ], + "declarations": [ + { + "constant": false, + "id": 5773, + "mutability": "mutable", + "name": "candidateIndex", + "nameLocation": "1689:14:37", + "nodeType": "VariableDeclaration", + "scope": 5818, + "src": "1684:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1684:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5775, + "initialValue": { + "hexValue": "30", + "id": 5774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1706:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1684:23:37" + }, + "loopExpression": { + "expression": { + "id": 5780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1741:16:37", + "subExpression": { + "id": 5779, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1741:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5781, + "nodeType": "ExpressionStatement", + "src": "1741:16:37" + }, + "nodeType": "ForStatement", + "src": "1679:459:37" + }, + { + "expression": { + "id": 5823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5819, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2148:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "2148:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 5822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2180:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2148:33:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5824, + "nodeType": "ExpressionStatement", + "src": "2148:33:37" + } + ] + }, + "id": 5826, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallot", + "nameLocation": "1444:15:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5753, + "mutability": "mutable", + "name": "election", + "nameLocation": "1490:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1469:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5751, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1469:12:37" + }, + "referencedDeclaration": 4299, + "src": "1469:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5756, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1527:6:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1508:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5755, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5754, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1508:10:37" + }, + "referencedDeclaration": 4309, + "src": "1508:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5758, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1548:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1543:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5757, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1543:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1459:103:37" + }, + "returnParameters": { + "id": 5760, + "nodeType": "ParameterList", + "parameters": [], + "src": "1572:0:37" + }, + "scope": 5961, + "src": "1435:753:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5888, + "nodeType": "Block", + "src": "2352:663:37", + "statements": [ + { + "assignments": [ + 5842 + ], + "declarations": [ + { + "constant": false, + "id": 5842, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2389:7:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2362:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5841, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5840, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2362:18:37" + }, + "referencedDeclaration": 1788, + "src": "2362:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 5845, + "initialValue": { + "expression": { + "id": 5843, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2399:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2399:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2362:53:37" + }, + { + "condition": { + "arguments": [ + { + "id": 5848, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2476:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5846, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2459:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2459:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 5849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2459:27:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5852, + "nodeType": "IfStatement", + "src": "2455:64:37", + "trueBody": { + "id": 5851, + "nodeType": "Block", + "src": "2488:31:37", + "statements": [ + { + "functionReturnParameters": 5837, + "id": 5850, + "nodeType": "Return", + "src": "2502:7:37" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5853, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2614:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5854, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2614:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2614:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5856, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5835, + "src": "2633:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2614:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5866, + "nodeType": "IfStatement", + "src": "2610:101:37", + "trueBody": { + "id": 5865, + "nodeType": "Block", + "src": "2643:68:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5861, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2669:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5858, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2657:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2657:11:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 5862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2657:22:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5863, + "nodeType": "ExpressionStatement", + "src": "2657:22:37" + }, + { + "functionReturnParameters": 5837, + "id": 5864, + "nodeType": "Return", + "src": "2694:7:37" + } + ] + } + }, + { + "assignments": [ + 5868, + 5870 + ], + "declarations": [ + { + "constant": false, + "id": 5868, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "2815:16:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2807:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2807:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5870, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "2838:10:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2833:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2833:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5875, + "initialValue": { + "arguments": [ + { + "id": 5872, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2878:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5873, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2888:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + ], + "id": 5871, + "name": "_findWinnerWithLeastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5960, + "src": "2852:25:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_address_$_t_uint256_$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct SetUtil.AddressSet storage pointer) view returns (address,uint256)" + } + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2852:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2806:90:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5876, + "name": "candidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5833, + "src": "2911:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5877, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5870, + "src": "2928:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2911:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5887, + "nodeType": "IfStatement", + "src": "2907:102:37", + "trueBody": { + "id": 5886, + "nodeType": "Block", + "src": "2940:69:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5882, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5868, + "src": "2970:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5883, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2988:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5879, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2954:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "replace", + "nodeType": "MemberAccess", + "referencedDeclaration": 1872, + "src": "2954:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address,address)" + } + }, + "id": 5884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2954:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5885, + "nodeType": "ExpressionStatement", + "src": "2954:44:37" + } + ] + } + } + ] + }, + "id": 5889, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateWinnerSet", + "nameLocation": "2203:16:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5836, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5829, + "mutability": "mutable", + "name": "election", + "nameLocation": "2250:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2229:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5828, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5827, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2229:12:37" + }, + "referencedDeclaration": 4299, + "src": "2229:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5831, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2276:9:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2268:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2268:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5833, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2300:14:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2295:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2295:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5835, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "2329:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2324:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5834, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2324:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2219:124:37" + }, + "returnParameters": { + "id": 5837, + "nodeType": "ParameterList", + "parameters": [], + "src": "2352:0:37" + }, + "scope": 5961, + "src": "2194:821:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5959, + "nodeType": "Block", + "src": "3216:508:37", + "statements": [ + { + "expression": { + "id": 5908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5902, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3226:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [ + { + "id": 5905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3244:4:37", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5904, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3244:4:37", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 5903, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3239:4:37", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3239:10:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3239:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3226:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5909, + "nodeType": "ExpressionStatement", + "src": "3226:27:37" + }, + { + "assignments": [ + 5911 + ], + "declarations": [ + { + "constant": false, + "id": 5911, + "mutability": "mutable", + "name": "numWinners", + "nameLocation": "3269:10:37", + "nodeType": "VariableDeclaration", + "scope": 5959, + "src": "3264:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5910, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3264:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5915, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5912, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3282:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5913, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "3282:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3282:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3264:34:37" + }, + { + "body": { + "id": 5953, + "nodeType": "Block", + "src": "3388:282:37", + "statements": [ + { + "assignments": [ + 5927 + ], + "declarations": [ + { + "constant": false, + "id": 5927, + "mutability": "mutable", + "name": "winner", + "nameLocation": "3410:6:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3402:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3402:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5932, + "initialValue": { + "arguments": [ + { + "id": 5930, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3435:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 5928, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3419:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "3419:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 5931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:31:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3402:48:37" + }, + { + "assignments": [ + 5934 + ], + "declarations": [ + { + "constant": false, + "id": 5934, + "mutability": "mutable", + "name": "winnerVotes", + "nameLocation": "3469:11:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3464:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5933, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3464:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5939, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5935, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5892, + "src": "3483:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5936, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "3483:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5938, + "indexExpression": { + "id": 5937, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3507:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3483:31:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3464:50:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5940, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3533:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5941, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3547:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3533:24:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5952, + "nodeType": "IfStatement", + "src": "3529:131:37", + "trueBody": { + "id": 5951, + "nodeType": "Block", + "src": "3559:101:37", + "statements": [ + { + "expression": { + "id": 5945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5943, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3577:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5944, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3590:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3577:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5946, + "nodeType": "ExpressionStatement", + "src": "3577:24:37" + }, + { + "expression": { + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5947, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3620:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5948, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3639:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3620:25:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5950, + "nodeType": "ExpressionStatement", + "src": "3620:25:37" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5920, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3340:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5921, + "name": "numWinners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5911, + "src": "3358:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3340:28:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5954, + "initializationExpression": { + "assignments": [ + 5917 + ], + "declarations": [ + { + "constant": false, + "id": 5917, + "mutability": "mutable", + "name": "winnerPosition", + "nameLocation": "3320:14:37", + "nodeType": "VariableDeclaration", + "scope": 5954, + "src": "3314:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5916, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3314:5:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 5919, + "initialValue": { + "hexValue": "31", + "id": 5918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3337:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3314:24:37" + }, + "loopExpression": { + "expression": { + "id": 5924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3370:16:37", + "subExpression": { + "id": 5923, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3370:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5925, + "nodeType": "ExpressionStatement", + "src": "3370:16:37" + }, + "nodeType": "ForStatement", + "src": "3309:361:37" + }, + { + "expression": { + "components": [ + { + "id": 5955, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3688:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5956, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3706:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5957, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3687:30:37", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "functionReturnParameters": 5901, + "id": 5958, + "nodeType": "Return", + "src": "3680:37:37" + } + ] + }, + "id": 5960, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_findWinnerWithLeastVotes", + "nameLocation": "3030:25:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5892, + "mutability": "mutable", + "name": "election", + "nameLocation": "3077:8:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3056:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5891, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5890, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3056:12:37" + }, + "referencedDeclaration": 4299, + "src": "3056:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5895, + "mutability": "mutable", + "name": "winners", + "nameLocation": "3114:7:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3087:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5894, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5893, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "3087:18:37" + }, + "referencedDeclaration": 1788, + "src": "3087:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "3055:67:37" + }, + "returnParameters": { + "id": 5901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5898, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "3177:16:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3169:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3169:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5900, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "3200:10:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3195:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5899, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3195:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3168:43:37" + }, + "scope": 5961, + "src": "3021:703:37", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5962, + "src": "185:3541:37", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3696:37" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IElectionModule as IBaseElectionModule} from \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\n\ninterface ISynthetixElectionModule is IBaseElectionModule {\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external;\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n /// @notice Sets the Synthetix v2 DebtShare contract that determines vote power\n function setDebtShareContract(address newDebtShareContractAddress) external;\n\n /// @notice Returns the Synthetix v2 DebtShare contract that determines vote power\n function getDebtShareContract() external view returns (address);\n\n /// @notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch\n function setDebtShareSnapshotId(uint snapshotId) external;\n\n /// @notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch\n function getDebtShareSnapshotId() external view returns (uint);\n\n /// @notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot\n function getDebtShare(address user) external view returns (uint);\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n /// @notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) external;\n\n /// @notice Returns the current epoch's merkle root for user debt shares on other chains\n function getCrossChainDebtShareMerkleRoot() external view returns (bytes32);\n\n /// @notice Returns the current epoch's merkle root block number\n function getCrossChainDebtShareMerkleRootBlockNumber() external view returns (uint);\n\n /// @notice Allows users to declare their Synthetix v2 debt shares on other chains\n function declareCrossChainDebtShare(\n address account,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) external;\n\n /// @notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains\n function getDeclaredCrossChainDebtShare(address account) external view returns (uint);\n\n /// @notice Declares cross chain debt shares and casts a vote\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Sets the Optimism cross domain messenger on L2.\n function setCrossDomainMessenger(address messenger) external;\n\n /// @notice Returns the Optimism cross domain messenger on L2.\n function getCrossDomainMessenger() external view returns (address);\n\n /// @notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts.\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Allows L1 non-EOA addresses to vote on an election.\n function castRelayed(address user, address[] calldata candidates) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "exportedSymbols": { + "IBaseElectionModule": [ + 2778 + ], + "ISynthetixElectionModule": [ + 6574 + ] + }, + "id": 6575, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6430, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6432, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6575, + "sourceUnit": 2779, + "src": "56:122:42", + "symbolAliases": [ + { + "foreign": { + "id": 6431, + "name": "IElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:15:42", + "typeDescriptions": {} + }, + "local": "IBaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6433, + "name": "IBaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "218:19:42" + }, + "id": 6434, + "nodeType": "InheritanceSpecifier", + "src": "218:19:42" + } + ], + "canonicalName": "ISynthetixElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6574, + "linearizedBaseContracts": [ + 6574, + 2778 + ], + "name": "ISynthetixElectionModule", + "nameLocation": "190:24:42", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 6435, + "nodeType": "StructuredDocumentation", + "src": "244:73:42", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "0166451a", + "id": 6455, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "331:24:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6437, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "379:16:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "365:30:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6436, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "365:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6439, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "419:18:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "405:32:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6438, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "405:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6442, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "464:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "447:29:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "447:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6441, + "nodeType": "ArrayTypeName", + "src": "447:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "492:20:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "486:26:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6443, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "486:5:42", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6446, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "529:25:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "522:32:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6445, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "522:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6448, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "571:21:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "564:28:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6447, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "564:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "609:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "602:19:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6449, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "602:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6452, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "639:17:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "631:25:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "631:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "355:307:42" + }, + "returnParameters": { + "id": 6454, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:42" + }, + "scope": 6574, + "src": "322:350:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6456, + "nodeType": "StructuredDocumentation", + "src": "792:79:42", + "text": "@notice Sets the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "0ebf4796", + "id": 6461, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareContract", + "nameLocation": "885:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6458, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "914:27:42", + "nodeType": "VariableDeclaration", + "scope": 6461, + "src": "906:35:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6457, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "906:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "905:37:42" + }, + "returnParameters": { + "id": 6460, + "nodeType": "ParameterList", + "parameters": [], + "src": "951:0:42" + }, + "scope": 6574, + "src": "876:76:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "958:82:42", + "text": "@notice Returns the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "aeff252a", + "id": 6467, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "1054:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6463, + "nodeType": "ParameterList", + "parameters": [], + "src": "1074:2:42" + }, + "returnParameters": { + "id": 6466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6465, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6467, + "src": "1100:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1100:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1099:9:42" + }, + "scope": 6574, + "src": "1045:64:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6468, + "nodeType": "StructuredDocumentation", + "src": "1115:94:42", + "text": "@notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch" + }, + "functionSelector": "a0f42837", + "id": 6473, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareSnapshotId", + "nameLocation": "1223:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6471, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "1251:10:42", + "nodeType": "VariableDeclaration", + "scope": 6473, + "src": "1246:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1246:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1245:17:42" + }, + "returnParameters": { + "id": 6472, + "nodeType": "ParameterList", + "parameters": [], + "src": "1271:0:42" + }, + "scope": 6574, + "src": "1214:58:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6474, + "nodeType": "StructuredDocumentation", + "src": "1278:77:42", + "text": "@notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch" + }, + "functionSelector": "dfe7cd3a", + "id": 6479, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "1369:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6475, + "nodeType": "ParameterList", + "parameters": [], + "src": "1391:2:42" + }, + "returnParameters": { + "id": 6478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6477, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6479, + "src": "1417:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1417:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:42" + }, + "scope": 6574, + "src": "1360:63:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6480, + "nodeType": "StructuredDocumentation", + "src": "1429:98:42", + "text": "@notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot" + }, + "functionSelector": "f2e56dea", + "id": 6487, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "1541:12:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "user", + "nameLocation": "1562:4:42", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1554:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1554:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1553:14:42" + }, + "returnParameters": { + "id": 6486, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6485, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1591:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1591:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1590:6:42" + }, + "scope": 6574, + "src": "1532:65:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6488, + "nodeType": "StructuredDocumentation", + "src": "1729:112:42", + "text": "@notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch" + }, + "functionSelector": "33f3f3de", + "id": 6495, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "1855:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6490, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "1896:10:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1888:18:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6489, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1888:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6492, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "1913:11:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1908:16:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6491, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1887:38:42" + }, + "returnParameters": { + "id": 6494, + "nodeType": "ParameterList", + "parameters": [], + "src": "1934:0:42" + }, + "scope": 6574, + "src": "1846:89:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "1941:88:42", + "text": "@notice Returns the current epoch's merkle root for user debt shares on other chains" + }, + "functionSelector": "b55c43d2", + "id": 6501, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "2043:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6497, + "nodeType": "ParameterList", + "parameters": [], + "src": "2075:2:42" + }, + "returnParameters": { + "id": 6500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6499, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6501, + "src": "2101:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6498, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2101:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2100:9:42" + }, + "scope": 6574, + "src": "2034:76:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6502, + "nodeType": "StructuredDocumentation", + "src": "2116:64:42", + "text": "@notice Returns the current epoch's merkle root block number" + }, + "functionSelector": "d9617851", + "id": 6507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2194:43:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6503, + "nodeType": "ParameterList", + "parameters": [], + "src": "2237:2:42" + }, + "returnParameters": { + "id": 6506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6507, + "src": "2263:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6504, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2263:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2262:6:42" + }, + "scope": 6574, + "src": "2185:84:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6508, + "nodeType": "StructuredDocumentation", + "src": "2275:82:42", + "text": "@notice Allows users to declare their Synthetix v2 debt shares on other chains" + }, + "functionSelector": "7d264ccb", + "id": 6518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareCrossChainDebtShare", + "nameLocation": "2371:26:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6510, + "mutability": "mutable", + "name": "account", + "nameLocation": "2415:7:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2407:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6509, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6512, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2440:9:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2432:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6511, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2432:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6515, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2478:11:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2459:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6513, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2459:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6514, + "nodeType": "ArrayTypeName", + "src": "2459:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "2397:98:42" + }, + "returnParameters": { + "id": 6517, + "nodeType": "ParameterList", + "parameters": [], + "src": "2504:0:42" + }, + "scope": 6574, + "src": "2362:143:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6519, + "nodeType": "StructuredDocumentation", + "src": "2511:116:42", + "text": "@notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains" + }, + "functionSelector": "796c5c80", + "id": 6526, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "2641:30:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6521, + "mutability": "mutable", + "name": "account", + "nameLocation": "2680:7:42", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2672:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6520, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2672:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2671:17:42" + }, + "returnParameters": { + "id": 6525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6524, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2712:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2711:6:42" + }, + "scope": 6574, + "src": "2632:86:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6527, + "nodeType": "StructuredDocumentation", + "src": "2724:61:42", + "text": "@notice Declares cross chain debt shares and casts a vote" + }, + "functionSelector": "9a9a8e1a", + "id": 6538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCast", + "nameLocation": "2799:14:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6529, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2831:9:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2823:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2823:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6532, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2869:11:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2850:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6530, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2850:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6531, + "nodeType": "ArrayTypeName", + "src": "2850:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6535, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2909:10:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2890:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2890:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6534, + "nodeType": "ArrayTypeName", + "src": "2890:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2813:112:42" + }, + "returnParameters": { + "id": 6537, + "nodeType": "ParameterList", + "parameters": [], + "src": "2934:0:42" + }, + "scope": 6574, + "src": "2790:145:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6539, + "nodeType": "StructuredDocumentation", + "src": "2941:59:42", + "text": "@notice Sets the Optimism cross domain messenger on L2." + }, + "functionSelector": "211de0b4", + "id": 6544, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossDomainMessenger", + "nameLocation": "3014:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6541, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3046:9:42", + "nodeType": "VariableDeclaration", + "scope": 6544, + "src": "3038:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6540, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3038:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3037:19:42" + }, + "returnParameters": { + "id": 6543, + "nodeType": "ParameterList", + "parameters": [], + "src": "3065:0:42" + }, + "scope": 6574, + "src": "3005:61:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6545, + "nodeType": "StructuredDocumentation", + "src": "3072:62:42", + "text": "@notice Returns the Optimism cross domain messenger on L2." + }, + "functionSelector": "f675fa62", + "id": 6550, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "3148:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [], + "src": "3171:2:42" + }, + "returnParameters": { + "id": 6549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6548, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6550, + "src": "3197:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3197:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3196:9:42" + }, + "scope": 6574, + "src": "3139:67:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6551, + "nodeType": "StructuredDocumentation", + "src": "3212:87:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts." + }, + "functionSelector": "4b144674", + "id": 6564, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCastRelayed", + "nameLocation": "3313:21:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6553, + "mutability": "mutable", + "name": "user", + "nameLocation": "3352:4:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3344:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6552, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3344:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6555, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "3374:9:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3366:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6558, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "3412:11:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3393:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6556, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3393:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6557, + "nodeType": "ArrayTypeName", + "src": "3393:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6561, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3452:10:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3433:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3433:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6560, + "nodeType": "ArrayTypeName", + "src": "3433:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3334:134:42" + }, + "returnParameters": { + "id": 6563, + "nodeType": "ParameterList", + "parameters": [], + "src": "3477:0:42" + }, + "scope": 6574, + "src": "3304:174:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6565, + "nodeType": "StructuredDocumentation", + "src": "3484:63:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election." + }, + "functionSelector": "5a2b3fd7", + "id": 6573, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "castRelayed", + "nameLocation": "3561:11:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6567, + "mutability": "mutable", + "name": "user", + "nameLocation": "3581:4:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3573:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6566, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6570, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3606:10:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3587:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6568, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3587:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6569, + "nodeType": "ArrayTypeName", + "src": "3587:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3572:45:42" + }, + "returnParameters": { + "id": 6572, + "nodeType": "ParameterList", + "parameters": [], + "src": "3626:0:42" + }, + "scope": 6574, + "src": "3552:75:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6575, + "src": "180:3449:42", + "usedErrors": [] + } + ], + "src": "31:3599:42" + } + }, + "contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {UpgradeModule as BaseUpgradeModule} from \"@synthetixio/core-modules/contracts/modules/UpgradeModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract UpgradeModule is BaseUpgradeModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "BaseUpgradeModule": [ + 4218 + ], + "UpgradeModule": [ + 7165 + ] + }, + "id": 7166, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7160, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:49" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "id": 7162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7166, + "sourceUnit": 4219, + "src": "56:113:49", + "symbolAliases": [ + { + "foreign": { + "id": 7161, + "name": "UpgradeModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:13:49", + "typeDescriptions": {} + }, + "local": "BaseUpgradeModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7163, + "name": "BaseUpgradeModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4218, + "src": "242:17:49" + }, + "id": 7164, + "nodeType": "InheritanceSpecifier", + "src": "242:17:49" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7165, + "linearizedBaseContracts": [ + 7165, + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "225:13:49", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7166, + "src": "216:48:49", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:234:49" + } + }, + "contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {OwnerModule as BaseOwnerModule} from \"@synthetixio/core-modules/contracts/modules/OwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is BaseOwnerModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "BaseOwnerModule": [ + 4196 + ], + "OwnerModule": [ + 7158 + ] + }, + "id": 7159, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7153, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:48" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "id": 7155, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7159, + "sourceUnit": 4197, + "src": "56:107:48", + "symbolAliases": [ + { + "foreign": { + "id": 7154, + "name": "OwnerModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:11:48", + "typeDescriptions": {} + }, + "local": "BaseOwnerModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7156, + "name": "BaseOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4196, + "src": "234:15:48" + }, + "id": 7157, + "nodeType": "InheritanceSpecifier", + "src": "234:15:48" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7158, + "linearizedBaseContracts": [ + 7158, + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "219:11:48", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7159, + "src": "210:44:48", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:224:48" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IElectionInspectorModule.sol\";\nimport \"../submodules/election/ElectionBase.sol\";\n\ncontract ElectionInspectorModule is IElectionInspectorModule, ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function getEpochStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).startDate;\n }\n\n function getEpochEndDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).endDate;\n }\n\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).votingPeriodStartDate;\n }\n\n function wasNominated(address candidate, uint epochIndex) external view override returns (bool) {\n return _getElectionAtIndex(epochIndex).nominees.contains(candidate);\n }\n\n function getNomineesAtEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).nominees.values();\n }\n\n function getBallotVotedAtEpoch(address user, uint epochIndex) public view override returns (bytes32) {\n return _getElectionAtIndex(epochIndex).ballotIdsByAddress[user];\n }\n\n function hasVotedInEpoch(address user, uint epochIndex) external view override returns (bool) {\n return getBallotVotedAtEpoch(user, epochIndex) != bytes32(0);\n }\n\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view override returns (uint) {\n return _getBallotInEpoch(ballotId, epochIndex).votes;\n }\n\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex)\n external\n view\n override\n returns (address[] memory)\n {\n return _getBallotInEpoch(ballotId, epochIndex).candidates;\n }\n\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view override returns (uint) {\n return _getElectionAtIndex(epochIndex).candidateVotes[candidate];\n }\n\n function getElectionWinnersInEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).winners.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionInspectorModule": [ + 3005 + ], + "ElectionStorage": [ + 4331 + ], + "IElectionInspectorModule": [ + 2484 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 3006, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2793, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:29" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "file": "../interfaces/IElectionInspectorModule.sol", + "id": 2794, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 2485, + "src": "56:52:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "../submodules/election/ElectionBase.sol", + "id": 2795, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 4684, + "src": "109:49:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2796, + "name": "IElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2484, + "src": "196:24:29" + }, + "id": 2797, + "nodeType": "InheritanceSpecifier", + "src": "196:24:29" + }, + { + "baseName": { + "id": 2798, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "222:12:29" + }, + "id": 2799, + "nodeType": "InheritanceSpecifier", + "src": "222:12:29" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3005, + "linearizedBaseContracts": [ + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "169:23:29", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2803, + "libraryName": { + "id": 2800, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "247:7:29" + }, + "nodeType": "UsingForDirective", + "src": "241:37:29", + "typeName": { + "id": 2802, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2801, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "259:18:29" + }, + "referencedDeclaration": 1788, + "src": "259:18:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2380 + ], + "body": { + "id": 2816, + "nodeType": "Block", + "src": "376:62:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2812, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2805, + "src": "410:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2811, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "393:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "393:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "393:38:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2810, + "id": 2815, + "nodeType": "Return", + "src": "386:45:29" + } + ] + }, + "functionSelector": "714d8d0e", + "id": 2817, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "293:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2807, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "350:8:29" + }, + "parameters": { + "id": 2806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2805, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "324:10:29", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "319:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2804, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "319:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "318:17:29" + }, + "returnParameters": { + "id": 2810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "368:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2808, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "368:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "367:8:29" + }, + "scope": 3005, + "src": "284:154:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2388 + ], + "body": { + "id": 2830, + "nodeType": "Block", + "src": "534:60:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2826, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2819, + "src": "568:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2825, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "551:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "551:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "551:36:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2824, + "id": 2829, + "nodeType": "Return", + "src": "544:43:29" + } + ] + }, + "functionSelector": "ba9a5b25", + "id": 2831, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "453:23:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2821, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "508:8:29" + }, + "parameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2819, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "482:10:29", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "477:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2818, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "477:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "476:17:29" + }, + "returnParameters": { + "id": 2824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "526:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2822, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "526:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "525:8:29" + }, + "scope": 3005, + "src": "444:150:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2396 + ], + "body": { + "id": 2844, + "nodeType": "Block", + "src": "703:78:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2840, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2833, + "src": "737:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2839, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "720:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "720:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2842, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "720:54:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2838, + "id": 2843, + "nodeType": "Return", + "src": "713:61:29" + } + ] + }, + "functionSelector": "b749be55", + "id": 2845, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "609:36:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2835, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "677:8:29" + }, + "parameters": { + "id": 2834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2833, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "651:10:29", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "646:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "645:17:29" + }, + "returnParameters": { + "id": 2838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "695:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2836, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "695:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "694:8:29" + }, + "scope": 3005, + "src": "600:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2404 + ], + "body": { + "id": 2858, + "nodeType": "Block", + "src": "886:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2854, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "920:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2853, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "903:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "903:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "903:50:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2852, + "id": 2857, + "nodeType": "Return", + "src": "896:57:29" + } + ] + }, + "functionSelector": "82e28473", + "id": 2859, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "796:32:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "860:8:29" + }, + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2847, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "834:10:29", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "829:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2846, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "829:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "828:17:29" + }, + "returnParameters": { + "id": 2852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "878:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "878:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "877:8:29" + }, + "scope": 3005, + "src": "787:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2414 + ], + "body": { + "id": 2877, + "nodeType": "Block", + "src": "1062:84:29", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2874, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2861, + "src": "1129:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [ + { + "id": 2870, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2863, + "src": "1099:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2869, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1079:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1079:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "1079:49:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:60:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2868, + "id": 2876, + "nodeType": "Return", + "src": "1072:67:29" + } + ] + }, + "functionSelector": "205569c2", + "id": 2878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "975:12:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2865, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1038:8:29" + }, + "parameters": { + "id": 2864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2861, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "996:9:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "988:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2860, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "988:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1012:10:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1007:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1007:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "987:36:29" + }, + "returnParameters": { + "id": 2868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1056:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2866, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1056:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1055:6:29" + }, + "scope": 3005, + "src": "966:180:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2423 + ], + "body": { + "id": 2894, + "nodeType": "Block", + "src": "1247:73:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2888, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2880, + "src": "1284:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2887, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1264:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1264:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "1264:47:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 2892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:49:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2886, + "id": 2893, + "nodeType": "Return", + "src": "1257:56:29" + } + ] + }, + "functionSelector": "ca80a2ed", + "id": 2895, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1161:18:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1211:8:29" + }, + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2880, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1185:10:29", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1180:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2879, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1180:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1179:17:29" + }, + "returnParameters": { + "id": 2886, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2885, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1229:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2884, + "nodeType": "ArrayTypeName", + "src": "1229:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1228:18:29" + }, + "scope": 3005, + "src": "1152:168:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2433 + ], + "body": { + "id": 2912, + "nodeType": "Block", + "src": "1427:80:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2906, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2899, + "src": "1464:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2905, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1444:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1444:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "1444:50:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 2910, + "indexExpression": { + "id": 2909, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "1495:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1444:56:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2904, + "id": 2911, + "nodeType": "Return", + "src": "1437:63:29" + } + ] + }, + "functionSelector": "49aed35c", + "id": 2913, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1335:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2901, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1400:8:29" + }, + "parameters": { + "id": 2900, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "mutability": "mutable", + "name": "user", + "nameLocation": "1365:4:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1357:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2899, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1376:10:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1371:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2898, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1371:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1356:31:29" + }, + "returnParameters": { + "id": 2904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2903, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1418:7:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2902, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1418:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1417:9:29" + }, + "scope": 3005, + "src": "1326:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2443 + ], + "body": { + "id": 2933, + "nodeType": "Block", + "src": "1607:77:29", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2924, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2915, + "src": "1646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2925, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2917, + "src": "1652:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2923, + "name": "getBallotVotedAtEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2913, + "src": "1624:21:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) view returns (bytes32)" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1624:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:1:29", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1667:7:29", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2927, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1667:7:29", + "typeDescriptions": {} + } + }, + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1667:10:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1624:53:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2922, + "id": 2932, + "nodeType": "Return", + "src": "1617:60:29" + } + ] + }, + "functionSelector": "1209644e", + "id": 2934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1522:15:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2919, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:29" + }, + "parameters": { + "id": 2918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2915, + "mutability": "mutable", + "name": "user", + "nameLocation": "1546:4:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1538:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2914, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2917, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1557:10:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1552:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1552:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:31:29" + }, + "returnParameters": { + "id": 2922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2921, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1601:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2920, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1601:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1600:6:29" + }, + "scope": 3005, + "src": "1513:171:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2453 + ], + "body": { + "id": 2950, + "nodeType": "Block", + "src": "1794:69:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2945, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1829:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2946, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2938, + "src": "1839:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2944, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "1811:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1811:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1811:45:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2943, + "id": 2949, + "nodeType": "Return", + "src": "1804:52:29" + } + ] + }, + "functionSelector": "2c3c5ba3", + "id": 2951, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1699:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2940, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1770:8:29" + }, + "parameters": { + "id": 2939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2936, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1729:8:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1721:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2935, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1721:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2938, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1744:10:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1739:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2937, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1739:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1720:35:29" + }, + "returnParameters": { + "id": 2943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2942, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1788:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2941, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1788:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1787:6:29" + }, + "scope": 3005, + "src": "1690:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2464 + ], + "body": { + "id": 2968, + "nodeType": "Block", + "src": "2026:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2963, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2953, + "src": "2061:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2964, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2955, + "src": "2071:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2962, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "2043:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2043:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "2043:50:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 2961, + "id": 2967, + "nodeType": "Return", + "src": "2036:57:29" + } + ] + }, + "functionSelector": "0a8b471a", + "id": 2969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "1878:26:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2957, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1978:8:29" + }, + "parameters": { + "id": 2956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2953, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1913:8:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1905:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2952, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1905:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2955, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1928:10:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1923:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2954, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1923:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1904:35:29" + }, + "returnParameters": { + "id": 2961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2960, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "2004:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2958, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2004:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2959, + "nodeType": "ArrayTypeName", + "src": "2004:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2003:18:29" + }, + "scope": 3005, + "src": "1869:231:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2474 + ], + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2214:81:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2980, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2251:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2979, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2231:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2231:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "2231:46:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2984, + "indexExpression": { + "id": 2983, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "2278:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2231:57:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2978, + "id": 2985, + "nodeType": "Return", + "src": "2224:64:29" + } + ] + }, + "functionSelector": "793b9a9d", + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2115:24:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2975, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2190:8:29" + }, + "parameters": { + "id": 2974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2148:9:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2140:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2140:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2973, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2164:10:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2159:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2972, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2159:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2139:36:29" + }, + "returnParameters": { + "id": 2978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2208:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2976, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2208:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2207:6:29" + }, + "scope": 3005, + "src": "2106:189:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2483 + ], + "body": { + "id": 3003, + "nodeType": "Block", + "src": "2403:72:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2997, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2440:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2996, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2420:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2999, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2420:39:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "2420:46:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:48:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2995, + "id": 3002, + "nodeType": "Return", + "src": "2413:55:29" + } + ] + }, + "functionSelector": "cce32c52", + "id": 3004, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2310:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2991, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2367:8:29" + }, + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2341:10:29", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2336:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2988, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2336:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2335:17:29" + }, + "returnParameters": { + "id": 2995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2994, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2385:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2992, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2385:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2993, + "nodeType": "ArrayTypeName", + "src": "2385:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2384:18:29" + }, + "scope": 3005, + "src": "2301:174:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3006, + "src": "160:2317:29", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:2447:29" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n/// @dev View functions add to contract size, since they bloat the Solidity function dispatcher\ninterface IElectionInspectorModule {\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Returns the date in which the given epoch started\n function getEpochStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the given epoch ended\n function getEpochEndDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the given epoch started\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the given epoch started\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Shows if a candidate was nominated in the given epoch\n function wasNominated(address candidate, uint epochIndex) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the given epoch\n function getNomineesAtEpoch(uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the ballot id that user voted on in the given election\n function getBallotVotedAtEpoch(address user, uint epochIndex) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the given election\n function hasVotedInEpoch(address user, uint epochIndex) external view returns (bool);\n\n /// @notice Returns the number of votes given to a particular ballot in a given epoch\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has in a given epoch\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the number of votes a candidate received in a given epoch\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the winners of the given election\n function getElectionWinnersInEpoch(uint epochIndex) external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "exportedSymbols": { + "IElectionInspectorModule": [ + 2484 + ] + }, + "id": 2485, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2371, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:26" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionInspectorModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2372, + "nodeType": "StructuredDocumentation", + "src": "56:233:26", + "text": "@title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n @dev View functions add to contract size, since they bloat the Solidity function dispatcher" + }, + "fullyImplemented": false, + "id": 2484, + "linearizedBaseContracts": [ + 2484 + ], + "name": "IElectionInspectorModule", + "nameLocation": "299:24:26", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2373, + "nodeType": "StructuredDocumentation", + "src": "447:61:26", + "text": "@notice Returns the date in which the given epoch started" + }, + "functionSelector": "714d8d0e", + "id": 2380, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "522:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2375, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "553:10:26", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "548:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2374, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "548:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "547:17:26" + }, + "returnParameters": { + "id": 2379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2378, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "588:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2377, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "588:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "587:8:26" + }, + "scope": 2484, + "src": "513:83:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2381, + "nodeType": "StructuredDocumentation", + "src": "602:59:26", + "text": "@notice Returns the date in which the given epoch ended" + }, + "functionSelector": "ba9a5b25", + "id": 2388, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "675:23:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "704:10:26", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "699:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2382, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "699:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "698:17:26" + }, + "returnParameters": { + "id": 2387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2386, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "739:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2385, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "739:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "738:8:26" + }, + "scope": 2484, + "src": "666:81:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2389, + "nodeType": "StructuredDocumentation", + "src": "753:86:26", + "text": "@notice Returns the date in which the Nomination period in the given epoch started" + }, + "functionSelector": "b749be55", + "id": 2396, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "853:36:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2391, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "895:10:26", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "890:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2390, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "890:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "889:17:26" + }, + "returnParameters": { + "id": 2395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "930:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2393, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "930:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "929:8:26" + }, + "scope": 2484, + "src": "844:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2397, + "nodeType": "StructuredDocumentation", + "src": "944:82:26", + "text": "@notice Returns the date in which the Voting period in the given epoch started" + }, + "functionSelector": "82e28473", + "id": 2404, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "1040:32:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1078:10:26", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1073:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2398, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1073:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1072:17:26" + }, + "returnParameters": { + "id": 2403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2402, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1113:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2401, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1113:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1112:8:26" + }, + "scope": 2484, + "src": "1031:90:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2405, + "nodeType": "StructuredDocumentation", + "src": "1127:65:26", + "text": "@notice Shows if a candidate was nominated in the given epoch" + }, + "functionSelector": "205569c2", + "id": 2414, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "1206:12:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2407, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1227:9:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1219:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1219:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2409, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1243:10:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1238:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1238:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1218:36:26" + }, + "returnParameters": { + "id": 2413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2412, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1278:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2411, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1278:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1277:6:26" + }, + "scope": 2484, + "src": "1197:87:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2415, + "nodeType": "StructuredDocumentation", + "src": "1290:73:26", + "text": "@notice Returns a list of all nominated candidates in the given epoch" + }, + "functionSelector": "ca80a2ed", + "id": 2423, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1377:18:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2417, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1401:10:26", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1396:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2416, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1396:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1395:17:26" + }, + "returnParameters": { + "id": 2422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2421, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1436:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1436:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2420, + "nodeType": "ArrayTypeName", + "src": "1436:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1435:18:26" + }, + "scope": 2484, + "src": "1368:86:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2424, + "nodeType": "StructuredDocumentation", + "src": "1460:74:26", + "text": "@notice Returns the ballot id that user voted on in the given election" + }, + "functionSelector": "49aed35c", + "id": 2433, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1548:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2426, + "mutability": "mutable", + "name": "user", + "nameLocation": "1578:4:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1570:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1570:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2428, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1589:10:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1584:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2427, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1584:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1569:31:26" + }, + "returnParameters": { + "id": 2432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2431, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1624:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2430, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1624:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1623:9:26" + }, + "scope": 2484, + "src": "1539:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2434, + "nodeType": "StructuredDocumentation", + "src": "1639:59:26", + "text": "@notice Returns if user has voted in the given election" + }, + "functionSelector": "1209644e", + "id": 2443, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1712:15:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2436, + "mutability": "mutable", + "name": "user", + "nameLocation": "1736:4:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1728:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1728:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2438, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1747:10:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1742:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2437, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1742:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1727:31:26" + }, + "returnParameters": { + "id": 2442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1782:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2440, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1782:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1781:6:26" + }, + "scope": 2484, + "src": "1703:85:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2444, + "nodeType": "StructuredDocumentation", + "src": "1794:85:26", + "text": "@notice Returns the number of votes given to a particular ballot in a given epoch" + }, + "functionSelector": "2c3c5ba3", + "id": 2453, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1893:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2446, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1923:8:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1915:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1915:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2448, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1938:10:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1933:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1933:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1914:35:26" + }, + "returnParameters": { + "id": 2452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2451, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1973:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2450, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1973:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1972:6:26" + }, + "scope": 2484, + "src": "1884:95:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2454, + "nodeType": "StructuredDocumentation", + "src": "1985:88:26", + "text": "@notice Returns the list of candidates that a particular ballot has in a given epoch" + }, + "functionSelector": "0a8b471a", + "id": 2464, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "2087:26:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2456, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2122:8:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2114:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2455, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2114:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2458, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2137:10:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2132:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2457, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2113:35:26" + }, + "returnParameters": { + "id": 2463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2172:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2172:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2461, + "nodeType": "ArrayTypeName", + "src": "2172:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2171:18:26" + }, + "scope": 2484, + "src": "2078:112:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2465, + "nodeType": "StructuredDocumentation", + "src": "2196:77:26", + "text": "@notice Returns the number of votes a candidate received in a given epoch" + }, + "functionSelector": "793b9a9d", + "id": 2474, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2287:24:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2467, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2320:9:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2312:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2312:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2469, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2336:10:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2331:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2468, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2331:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2311:36:26" + }, + "returnParameters": { + "id": 2473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2472, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2371:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2471, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2371:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2370:6:26" + }, + "scope": 2484, + "src": "2278:99:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2475, + "nodeType": "StructuredDocumentation", + "src": "2383:53:26", + "text": "@notice Returns the winners of the given election" + }, + "functionSelector": "cce32c52", + "id": 2483, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2450:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2477, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2481:10:26", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2476:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2476:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2475:17:26" + }, + "returnParameters": { + "id": 2482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2516:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2516:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2480, + "nodeType": "ArrayTypeName", + "src": "2516:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2515:18:26" + }, + "scope": 2484, + "src": "2441:93:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2485, + "src": "289:2247:26", + "usedErrors": [] + } + ], + "src": "31:2506:26" + } + }, + "contracts/modules/ElectionInspectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionInspectorModule as BaseElectionInspectorModule} from \"@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionInspectorModule is BaseElectionInspectorModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionInspectionModule.sol", + "exportedSymbols": { + "BaseElectionInspectorModule": [ + 3005 + ], + "ElectionInspectorModule": [ + 7151 + ] + }, + "id": 7152, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7146, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:47" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "id": 7148, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7152, + "sourceUnit": 3006, + "src": "56:143:47", + "symbolAliases": [ + { + "foreign": { + "id": 7147, + "name": "ElectionInspectorModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:23:47", + "typeDescriptions": {} + }, + "local": "BaseElectionInspectorModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7149, + "name": "BaseElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3005, + "src": "282:27:47" + }, + "id": 7150, + "nodeType": "InheritanceSpecifier", + "src": "282:27:47" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7151, + "linearizedBaseContracts": [ + 7151, + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "255:23:47", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7152, + "src": "246:68:47", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:284:47" + } + }, + "contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as SynthetixElectionModule} from \"@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionModule is SynthetixElectionModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "ElectionModule": [ + 7190 + ], + "SynthetixElectionModule": [ + 6628 + ] + }, + "id": 7191, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7185, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "id": 7187, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7191, + "sourceUnit": 6629, + "src": "56:129:42", + "symbolAliases": [ + { + "foreign": { + "id": 7186, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:42", + "typeDescriptions": {} + }, + "local": "SynthetixElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7188, + "name": "SynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6628, + "src": "259:23:42" + }, + "id": 7189, + "nodeType": "InheritanceSpecifier", + "src": "259:23:42" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7190, + "linearizedBaseContracts": [ + 7190, + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "241:14:42", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7191, + "src": "232:55:42", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:257:42" + } + }, + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as BaseElectionModule} from \"@synthetixio/core-modules/contracts/modules/ElectionModule.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\nimport \"../interfaces/ISynthetixElectionModule.sol\";\nimport \"../submodules/election/DebtShareManager.sol\";\nimport \"../submodules/election/CrossChainDebtShareManager.sol\";\n\n/// @title Module for electing a council, represented by a set of NFT holders\n/// @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n/// @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n/// @dev A snapshot must be set to determine the debt share id to use.\n/// @dev The merkle proof must also be provided for L1 debt shares before an election.\n/// @dev L1 EOA debt share holders can use declareAndCast to vote.\n/// @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers.\ncontract ElectionModule is ISynthetixElectionModule, BaseElectionModule, DebtShareManager, CrossChainDebtShareManager {\n error TooManyCandidates();\n error WrongInitializer();\n\n /// @dev The BaseElectionModule initializer should not be called, and this one must be called instead\n function initializeElectionModule(\n string memory,\n string memory,\n address[] memory,\n uint8,\n uint64,\n uint64,\n uint64\n ) external view override(BaseElectionModule, IElectionModule) onlyOwner onlyIfNotInitialized {\n revert WrongInitializer();\n }\n\n /// @dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external override onlyOwner onlyIfNotInitialized {\n _setDebtShareContract(debtShareContract);\n\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n /// @dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n /// @dev This function is all that needs to be called by L2 debt share holders to vote.\n function cast(address[] calldata candidates)\n public\n override(BaseElectionModule, IElectionModule)\n onlyInPeriod(ElectionPeriod.Vote)\n {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n _cast(msg.sender, candidates);\n }\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n function setDebtShareContract(address debtShareContract)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Administration)\n {\n _setDebtShareContract(debtShareContract);\n\n emit DebtShareContractSet(debtShareContract);\n }\n\n function getDebtShareContract() external view override returns (address) {\n return address(_debtShareStore().debtShareContract);\n }\n\n function setDebtShareSnapshotId(uint snapshotId) external override onlyOwner onlyInPeriod(ElectionPeriod.Nomination) {\n _setDebtShareSnapshotId(snapshotId);\n }\n\n function getDebtShareSnapshotId() external view override returns (uint) {\n return _getDebtShareSnapshotId();\n }\n\n function getDebtShare(address user) external view override returns (uint) {\n return _getDebtShare(user);\n }\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Nomination)\n {\n _setCrossChainDebtShareMerkleRoot(merkleRoot, blocknumber);\n\n emit CrossChainDebtShareMerkleRootSet(merkleRoot, blocknumber, _getCurrentEpochIndex());\n }\n\n function getCrossChainDebtShareMerkleRoot() external view override returns (bytes32) {\n return _getCrossChainDebtShareMerkleRoot();\n }\n\n function getCrossChainDebtShareMerkleRootBlockNumber() external view override returns (uint) {\n return _getCrossChainDebtShareMerkleRootBlockNumber();\n }\n\n function declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n _declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n emit CrossChainDebtShareDeclared(user, debtShare);\n }\n\n /// @dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls.\n function getDeclaredCrossChainDebtShare(address user) external view override returns (uint) {\n return _getDeclaredCrossChainDebtShare(user);\n }\n\n /// @dev L1 EOA debt share holders can call this single function to vote.\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n declareCrossChainDebtShare(msg.sender, debtShare, merkleProof);\n\n cast(candidates);\n }\n\n function setCrossDomainMessenger(address messenger) external onlyOwner {\n _setCrossDomainMessenger(messenger);\n\n emit CrossDomainMessengerSet(messenger);\n }\n\n function getCrossDomainMessenger() external view returns (address) {\n return _getCrossDomainMessenger();\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000).\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n _cast(user, candidates);\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000).\n function castRelayed(address user, address[] calldata candidates) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n _cast(user, candidates);\n }\n\n // ---------------------------------------\n // Internal\n // ---------------------------------------\n\n /// @dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered\n function _getVotePower(address user) internal view virtual override returns (uint) {\n uint votePower = _getDebtShare(user) + _getDeclaredCrossChainDebtShare(user);\n\n return MathUtil.sqrt(votePower);\n }\n\n function _createNewEpoch() internal virtual override {\n super._createNewEpoch();\n\n DebtShareStore storage store = _debtShareStore();\n\n store.debtShareIds.push();\n store.crossChainDebtShareData.push();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "BaseElectionModule": [ + 3799 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 7004 + ], + "DebtShareManager": [ + 7183 + ], + "DebtShareStorage": [ + 6665 + ], + "ElectionBase": [ + 4264 + ], + "ElectionModule": [ + 6628 + ], + "ElectionStorage": [ + 3912 + ], + "IBaseElectionModule": [ + 2663 + ], + "ICrossDomainMessenger": [ + 5997 + ], + "IDebtShare": [ + 6009 + ], + "IElectionModule": [ + 2663 + ], + "ISynthetixElectionModule": [ + 6155 + ], + "MathUtil": [ + 1708 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6629, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6157, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "id": 6159, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 3800, + "src": "56:116:38", + "symbolAliases": [ + { + "foreign": { + "id": 6158, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:38", + "typeDescriptions": {} + }, + "local": "BaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 6160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 1709, + "src": "173:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6161, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 2664, + "src": "240:76:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "file": "../interfaces/ISynthetixElectionModule.sol", + "id": 6162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 6156, + "src": "317:52:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "file": "../submodules/election/DebtShareManager.sol", + "id": 6163, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7184, + "src": "370:53:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "file": "../submodules/election/CrossChainDebtShareManager.sol", + "id": 6164, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7005, + "src": "424:63:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6166, + "name": "ISynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6155, + "src": "1206:24:38" + }, + "id": 6167, + "nodeType": "InheritanceSpecifier", + "src": "1206:24:38" + }, + { + "baseName": { + "id": 6168, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1232:18:38" + }, + "id": 6169, + "nodeType": "InheritanceSpecifier", + "src": "1232:18:38" + }, + { + "baseName": { + "id": 6170, + "name": "DebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7183, + "src": "1252:16:38" + }, + "id": 6171, + "nodeType": "InheritanceSpecifier", + "src": "1252:16:38" + }, + { + "baseName": { + "id": 6172, + "name": "CrossChainDebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7004, + "src": "1270:26:38" + }, + "id": 6173, + "nodeType": "InheritanceSpecifier", + "src": "1270:26:38" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "documentation": { + "id": 6165, + "nodeType": "StructuredDocumentation", + "src": "489:690:38", + "text": "@title Module for electing a council, represented by a set of NFT holders\n @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n @dev A snapshot must be set to determine the debt share id to use.\n @dev The merkle proof must also be provided for L1 debt shares before an election.\n @dev L1 EOA debt share holders can use declareAndCast to vote.\n @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers." + }, + "fullyImplemented": true, + "id": 6628, + "linearizedBaseContracts": [ + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "1188:14:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6175, + "name": "TooManyCandidates", + "nameLocation": "1309:17:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6174, + "nodeType": "ParameterList", + "parameters": [], + "src": "1326:2:38" + }, + "src": "1303:26:38" + }, + { + "id": 6177, + "name": "WrongInitializer", + "nameLocation": "1340:16:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6176, + "nodeType": "ParameterList", + "parameters": [], + "src": "1356:2:38" + }, + "src": "1334:25:38" + }, + { + "baseFunctions": [ + 2391, + 2725 + ], + "body": { + "id": 6206, + "nodeType": "Block", + "src": "1737:42:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6203, + "name": "WrongInitializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6177, + "src": "1754:16:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1754:18:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6205, + "nodeType": "RevertStatement", + "src": "1747:25:38" + } + ] + }, + "documentation": { + "id": 6178, + "nodeType": "StructuredDocumentation", + "src": "1365:101:38", + "text": "@dev The BaseElectionModule initializer should not be called, and this one must be called instead" + }, + "functionSelector": "ee695137", + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6199, + "kind": "modifierInvocation", + "modifierName": { + "id": 6198, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1706:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "1706:9:38" + }, + { + "id": 6201, + "kind": "modifierInvocation", + "modifierName": { + "id": 6200, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1716:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "1716:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1480:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6197, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6195, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1669:18:38" + }, + { + "id": 6196, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "1689:15:38" + } + ], + "src": "1660:45:38" + }, + "parameters": { + "id": 6194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1514:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6179, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1514:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1537:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6181, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1537:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6185, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1560:16:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1560:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6184, + "nodeType": "ArrayTypeName", + "src": "1560:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6187, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1586:5:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6186, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1586:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1601:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6188, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1601:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1617:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6190, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1617:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1633:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6192, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1504:141:38" + }, + "returnParameters": { + "id": 6202, + "nodeType": "ParameterList", + "parameters": [], + "src": "1737:0:38" + }, + "scope": 6628, + "src": "1471:308:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6036 + ], + "body": { + "id": 6247, + "nodeType": "Block", + "src": "2290:325:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6234, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6225, + "src": "2322:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6233, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "2300:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2300:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6236, + "nodeType": "ExpressionStatement", + "src": "2300:40:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6238, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6210, + "src": "2390:16:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6239, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "2420:18:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6240, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2452:12:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 6241, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6217, + "src": "2478:20:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6242, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "2512:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6243, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2551:21:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6244, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "2586:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 6237, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2871, + "src": "2351:25:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2351:257:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6246, + "nodeType": "ExpressionStatement", + "src": "2351:257:38" + } + ] + }, + "documentation": { + "id": 6208, + "nodeType": "StructuredDocumentation", + "src": "1785:110:38", + "text": "@dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract" + }, + "functionSelector": "0166451a", + "id": 6248, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6229, + "kind": "modifierInvocation", + "modifierName": { + "id": 6228, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "2259:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "2259:9:38" + }, + { + "id": 6231, + "kind": "modifierInvocation", + "modifierName": { + "id": 6230, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "2269:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "2269:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1909:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6227, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2250:8:38" + }, + "parameters": { + "id": 6226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6210, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1957:16:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1943:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6209, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1943:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1997:18:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1983:32:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6211, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1983:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "2042:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2025:29:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2025:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2025:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6217, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2070:20:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2064:26:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6216, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2064:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2107:25:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2100:32:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2100:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2149:21:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2142:28:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6220, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2142:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2187:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2180:19:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6222, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2180:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6225, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "2217:17:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2209:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2209:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1933:307:38" + }, + "returnParameters": { + "id": 6232, + "nodeType": "ParameterList", + "parameters": [], + "src": "2290:0:38" + }, + "scope": 6628, + "src": "1900:715:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2479, + 3273 + ], + "body": { + "id": 6277, + "nodeType": "Block", + "src": "2972:134:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6262, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "2986:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2986:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3006:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2986:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6270, + "nodeType": "IfStatement", + "src": "2982:78:38", + "trueBody": { + "id": 6269, + "nodeType": "Block", + "src": "3009:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6266, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "3030:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3030:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6268, + "nodeType": "RevertStatement", + "src": "3023:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6272, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3076:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3076:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6274, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "3088:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6271, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "3070:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3070:29:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6276, + "nodeType": "ExpressionStatement", + "src": "3070:29:38" + } + ] + }, + "documentation": { + "id": 6249, + "nodeType": "StructuredDocumentation", + "src": "2621:186:38", + "text": "@dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n @dev This function is all that needs to be called by L2 debt share holders to vote." + }, + "functionSelector": "84ae670c", + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6258, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "2947:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "2947:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6260, + "kind": "modifierInvocation", + "modifierName": { + "id": 6257, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "2934:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "2934:33:38" + } + ], + "name": "cast", + "nameLocation": "2821:4:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6256, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6254, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "2889:18:38" + }, + { + "id": 6255, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "2909:15:38" + } + ], + "src": "2880:45:38" + }, + "parameters": { + "id": 6253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6252, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2845:10:38", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "2826:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2826:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6251, + "nodeType": "ArrayTypeName", + "src": "2826:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2825:31:38" + }, + "returnParameters": { + "id": 6261, + "nodeType": "ParameterList", + "parameters": [], + "src": "2972:0:38" + }, + "scope": 6628, + "src": "2812:294:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6042 + ], + "body": { + "id": 6298, + "nodeType": "Block", + "src": "3391:112:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6291, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3423:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6290, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "3401:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3401:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6293, + "nodeType": "ExpressionStatement", + "src": "3401:40:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6295, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3478:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6294, + "name": "DebtShareContractSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7024, + "src": "3457:20:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3457:39:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6297, + "nodeType": "EmitStatement", + "src": "3452:44:38" + } + ] + }, + "functionSelector": "0ebf4796", + "id": 6299, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6284, + "kind": "modifierInvocation", + "modifierName": { + "id": 6283, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3325:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3325:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6286, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3356:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 3919, + "src": "3356:29:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6288, + "kind": "modifierInvocation", + "modifierName": { + "id": 6285, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3343:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3343:43:38" + } + ], + "name": "setDebtShareContract", + "nameLocation": "3235:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6282, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3308:8:38" + }, + "parameters": { + "id": 6281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6280, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "3264:17:38", + "nodeType": "VariableDeclaration", + "scope": 6299, + "src": "3256:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3256:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3255:27:38" + }, + "returnParameters": { + "id": 6289, + "nodeType": "ParameterList", + "parameters": [], + "src": "3391:0:38" + }, + "scope": 6628, + "src": "3226:277:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6048 + ], + "body": { + "id": 6312, + "nodeType": "Block", + "src": "3582:68:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6307, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "3607:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3607:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6636, + "src": "3607:35:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + ], + "id": 6306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3599:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3599:7:38", + "typeDescriptions": {} + } + }, + "id": 6310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3599:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6304, + "id": 6311, + "nodeType": "Return", + "src": "3592:51:38" + } + ] + }, + "functionSelector": "aeff252a", + "id": 6313, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "3518:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6301, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3555:8:38" + }, + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "3538:2:38" + }, + "returnParameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6313, + "src": "3573:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3572:9:38" + }, + "scope": 6628, + "src": "3509:141:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6054 + ], + "body": { + "id": 6329, + "nodeType": "Block", + "src": "3773:52:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6326, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3807:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6325, + "name": "_setDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7060, + "src": "3783:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3783:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6328, + "nodeType": "ExpressionStatement", + "src": "3783:35:38" + } + ] + }, + "functionSelector": "a0f42837", + "id": 6330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6319, + "kind": "modifierInvocation", + "modifierName": { + "id": 6318, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3723:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3723:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6321, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3746:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "3746:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6323, + "kind": "modifierInvocation", + "modifierName": { + "id": 6320, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3733:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3733:39:38" + } + ], + "name": "setDebtShareSnapshotId", + "nameLocation": "3665:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6317, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3714:8:38" + }, + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6315, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "3693:10:38", + "nodeType": "VariableDeclaration", + "scope": 6330, + "src": "3688:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3688:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3687:17:38" + }, + "returnParameters": { + "id": 6324, + "nodeType": "ParameterList", + "parameters": [], + "src": "3773:0:38" + }, + "scope": 6628, + "src": "3656:169:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6060 + ], + "body": { + "id": 6339, + "nodeType": "Block", + "src": "3903:49:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6336, + "name": "_getDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7090, + "src": "3920:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3920:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6335, + "id": 6338, + "nodeType": "Return", + "src": "3913:32:38" + } + ] + }, + "functionSelector": "dfe7cd3a", + "id": 6340, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "3840:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6332, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3879:8:38" + }, + "parameters": { + "id": 6331, + "nodeType": "ParameterList", + "parameters": [], + "src": "3862:2:38" + }, + "returnParameters": { + "id": 6335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6334, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6340, + "src": "3897:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6333, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3897:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3896:6:38" + }, + "scope": 6628, + "src": "3831:121:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6068 + ], + "body": { + "id": 6352, + "nodeType": "Block", + "src": "4032:43:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6349, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6342, + "src": "4063:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6348, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "4049:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4049:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6347, + "id": 6351, + "nodeType": "Return", + "src": "4042:26:38" + } + ] + }, + "functionSelector": "f2e56dea", + "id": 6353, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "3967:12:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6344, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4008:8:38" + }, + "parameters": { + "id": 6343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6342, + "mutability": "mutable", + "name": "user", + "nameLocation": "3988:4:38", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "3980:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6341, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3980:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3979:14:38" + }, + "returnParameters": { + "id": 6347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6346, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "4026:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6345, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4026:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4025:6:38" + }, + "scope": 6628, + "src": "3958:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6076 + ], + "body": { + "id": 6379, + "nodeType": "Block", + "src": "4391:173:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6368, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6369, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4447:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6367, + "name": "_setCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6728, + "src": "4401:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256)" + } + }, + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4401:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6371, + "nodeType": "ExpressionStatement", + "src": "4401:58:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6373, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4508:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6374, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4520:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6375, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4117, + "src": "4533:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4533:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6372, + "name": "CrossChainDebtShareMerkleRootSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6692, + "src": "4475:32:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,uint256)" + } + }, + "id": 6377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:82:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6378, + "nodeType": "EmitStatement", + "src": "4470:87:38" + } + ] + }, + "functionSelector": "33f3f3de", + "id": 6380, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6361, + "kind": "modifierInvocation", + "modifierName": { + "id": 6360, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4329:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "4329:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6363, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "4360:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "4360:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6365, + "kind": "modifierInvocation", + "modifierName": { + "id": 6362, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "4347:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "4347:39:38" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "4216:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6359, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4312:8:38" + }, + "parameters": { + "id": 6358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6355, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "4257:10:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4249:18:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6354, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4249:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6357, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "4274:11:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4269:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6356, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4269:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4248:38:38" + }, + "returnParameters": { + "id": 6366, + "nodeType": "ParameterList", + "parameters": [], + "src": "4391:0:38" + }, + "scope": 6628, + "src": "4207:357:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6082 + ], + "body": { + "id": 6389, + "nodeType": "Block", + "src": "4655:59:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6386, + "name": "_getCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6828, + "src": "4672:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4672:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6385, + "id": 6388, + "nodeType": "Return", + "src": "4665:42:38" + } + ] + }, + "functionSelector": "b55c43d2", + "id": 6390, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "4579:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6382, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4628:8:38" + }, + "parameters": { + "id": 6381, + "nodeType": "ParameterList", + "parameters": [], + "src": "4611:2:38" + }, + "returnParameters": { + "id": 6385, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6384, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6390, + "src": "4646:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6383, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4646:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4645:9:38" + }, + "scope": 6628, + "src": "4570:144:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6088 + ], + "body": { + "id": 6399, + "nodeType": "Block", + "src": "4813:70:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6396, + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6856, + "src": "4830:44:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4830:46:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6395, + "id": 6398, + "nodeType": "Return", + "src": "4823:53:38" + } + ] + }, + "functionSelector": "d9617851", + "id": 6400, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "4729:43:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6392, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4789:8:38" + }, + "parameters": { + "id": 6391, + "nodeType": "ParameterList", + "parameters": [], + "src": "4772:2:38" + }, + "returnParameters": { + "id": 6395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6400, + "src": "4807:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4807:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4806:6:38" + }, + "scope": 6628, + "src": "4720:163:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6099 + ], + "body": { + "id": 6426, + "nodeType": "Block", + "src": "5070:134:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6416, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5108:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6417, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5114:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6418, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6407, + "src": "5125:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6415, + "name": "_declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6800, + "src": "5080:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5080:57:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6420, + "nodeType": "ExpressionStatement", + "src": "5080:57:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6422, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5181:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6423, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5187:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6421, + "name": "CrossChainDebtShareDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6698, + "src": "5153:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5153:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6425, + "nodeType": "EmitStatement", + "src": "5148:49:38" + } + ] + }, + "functionSelector": "7d264ccb", + "id": 6427, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5049:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5049:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6413, + "kind": "modifierInvocation", + "modifierName": { + "id": 6410, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5036:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5036:33:38" + } + ], + "name": "declareCrossChainDebtShare", + "nameLocation": "4898:26:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6409, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5027:8:38" + }, + "parameters": { + "id": 6408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6402, + "mutability": "mutable", + "name": "user", + "nameLocation": "4942:4:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4934:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4934:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "4964:9:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4956:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4956:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6407, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5002:11:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4983:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6405, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4983:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6406, + "nodeType": "ArrayTypeName", + "src": "4983:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4924:95:38" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "5070:0:38" + }, + "scope": 6628, + "src": "4889:315:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6107 + ], + "body": { + "id": 6440, + "nodeType": "Block", + "src": "5451:61:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6437, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5500:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6436, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "5468:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5468:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6435, + "id": 6439, + "nodeType": "Return", + "src": "5461:44:38" + } + ] + }, + "documentation": { + "id": 6428, + "nodeType": "StructuredDocumentation", + "src": "5210:144:38", + "text": "@dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls." + }, + "functionSelector": "796c5c80", + "id": 6441, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "5368:30:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6432, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5427:8:38" + }, + "parameters": { + "id": 6431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6430, + "mutability": "mutable", + "name": "user", + "nameLocation": "5407:4:38", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5399:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5399:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5398:14:38" + }, + "returnParameters": { + "id": 6435, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6434, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5445:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6433, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5445:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5444:6:38" + }, + "scope": 6628, + "src": "5359:153:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6119 + ], + "body": { + "id": 6469, + "nodeType": "Block", + "src": "5782:106:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6459, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5819:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5819:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6461, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "5831:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6462, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6447, + "src": "5842:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6458, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "5792:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:62:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6464, + "nodeType": "ExpressionStatement", + "src": "5792:62:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6466, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6450, + "src": "5870:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6465, + "name": "cast", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6278 + ], + "referencedDeclaration": 6278, + "src": "5865:4:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 6467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5865:16:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6468, + "nodeType": "ExpressionStatement", + "src": "5865:16:38" + } + ] + }, + "documentation": { + "id": 6442, + "nodeType": "StructuredDocumentation", + "src": "5518:73:38", + "text": "@dev L1 EOA debt share holders can call this single function to vote." + }, + "functionSelector": "9a9a8e1a", + "id": 6470, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6454, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5761:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5761:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6456, + "kind": "modifierInvocation", + "modifierName": { + "id": 6453, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5748:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5748:33:38" + } + ], + "name": "declareAndCast", + "nameLocation": "5605:14:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6452, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5739:8:38" + }, + "parameters": { + "id": 6451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "5637:9:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5629:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5629:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6447, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5675:11:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5656:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5656:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6446, + "nodeType": "ArrayTypeName", + "src": "5656:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "5715:10:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5696:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5696:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6449, + "nodeType": "ArrayTypeName", + "src": "5696:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5619:112:38" + }, + "returnParameters": { + "id": 6457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5782:0:38" + }, + "scope": 6628, + "src": "5596:292:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6125 + ], + "body": { + "id": 6485, + "nodeType": "Block", + "src": "5965:102:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6478, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6000:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6477, + "name": "_setCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6939, + "src": "5975:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5975:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6480, + "nodeType": "ExpressionStatement", + "src": "5975:35:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6482, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6050:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6481, + "name": "CrossDomainMessengerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4080, + "src": "6026:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:34:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6484, + "nodeType": "EmitStatement", + "src": "6021:39:38" + } + ] + }, + "functionSelector": "211de0b4", + "id": 6486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6475, + "kind": "modifierInvocation", + "modifierName": { + "id": 6474, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5955:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "5955:9:38" + } + ], + "name": "setCrossDomainMessenger", + "nameLocation": "5903:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "5935:9:38", + "nodeType": "VariableDeclaration", + "scope": 6486, + "src": "5927:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5927:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5926:19:38" + }, + "returnParameters": { + "id": 6476, + "nodeType": "ParameterList", + "parameters": [], + "src": "5965:0:38" + }, + "scope": 6628, + "src": "5894:173:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6131 + ], + "body": { + "id": 6494, + "nodeType": "Block", + "src": "6140:50:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6491, + "name": "_getCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6952, + "src": "6157:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 6492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6157:26:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6490, + "id": 6493, + "nodeType": "Return", + "src": "6150:33:38" + } + ] + }, + "functionSelector": "f675fa62", + "id": 6495, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "6082:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6487, + "nodeType": "ParameterList", + "parameters": [], + "src": "6105:2:38" + }, + "returnParameters": { + "id": 6490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6489, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "6131:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6131:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6130:9:38" + }, + "scope": 6628, + "src": "6073:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6145 + ], + "body": { + "id": 6538, + "nodeType": "Block", + "src": "6870:377:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6514, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "6884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6884:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6904:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6884:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6522, + "nodeType": "IfStatement", + "src": "6880:78:38", + "trueBody": { + "id": 6521, + "nodeType": "Block", + "src": "6907:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6518, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "6928:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6928:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6520, + "nodeType": "RevertStatement", + "src": "6921:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6524, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7134:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6523, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "7107:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7107:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6526, + "nodeType": "ExpressionStatement", + "src": "7107:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6528, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7177:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6529, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6500, + "src": "7183:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6530, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6503, + "src": "7194:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6527, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "7150:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7150:56:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6532, + "nodeType": "ExpressionStatement", + "src": "7150:56:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6534, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7223:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6535, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "7229:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6533, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "7217:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7217:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6537, + "nodeType": "ExpressionStatement", + "src": "7217:23:38" + } + ] + }, + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "6196:454:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000)." + }, + "functionSelector": "4b144674", + "id": 6539, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6510, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "6849:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "6849:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6512, + "kind": "modifierInvocation", + "modifierName": { + "id": 6509, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "6836:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "6836:33:38" + } + ], + "name": "declareAndCastRelayed", + "nameLocation": "6664:21:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6508, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6827:8:38" + }, + "parameters": { + "id": 6507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6498, + "mutability": "mutable", + "name": "user", + "nameLocation": "6703:4:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6695:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6500, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "6725:9:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6717:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6499, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6717:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6503, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "6763:11:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6744:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6744:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6502, + "nodeType": "ArrayTypeName", + "src": "6744:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6506, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6803:10:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6784:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6784:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6505, + "nodeType": "ArrayTypeName", + "src": "6784:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6685:134:38" + }, + "returnParameters": { + "id": 6513, + "nodeType": "ParameterList", + "parameters": [], + "src": "6870:0:38" + }, + "scope": 6628, + "src": "6655:592:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6154 + ], + "body": { + "id": 6571, + "nodeType": "Block", + "src": "7776:310:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6553, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "7790:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7790:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7810:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "7790:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6561, + "nodeType": "IfStatement", + "src": "7786:78:38", + "trueBody": { + "id": 6560, + "nodeType": "Block", + "src": "7813:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6557, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "7834:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7834:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6559, + "nodeType": "RevertStatement", + "src": "7827:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6563, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8040:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6562, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "8013:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8013:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6565, + "nodeType": "ExpressionStatement", + "src": "8013:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6567, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8062:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "8068:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6566, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "8056:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8056:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6570, + "nodeType": "ExpressionStatement", + "src": "8056:23:38" + } + ] + }, + "documentation": { + "id": 6540, + "nodeType": "StructuredDocumentation", + "src": "7253:402:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000)." + }, + "functionSelector": "5a2b3fd7", + "id": 6572, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6549, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "7755:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "7755:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6551, + "kind": "modifierInvocation", + "modifierName": { + "id": 6548, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "7742:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "7742:33:38" + } + ], + "name": "castRelayed", + "nameLocation": "7669:11:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6547, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7733:8:38" + }, + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6542, + "mutability": "mutable", + "name": "user", + "nameLocation": "7689:4:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7681:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7681:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6545, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "7714:10:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7695:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6544, + "nodeType": "ArrayTypeName", + "src": "7695:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7680:45:38" + }, + "returnParameters": { + "id": 6552, + "nodeType": "ParameterList", + "parameters": [], + "src": "7776:0:38" + }, + "scope": 6628, + "src": "7660:426:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 5859 + ], + "body": { + "id": 6596, + "nodeType": "Block", + "src": "8426:135:38", + "statements": [ + { + "assignments": [ + 6582 + ], + "declarations": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8441:9:38", + "nodeType": "VariableDeclaration", + "scope": 6596, + "src": "8436:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6581, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8436:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6590, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6584, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8467:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6583, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "8453:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8453:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 6587, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8507:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6586, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "8475:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8475:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8453:59:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8436:76:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6593, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6582, + "src": "8544:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6591, + "name": "MathUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1708, + "src": "8530:8:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathUtil_$1708_$", + "typeString": "type(library MathUtil)" + } + }, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sqrt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1707, + "src": "8530:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8530:24:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6580, + "id": 6595, + "nodeType": "Return", + "src": "8523:31:38" + } + ] + }, + "documentation": { + "id": 6573, + "nodeType": "StructuredDocumentation", + "src": "8203:135:38", + "text": "@dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered" + }, + "id": 6597, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "8352:13:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6577, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8402:8:38" + }, + "parameters": { + "id": 6576, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6575, + "mutability": "mutable", + "name": "user", + "nameLocation": "8374:4:38", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8366:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8366:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "8365:14:38" + }, + "returnParameters": { + "id": 6580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8420:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6578, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8420:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8419:6:38" + }, + "scope": 6628, + "src": "8343:218:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 4104 + ], + "body": { + "id": 6626, + "nodeType": "Block", + "src": "8620:181:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6601, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "8630:5:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_ElectionModule_$6628_$", + "typeString": "type(contract super ElectionModule)" + } + }, + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_createNewEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 4104, + "src": "8630:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8630:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6605, + "nodeType": "ExpressionStatement", + "src": "8630:23:38" + }, + { + "assignments": [ + 6608 + ], + "declarations": [ + { + "constant": false, + "id": 6608, + "mutability": "mutable", + "name": "store", + "nameLocation": "8687:5:38", + "nodeType": "VariableDeclaration", + "scope": 6626, + "src": "8664:28:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6607, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6606, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6647, + "src": "8664:14:38" + }, + "referencedDeclaration": 6647, + "src": "8664:14:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6611, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6609, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "8695:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8695:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8664:48:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6612, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8723:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6639, + "src": "8723:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8723:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint128_$dyn_storage_ptr_$returns$_t_uint128_$bound_to$_t_array$_t_uint128_$dyn_storage_ptr_$", + "typeString": "function (uint128[] storage pointer) returns (uint128)" + } + }, + "id": 6617, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8723:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "8723:25:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6619, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8758:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6622, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6643, + "src": "8758:29:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8758:34:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$returns$_t_struct$_CrossChainDebtShareData_$6656_storage_$bound_to$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$", + "typeString": "function (struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage pointer) returns (struct DebtShareStorage.CrossChainDebtShareData storage ref)" + } + }, + "id": 6624, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8758:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6656_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "id": 6625, + "nodeType": "ExpressionStatement", + "src": "8758:36:38" + } + ] + }, + "id": 6627, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "8576:15:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6599, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8611:8:38" + }, + "parameters": { + "id": 6598, + "nodeType": "ParameterList", + "parameters": [], + "src": "8591:2:38" + }, + "returnParameters": { + "id": 6600, + "nodeType": "ParameterList", + "parameters": [], + "src": "8620:0:38" + }, + "scope": 6628, + "src": "8567:234:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6629, + "src": "1179:7624:38", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:8773:38" + } + }, + "contracts/Router.sol": { + "sourceCode": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n// GENERATED CODE - do not edit manually!!\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n\ncontract Router {\n error UnknownSelector(bytes4 sel);\n\n address private constant _ELECTION_INSPECTOR_MODULE = 0xaB4C5e5bE3E0609f5f5490621F61edf377949370;\n address private constant _ELECTION_MODULE = 0x2F00Fb36CE2BC3c7D90407A5399038Ef5118a0C9;\n address private constant _OWNER_MODULE = 0xFCED732308759375fDDD853FC680A69B2C483dFA;\n address private constant _UPGRADE_MODULE = 0x235B51DD2D0F45f20f5B42E84A45aAC9Ea90B20D;\n\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n // Lookup table: Function selector => implementation contract\n bytes4 sig4 = msg.sig;\n address implementation;\n\n assembly {\n let sig32 := shr(224, sig4)\n\n function findImplementation(sig) -> result {\n if lt(sig,0x85160425) {\n if lt(sig,0x447068ef) {\n if lt(sig,0x211de0b4) {\n if lt(sig,0x0ebf4796) {\n switch sig\n case 0x0166451a { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0x0438d06e { result := _ELECTION_MODULE } // ElectionModule.setMinimumActiveMembers()\n case 0x086146d2 { result := _ELECTION_MODULE } // ElectionModule.getCurrentPeriod()\n case 0x09eef43e { result := _ELECTION_MODULE } // ElectionModule.hasVoted()\n case 0x0a8b471a { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotCandidatesInEpoch()\n leave\n }\n switch sig\n case 0x0ebf4796 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareContract()\n case 0x0f98dfba { result := _ELECTION_MODULE } // ElectionModule.getDefaultBallotEvaluationBatchSize()\n case 0x1209644e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.hasVotedInEpoch()\n case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n case 0x205569c2 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.wasNominated()\n leave\n }\n if lt(sig,0x362c906d) {\n switch sig\n case 0x211de0b4 { result := _ELECTION_MODULE } // ElectionModule.setCrossDomainMessenger()\n case 0x2810e1d6 { result := _ELECTION_MODULE } // ElectionModule.resolve()\n case 0x2c3c5ba3 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotesInEpoch()\n case 0x33f3f3de { result := _ELECTION_MODULE } // ElectionModule.setCrossChainDebtShareMerkleRoot()\n case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n leave\n }\n switch sig\n case 0x362c906d { result := _ELECTION_MODULE } // ElectionModule.getEpochEndDate()\n case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n case 0x37143233 { result := _ELECTION_MODULE } // ElectionModule.evaluate()\n case 0x3a3e6c81 { result := _ELECTION_MODULE } // ElectionModule.isNominated()\n case 0x3ac1c5fe { result := _ELECTION_MODULE } // ElectionModule.setMaxDateAdjustmentTolerance()\n leave\n }\n if lt(sig,0x655aaaca) {\n if lt(sig,0x54520478) {\n switch sig\n case 0x447068ef { result := _ELECTION_MODULE } // ElectionModule.getNextEpochSeatCount()\n case 0x49aed35c { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotedAtEpoch()\n case 0x4b144674 { result := _ELECTION_MODULE } // ElectionModule.declareAndCastRelayed()\n case 0x4b5dacac { result := _ELECTION_MODULE } // ElectionModule.setNextEpochSeatCount()\n case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n leave\n }\n switch sig\n case 0x54520478 { result := _ELECTION_MODULE } // ElectionModule.upgradeCouncilToken()\n case 0x5a2b3fd7 { result := _ELECTION_MODULE } // ElectionModule.castRelayed()\n case 0x606a6b76 { result := _ELECTION_MODULE } // ElectionModule.getCouncilMembers()\n case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n case 0x64deab73 { result := _ELECTION_MODULE } // ElectionModule.setDefaultBallotEvaluationBatchSize()\n leave\n }\n if lt(sig,0x79ba5097) {\n switch sig\n case 0x655aaaca { result := _ELECTION_MODULE } // ElectionModule.getBallotCandidates()\n case 0x714d8d0e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochStartDateForIndex()\n case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n case 0x793b9a9d { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getCandidateVotesInEpoch()\n case 0x796c5c80 { result := _ELECTION_MODULE } // ElectionModule.getDeclaredCrossChainDebtShare()\n leave\n }\n switch sig\n case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n case 0x7a3bc0ee { result := _ELECTION_MODULE } // ElectionModule.getBallotVotes()\n case 0x7d264ccb { result := _ELECTION_MODULE } // ElectionModule.declareCrossChainDebtShare()\n case 0x82e28473 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getVotingPeriodStartDateForIndex()\n case 0x84ae670c { result := _ELECTION_MODULE } // ElectionModule.cast()\n leave\n }\n if lt(sig,0xca80a2ed) {\n if lt(sig,0xaaf10f42) {\n if lt(sig,0x9636f67c) {\n switch sig\n case 0x85160425 { result := _ELECTION_MODULE } // ElectionModule.getMinimumActiveMembers()\n case 0x8625c053 { result := _ELECTION_MODULE } // ElectionModule.getMinEpochDurations()\n case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n case 0x8f701997 { result := _ELECTION_MODULE } // ElectionModule.tweakEpochSchedule()\n case 0x95ff6584 { result := _ELECTION_MODULE } // ElectionModule.getBallotVoted()\n leave\n }\n switch sig\n case 0x9636f67c { result := _ELECTION_MODULE } // ElectionModule.getNominees()\n case 0x9a25eaf3 { result := _ELECTION_MODULE } // ElectionModule.dismissMembers()\n case 0x9a9a8e1a { result := _ELECTION_MODULE } // ElectionModule.declareAndCast()\n case 0xa0f42837 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareSnapshotId()\n case 0xa25a9f3a { result := _ELECTION_MODULE } // ElectionModule.setMinEpochDurations()\n leave\n }\n if lt(sig,0xbb9c0920) {\n switch sig\n case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n case 0xaeff252a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareContract()\n case 0xb55c43d2 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRoot()\n case 0xb749be55 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNominationPeriodStartDateForIndex()\n case 0xba9a5b25 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochEndDateForIndex()\n leave\n }\n switch sig\n case 0xbb9c0920 { result := _ELECTION_MODULE } // ElectionModule.getVotePower()\n case 0xc07de0d3 { result := _ELECTION_MODULE } // ElectionModule.getCouncilToken()\n case 0xc14d0528 { result := _ELECTION_MODULE } // ElectionModule.modifyEpochSchedule()\n case 0xc5798523 { result := _ELECTION_MODULE } // ElectionModule.isElectionModuleInitialized()\n case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n leave\n }\n if lt(sig,0xe420d7f9) {\n if lt(sig,0xd83eb231) {\n switch sig\n case 0xca80a2ed { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNomineesAtEpoch()\n case 0xcce32c52 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getElectionWinnersInEpoch()\n case 0xce04e44c { result := _ELECTION_MODULE } // ElectionModule.getEpochStartDate()\n case 0xd11801cf { result := _ELECTION_MODULE } // ElectionModule.withdrawNomination()\n case 0xd82f25f0 { result := _ELECTION_MODULE } // ElectionModule.getCandidateVotes()\n leave\n }\n switch sig\n case 0xd83eb231 { result := _ELECTION_MODULE } // ElectionModule.withdrawVote()\n case 0xd9617851 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRootBlockNumber()\n case 0xdfe7cd3a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareSnapshotId()\n case 0xe1509015 { result := _ELECTION_MODULE } // ElectionModule.getVotingPeriodStartDate()\n case 0xe327b585 { result := _ELECTION_MODULE } // ElectionModule.isElectionEvaluated()\n leave\n }\n switch sig\n case 0xe420d7f9 { result := _ELECTION_MODULE } // ElectionModule.getNominationPeriodStartDate()\n case 0xe9544a51 { result := _ELECTION_MODULE } // ElectionModule.getMaxDateAdjustmentTolerance()\n case 0xedc968ba { result := _ELECTION_MODULE } // ElectionModule.calculateBallotId()\n case 0xee695137 { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0xf2516dbf { result := _ELECTION_MODULE } // ElectionModule.getElectionWinners()\n case 0xf2e56dea { result := _ELECTION_MODULE } // ElectionModule.getDebtShare()\n case 0xf675fa62 { result := _ELECTION_MODULE } // ElectionModule.getCrossDomainMessenger()\n case 0xfcd7e1d7 { result := _ELECTION_MODULE } // ElectionModule.nominate()\n case 0xffe7f643 { result := _ELECTION_MODULE } // ElectionModule.getEpochIndex()\n leave\n }\n\n implementation := findImplementation(sig32)\n }\n\n if (implementation == address(0)) {\n revert UnknownSelector(sig4);\n }\n\n // Delegatecall to the implementation contract\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "contracts/Router.sol", + "exportedSymbols": { + "Router": [ + 58 + ] + }, + "id": 59, + "license": "Unlicense", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "37:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Router", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 58, + "linearizedBaseContracts": [ + 58 + ], + "name": "Router", + "nameLocation": "451:6:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "UnknownSelector", + "nameLocation": "470:15:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "sel", + "nameLocation": "493:3:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "486:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "486:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "485:12:0" + }, + "src": "464:34:0" + }, + { + "constant": true, + "id": 8, + "mutability": "constant", + "name": "_ELECTION_INSPECTOR_MODULE", + "nameLocation": "529:26:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "504:96:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "504:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307861423443356535624533453036303966356635343930363231463631656466333737393439333730", + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xaB4C5e5bE3E0609f5f5490621F61edf377949370" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 11, + "mutability": "constant", + "name": "_ELECTION_MODULE", + "nameLocation": "631:16:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "606:86:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "606:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307832463030466233364345324243336337443930343037413533393930333845663531313861304339", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "650:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x2F00Fb36CE2BC3c7D90407A5399038Ef5118a0C9" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 14, + "mutability": "constant", + "name": "_OWNER_MODULE", + "nameLocation": "723:13:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "698:83:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "698:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307846434544373332333038373539333735664444443835334643363830413639423243343833644641", + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "739:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xFCED732308759375fDDD853FC680A69B2C483dFA" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 17, + "mutability": "constant", + "name": "_UPGRADE_MODULE", + "nameLocation": "812:15:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "787:85:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "787:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307832333542353144443244304634356632306635423432453834413435614143394561393042323044", + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x235B51DD2D0F45f20f5B42E84A45aAC9Ea90B20D" + }, + "visibility": "private" + }, + { + "body": { + "id": 23, + "nodeType": "Block", + "src": "907:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 20, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "917:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "917:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22, + "nodeType": "ExpressionStatement", + "src": "917:10:0" + } + ] + }, + "id": 24, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "887:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:0:0" + }, + "scope": 58, + "src": "879:55:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 30, + "nodeType": "Block", + "src": "967:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "977:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "977:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 29, + "nodeType": "ExpressionStatement", + "src": "977:10:0" + } + ] + }, + "id": 31, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 25, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:2:0" + }, + "returnParameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:0" + }, + "scope": 58, + "src": "940:54:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 56, + "nodeType": "Block", + "src": "1029:11808:0", + "statements": [ + { + "assignments": [ + 35 + ], + "declarations": [ + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "sig4", + "nameLocation": "1116:4:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1109:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 34, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1109:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 38, + "initialValue": { + "expression": { + "id": 36, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1123:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "1123:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1109:21:0" + }, + { + "assignments": [ + 40 + ], + "declarations": [ + { + "constant": false, + "id": 40, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1148:14:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1140:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1140:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 41, + "nodeType": "VariableDeclarationStatement", + "src": "1140:22:0" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1182:11095:0", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1196:27:0", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1213:3:0", + "type": "", + "value": "224" + }, + { + "name": "sig4", + "nodeType": "YulIdentifier", + "src": "1218:4:0" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1209:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "1209:14:0" + }, + "variables": [ + { + "name": "sig32", + "nodeType": "YulTypedName", + "src": "1200:5:0", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1280:10930:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1320:5729:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1364:2901:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1412:1489:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1464:728:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1557:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1559:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1569:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1559:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1541:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1546:10:0", + "type": "", + "value": "0x0166451a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1681:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1683:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1693:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1683:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1665:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1670:10:0", + "type": "", + "value": "0x0438d06e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1804:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1806:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1816:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1806:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1788:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1793:10:0", + "type": "", + "value": "0x086146d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1920:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1922:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1932:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1922:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1904:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1909:10:0", + "type": "", + "value": "0x09eef43e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2028:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2030:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2040:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2030:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2012:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2017:10:0", + "type": "", + "value": "0x0a8b471a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1505:3:0" + }, + "nodeType": "YulSwitch", + "src": "1498:570:0" + }, + { + "nodeType": "YulLeave", + "src": "2157:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1448:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1452:10:0", + "type": "", + "value": "0x0ebf4796" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1445:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1445:18:0" + }, + "nodeType": "YulIf", + "src": "1442:750:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2276:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2278:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2288:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2278:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2260:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2265:10:0", + "type": "", + "value": "0x0ebf4796" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2392:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2394:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2404:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2394:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2376:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2381:10:0", + "type": "", + "value": "0x0f98dfba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2523:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2525:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2535:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2525:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2507:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2512:10:0", + "type": "", + "value": "0x1209644e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2653:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2655:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "2665:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2655:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2637:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2642:10:0", + "type": "", + "value": "0x1627540c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2759:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2761:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2771:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2761:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2743:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2748:10:0", + "type": "", + "value": "0x205569c2" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2228:3:0" + }, + "nodeType": "YulSwitch", + "src": "2221:578:0" + }, + { + "nodeType": "YulLeave", + "src": "2870:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1396:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1400:10:0", + "type": "", + "value": "0x211de0b4" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1393:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1393:18:0" + }, + "nodeType": "YulIf", + "src": "1390:1511:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2948:700:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3033:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3035:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3045:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3035:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3017:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3022:10:0", + "type": "", + "value": "0x211de0b4" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3152:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3154:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3164:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3154:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3136:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3141:10:0", + "type": "", + "value": "0x2810e1d6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3255:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3257:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "3267:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3257:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3239:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3244:10:0", + "type": "", + "value": "0x2c3c5ba3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3380:10:0", + "type": "", + "value": "0x33f3f3de" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3519:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3521:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "3531:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3521:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3503:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3508:10:0", + "type": "", + "value": "0x35eb2824" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2985:3:0" + }, + "nodeType": "YulSwitch", + "src": "2978:568:0" + }, + { + "nodeType": "YulLeave", + "src": "3617:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2932:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2936:10:0", + "type": "", + "value": "0x362c906d" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2929:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "2929:18:0" + }, + "nodeType": "YulIf", + "src": "2926:722:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3724:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3726:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3736:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3726:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3708:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3713:10:0", + "type": "", + "value": "0x362c906d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3831:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3833:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "3843:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3833:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3815:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3820:10:0", + "type": "", + "value": "0x3659cfe6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3930:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3932:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3942:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3932:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3914:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3919:10:0", + "type": "", + "value": "0x37143233" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4030:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4032:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4042:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4032:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4014:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4019:10:0", + "type": "", + "value": "0x3a3e6c81" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4133:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4135:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4145:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4135:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4117:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4122:10:0", + "type": "", + "value": "0x3ac1c5fe" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "3680:3:0" + }, + "nodeType": "YulSwitch", + "src": "3673:490:0" + }, + { + "nodeType": "YulLeave", + "src": "4238:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1348:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1352:10:0", + "type": "", + "value": "0x447068ef" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1345:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1345:18:0" + }, + "nodeType": "YulIf", + "src": "1342:2923:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4308:1383:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4356:691:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4441:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4443:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4453:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4443:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4425:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4430:10:0", + "type": "", + "value": "0x447068ef" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4558:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4560:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "4570:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4560:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4542:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4547:10:0", + "type": "", + "value": "0x49aed35c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4694:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4696:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4706:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4696:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4678:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4683:10:0", + "type": "", + "value": "0x4b144674" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4800:10:0", + "type": "", + "value": "0x4b5dacac" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4928:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4930:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "4940:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4930:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4912:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4917:10:0", + "type": "", + "value": "0x53a47bb7" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4393:3:0" + }, + "nodeType": "YulSwitch", + "src": "4386:569:0" + }, + { + "nodeType": "YulLeave", + "src": "5016:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4340:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4344:10:0", + "type": "", + "value": "0x54520478" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4337:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4337:18:0" + }, + "nodeType": "YulIf", + "src": "4334:713:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5123:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5125:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5135:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5125:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5107:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5112:10:0", + "type": "", + "value": "0x54520478" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5234:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5236:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5246:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5236:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5218:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5223:10:0", + "type": "", + "value": "0x5a2b3fd7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5337:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5339:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5349:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5339:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5321:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5326:10:0", + "type": "", + "value": "0x606a6b76" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5446:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5448:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "5458:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5448:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5430:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5435:10:0", + "type": "", + "value": "0x624bd96d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5553:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5555:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5565:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5555:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5537:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5542:10:0", + "type": "", + "value": "0x64deab73" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5079:3:0" + }, + "nodeType": "YulSwitch", + "src": "5072:511:0" + }, + { + "nodeType": "YulLeave", + "src": "5664:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4292:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4296:10:0", + "type": "", + "value": "0x655aaaca" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4289:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4289:18:0" + }, + "nodeType": "YulIf", + "src": "4286:1405:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5734:696:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5800:10:0", + "type": "", + "value": "0x655aaaca" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5922:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5924:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "5934:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5924:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5906:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5911:10:0", + "type": "", + "value": "0x714d8d0e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6058:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6060:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6070:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6060:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6042:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6047:10:0", + "type": "", + "value": "0x718fe928" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6162:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6164:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6174:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6164:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6146:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6151:10:0", + "type": "", + "value": "0x793b9a9d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6297:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6299:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6309:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6299:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6281:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6286:10:0", + "type": "", + "value": "0x796c5c80" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5767:3:0" + }, + "nodeType": "YulSwitch", + "src": "5760:567:0" + }, + { + "nodeType": "YulLeave", + "src": "6403:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5718:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5722:10:0", + "type": "", + "value": "0x79ba5097" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "5715:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "5715:18:0" + }, + "nodeType": "YulIf", + "src": "5712:718:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "6498:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6500:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6510:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6500:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6482:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6487:10:0", + "type": "", + "value": "0x79ba5097" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6584:10:0", + "type": "", + "value": "0x7a3bc0ee" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6697:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6699:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6709:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6699:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6681:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6686:10:0", + "type": "", + "value": "0x7d264ccb" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6811:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6813:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6823:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6795:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6800:10:0", + "type": "", + "value": "0x82e28473" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6950:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6952:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6962:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6952:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6934:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6939:10:0", + "type": "", + "value": "0x84ae670c" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "6458:3:0" + }, + "nodeType": "YulSwitch", + "src": "6451:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7026:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1304:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1308:10:0", + "type": "", + "value": "0x85160425" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1301:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1301:18:0" + }, + "nodeType": "YulIf", + "src": "1298:5751:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7088:2732:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7132:1330:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7180:654:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7265:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7267:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7277:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7267:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7249:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7254:10:0", + "type": "", + "value": "0x85160425" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7384:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7386:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7396:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7386:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7368:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7373:10:0", + "type": "", + "value": "0x8625c053" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7500:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7502:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "7512:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7502:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7484:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7489:10:0", + "type": "", + "value": "0x8da5cb5b" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7584:10:0", + "type": "", + "value": "0x8f701997" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7709:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7711:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7721:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7711:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7693:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7698:10:0", + "type": "", + "value": "0x95ff6584" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7217:3:0" + }, + "nodeType": "YulSwitch", + "src": "7210:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7803:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7164:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7168:10:0", + "type": "", + "value": "0x9636f67c" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7161:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7161:18:0" + }, + "nodeType": "YulIf", + "src": "7158:676:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7910:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7912:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7922:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7912:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7894:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7899:10:0", + "type": "", + "value": "0x9636f67c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8013:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8015:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8025:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8015:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7997:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8002:10:0", + "type": "", + "value": "0x9a25eaf3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8119:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8121:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8131:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8121:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8103:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8108:10:0", + "type": "", + "value": "0x9a9a8e1a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8225:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8227:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8237:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8227:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8209:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8214:10:0", + "type": "", + "value": "0xa0f42837" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8339:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8341:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8351:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8341:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8323:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8328:10:0", + "type": "", + "value": "0xa25a9f3a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7866:3:0" + }, + "nodeType": "YulSwitch", + "src": "7859:510:0" + }, + { + "nodeType": "YulLeave", + "src": "8435:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7116:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7120:10:0", + "type": "", + "value": "0xaaf10f42" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7113:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7113:18:0" + }, + "nodeType": "YulIf", + "src": "7110:1352:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8505:712:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "8582:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8584:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "8594:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8584:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8566:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8571:10:0", + "type": "", + "value": "0xaaf10f42" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8689:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8691:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8701:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8691:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8673:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8678:10:0", + "type": "", + "value": "0xaeff252a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8801:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8803:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8813:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8803:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8785:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8790:10:0", + "type": "", + "value": "0xb55c43d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8925:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8927:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "8937:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8927:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8909:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8914:10:0", + "type": "", + "value": "0xb749be55" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9072:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9074:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9084:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9074:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9056:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9061:10:0", + "type": "", + "value": "0xba9a5b25" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8538:3:0" + }, + "nodeType": "YulSwitch", + "src": "8531:581:0" + }, + { + "nodeType": "YulLeave", + "src": "9190:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8489:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8493:10:0", + "type": "", + "value": "0xbb9c0920" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8486:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "8486:18:0" + }, + "nodeType": "YulIf", + "src": "8483:734:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9285:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9287:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9297:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9287:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9269:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9274:10:0", + "type": "", + "value": "0xbb9c0920" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9385:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9387:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9397:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9387:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9369:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9374:10:0", + "type": "", + "value": "0xc07de0d3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9488:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9490:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9500:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9490:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9472:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9477:10:0", + "type": "", + "value": "0xc14d0528" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9584:10:0", + "type": "", + "value": "0xc5798523" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9710:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9712:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "9722:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9712:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9694:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9699:10:0", + "type": "", + "value": "0xc7f62cda" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9245:3:0" + }, + "nodeType": "YulSwitch", + "src": "9238:501:0" + }, + { + "nodeType": "YulLeave", + "src": "9797:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7072:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7076:10:0", + "type": "", + "value": "0xca80a2ed" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7069:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7069:18:0" + }, + "nodeType": "YulIf", + "src": "7066:2754:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9859:1360:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9903:681:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9980:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9982:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9992:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9982:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9964:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9969:10:0", + "type": "", + "value": "0xca80a2ed" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10109:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10111:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "10121:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10111:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10093:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10098:10:0", + "type": "", + "value": "0xcce32c52" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10245:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10247:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10257:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10247:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10229:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10234:10:0", + "type": "", + "value": "0xce04e44c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10354:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10356:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10366:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10356:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10338:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10343:10:0", + "type": "", + "value": "0xd11801cf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10464:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10466:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10476:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10466:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10448:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10453:10:0", + "type": "", + "value": "0xd82f25f0" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9936:3:0" + }, + "nodeType": "YulSwitch", + "src": "9929:565:0" + }, + { + "nodeType": "YulLeave", + "src": "10557:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9887:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9891:10:0", + "type": "", + "value": "0xd83eb231" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9884:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9884:18:0" + }, + "nodeType": "YulIf", + "src": "9881:703:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "10652:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10654:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10664:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10654:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10636:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10641:10:0", + "type": "", + "value": "0xd83eb231" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10752:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10754:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10764:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10754:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10736:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10741:10:0", + "type": "", + "value": "0xd9617851" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10883:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10885:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10895:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10885:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10867:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10872:10:0", + "type": "", + "value": "0xdfe7cd3a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10993:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10995:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11005:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10995:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10977:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10982:10:0", + "type": "", + "value": "0xe1509015" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11105:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11107:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11117:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11107:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11089:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11094:10:0", + "type": "", + "value": "0xe327b585" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "10612:3:0" + }, + "nodeType": "YulSwitch", + "src": "10605:530:0" + }, + { + "nodeType": "YulLeave", + "src": "11196:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9843:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9847:10:0", + "type": "", + "value": "0xe420d7f9" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9840:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9840:18:0" + }, + "nodeType": "YulIf", + "src": "9837:1382:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "11279:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11281:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11291:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11281:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11263:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11268:10:0", + "type": "", + "value": "0xe420d7f9" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11380:10:0", + "type": "", + "value": "0xe9544a51" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11504:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11506:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11516:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11506:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11488:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11493:10:0", + "type": "", + "value": "0xedc968ba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11605:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11607:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11617:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11607:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11589:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11594:10:0", + "type": "", + "value": "0xee695137" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11713:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11715:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11725:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11715:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11697:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11702:10:0", + "type": "", + "value": "0xf2516dbf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11815:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11817:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11827:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11817:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11799:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11804:10:0", + "type": "", + "value": "0xf2e56dea" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11911:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11913:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11923:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11913:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11895:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11900:10:0", + "type": "", + "value": "0xf675fa62" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12018:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12020:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12030:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12020:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12002:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12007:10:0", + "type": "", + "value": "0xfcd7e1d7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12110:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12112:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12122:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12112:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12094:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12099:10:0", + "type": "", + "value": "0xffe7f643" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "11243:3:0" + }, + "nodeType": "YulSwitch", + "src": "11236:904:0" + }, + { + "nodeType": "YulLeave", + "src": "12191:5:0" + } + ] + }, + "name": "findImplementation", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "sig", + "nodeType": "YulTypedName", + "src": "1265:3:0", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "1273:6:0", + "type": "" + } + ], + "src": "1237:10973:0" + }, + { + "nodeType": "YulAssignment", + "src": "12224:43:0", + "value": { + "arguments": [ + { + "name": "sig32", + "nodeType": "YulIdentifier", + "src": "12261:5:0" + } + ], + "functionName": { + "name": "findImplementation", + "nodeType": "YulIdentifier", + "src": "12242:18:0" + }, + "nodeType": "YulFunctionCall", + "src": "12242:25:0" + }, + "variableNames": [ + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12224:14:0" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "10121:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2040:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2535:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2771:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "3267:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "4570:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "5934:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6174:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6823:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "8937:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9084:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9992:26:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10257:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10366:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10476:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10664:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10764:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10895:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11005:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11117:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11291:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11516:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11617:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11725:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11827:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11923:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12030:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12122:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1569:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1693:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1816:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1932:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2288:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2404:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3045:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3164:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3736:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3942:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4042:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4145:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4453:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4706:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5135:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5246:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5349:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5565:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6309:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6709:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6962:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7277:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7396:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7721:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7922:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8025:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8131:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8237:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8351:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8701:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8813:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9297:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9397:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9500:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9607:16:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "2665:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "3531:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "4940:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "5458:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6070:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6510:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "7512:13:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "3843:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "8594:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "9722:15:0", + "valueSize": 1 + }, + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12224:14:0", + "valueSize": 1 + }, + { + "declaration": 35, + "isOffset": false, + "isSlot": false, + "src": "1218:4:0", + "valueSize": 1 + } + ], + "id": 42, + "nodeType": "InlineAssembly", + "src": "1173:11104:0" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 43, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "12291:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12317:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 44, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12309:7:0", + "typeDescriptions": {} + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12309:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12291:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 54, + "nodeType": "IfStatement", + "src": "12287:87:0", + "trueBody": { + "id": 53, + "nodeType": "Block", + "src": "12321:53:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 50, + "name": "sig4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12358:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 49, + "name": "UnknownSelector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "12342:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_bytes4_$returns$__$", + "typeString": "function (bytes4) pure" + } + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12342:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 52, + "nodeType": "RevertStatement", + "src": "12335:28:0" + } + ] + } + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "12448:383:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12475:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12478:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12481:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12481:14:0" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "12462:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12462:34:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12462:34:0" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "12510:74:0", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "12537:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "12537:5:0" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12544:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12560:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12563:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12563:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12579:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12582:1:0", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "12524:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12524:60:0" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "12514:6:0", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12612:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12615:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12618:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12618:16:0" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "12597:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12597:38:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12597:38:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "12682:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12707:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12710:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12710:16:0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "12700:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12700:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12700:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12675:66:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12680:1:0", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12762:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12787:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12790:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12790:16:0" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "12780:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12780:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12780:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12754:67:0", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12656:6:0" + }, + "nodeType": "YulSwitch", + "src": "12649:172:0" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12544:14:0", + "valueSize": 1 + } + ], + "id": 55, + "nodeType": "InlineAssembly", + "src": "12439:392:0" + } + ] + }, + "id": 57, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "1009:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1017:2:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [], + "src": "1029:0:0" + }, + "scope": 58, + "src": "1000:11837:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 59, + "src": "442:12397:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "37:12803:0" + } + } +} \ No newline at end of file diff --git a/packages/scripts/data/18779541-users-debts.json b/packages/scripts/data/18779541-users-debts.json new file mode 100644 index 0000000000..b6674cd051 --- /dev/null +++ b/packages/scripts/data/18779541-users-debts.json @@ -0,0 +1,3801 @@ +{ + "contractAddress": "0x89FCb32F29e509cc42d0C8b6f058C993013A843F", + "debts": { + "0x000872be5eC7dC8197ef6618Ef507d9A449cAC1A": "34527278073074865", + "0x0020FE4545bB19B6257F7dEDa80c8eB353131Db0": "1323765096995457309", + "0x00263Da8533175f2e2eca5820F1d565e05b1C31C": "6028516901981866018", + "0x003814A176D587C13c8efE04cBD7790418388C60": "16053984120563733092", + "0x00503D8e7b713B199FBD5D58aBd51D00Df5CbA2F": "2019094878298304907635", + "0x0062Fb72D128699A70afDAD4b7bafb2Cde128913": "634546805525913883", + "0x0070EdA17A3656D6568eC4C94FeF34A396D20613": "19429186455948760255", + "0x00903416A6053Fce89E6aA4A7967bd1f781B0d20": "18449451591547670816", + "0x00B165BD0d75F9A5cF11A474c44616E2851F854B": "121341536936488161591", + "0x00D09e092104304A0f779AA77BA1dB559d30bf7e": "12916466820613385331", + "0x00bC2B77b0407B77FC8CA50C651BE882a6E7820C": "1422035777471113675", + "0x00ca8208Df0Bd88cFBF3F21c085eb1670Ce09f28": "27006488973474386323", + "0x00e6224Fd18cbBC2e20A5CBd2103D6E8CEA741F8": "6484570862648558912", + "0x010afb8548a5D1a3a3D62f58CA0a5A1329974206": "6318985803257444453", + "0x011211eC9576923988C2Fe5aA3a362528c4e7e64": "944100835633298988", + "0x011c79c3F951Dc3D26FB08D226b60a7653753a95": "6933241346457618528", + "0x012d6DF666D29C016367f8Bdb5BB87073b17feDe": "249363721295684928019", + "0x014843f776D78e32Ef6bD7C6a6A2D2393865c7c4": "47681828234954008720", + "0x014CcC93FF00D407BC7ff533d5c3b32Aa3597F44": "2764716994754367363", + "0x015F975C22438c48EB23f879Ed3B293Ed7fbd2D2": "3207780670534941373", + "0x016f333Ccc88C77C9FC6b04bE4E16249DCb5Ae9f": "1440994519352694097819", + "0x0188aE1a528B6f9c916B9a7B389b17d07b131c08": "74625251170581355685", + "0x01C744676694A7B270D8C6D6AfB2d59b42fd0d0c": "7457672571918286541", + "0x01C9a2bbb109a24E86535bB41007cd15a0177C11": "9326103175345230974", + "0x0215c140840B896e1e371525D1f70cefbd09aAfa": "5852641222447557378", + "0x021AfDa9886DCe1cCa8cEcD130e4f2891b2B91d1": "16033532891148585856", + "0x02284B9889115D3654A72a8422ac0F3c28Ed6aC4": "20288488151048111211", + "0x023011820B7ff68899907Bb266567C04930cd4DA": "20582790275243837456", + "0x023746e8dcdC250ebba98Aaa82CE81E27597cBBe": "5851004588727697710", + "0x02424f81E282dF59Af2E2628D325aaA248b1a482": "9053749767248438387", + "0x02442FC5518c5E4047dde5Cde5da7973c9971B30": "18836570921450463987", + "0x02A69aFa3fa2B2096cDa9294be8E0CC2BA3E0E66": "18242324361102791948", + "0x02A8F422E4623cF409B2a1a64a603B16357EA9da": "13858491149304736119", + "0x02B5E3987A3c0F92C9beD607dD2A6b99725d3e10": "8177880258516045948", + "0x02C545e7E16afbBe405FaD98a8a5a9a9fEeCe114": "11250544679911919540", + "0x02E4F367fc7cb77d9b6818440648fC4dD5d21891": "657503941386124957", + "0x02FDE3E1B4f016b65f596bB78D96562Ee6d0Fa98": "29081969647427129998", + "0x02a2AFad32DCDE40F1Ce82391767956792891D1d": "5968622340353938317", + "0x02aB2b31ee3BF13AD259d3F1eA10169BD72E99De": "77680503987475349501", + "0x02ab593f636923dD122fC2D1dcf26d055Ed8F61C": "13360712703995791349", + "0x02bB6041d8620b3547d3C3604e159b4B8968Ef84": "5064503967605286382", + "0x02be32C4336152b5F9436C7b6c783C7463F197D5": "29473331811715556366", + "0x02bf05DD5C8Fa83e83714014dbe543C9eab734C2": "6494771277809500266", + "0x02d2831312d42684D196Cf78422dc051929eD4eb": "19615918525952055892", + "0x02fb2e3F60545F260A1235BD45B12F8614311F9d": "6553029759348742738", + "0x0311447B23E00E0AED6D393213b010838185F846": "3359539199377751095", + "0x0327243868b117BFA262C93e8cf11F8CC789c52c": "11108805129200744483", + "0x03382c6315CC0F02b92401a67Cd271100d0BFD0d": "469514325746322822", + "0x034574004d0b8e862C987b4742C90B642E6Eff2f": "7773434319564266133", + "0x035be549823F861e1507cCcE13D5F971B8FC3515": "2137314686568700583", + "0x0374682594e0637E96b71F1Ca895bc5B8BBa2154": "109578288726951886", + "0x038065F8D8BF24101FfC7983d8baa426856a1f19": "11744701189612396256", + "0x0380E76371cf574Ca43fFdb26aF362241e7a4578": "213664424050925469", + "0x0381f313983B70B0e3CC07d3496146ce4BeC6EC3": "30586561479427133959", + "0x03894d4ac41Dd6C4c2f524eD4417C90fA46972c6": "2148717694417225156", + "0x039a5Bf4c4AEF45F49DC44E85ff4a05A2Cd61F14": "10206329726799381663", + "0x03B499f77cdD03Ec4C972b45766Be6d234636437": "6993480626302353955", + "0x03C2E2e5fD4069F664392972E43BdCb350ff4464": "17976772376388271164", + "0x03C2bFd2509dE9b13d0124015077e100a292336D": "62117607348916533", + "0x03F7D0E52e77DD99d554C9ED4B0bc7De26f1cDCc": "9109835717988244488", + "0x03a00628fB499264f3C1c34de9B8DBCda181D535": "346730849425433203895", + "0x03b2EEDcb861c9dD4b86efCfe30C44F54abbbb99": "11548897641149279550", + "0x03c245bAFCC0a80cD73b170D26e3d3663B90793C": "51522997126887426735", + "0x03c788CE28C019F5975Ecddd480eb172E42F5583": "11585788324418612635", + "0x03f18e3098D042d9fDdB2c13c7BB744a9d17a48A": "12409962693469281534", + "0x040632A43f51840DEFC466bca05A31735276C63f": "8012298814194617473", + "0x042d7f399342B14166E5C716b816cBC1fc649511": "93824985303638267", + "0x045297683Bd93e920683a5feE1d38f631867287d": "8018740973864405067", + "0x0460603116dD78F4106Cc2A906E2c584742ce0bB": "27978076135323112864", + "0x046113712ECfe494c72d69B4E7940c273f736C2b": "1299873133802868361", + "0x047C44Ed54A7f78e647F8c74B1215d1543e72321": "37270868745459073793", + "0x048BDf0D1E3F0b4BB77B5b7997674461c9f9d707": "20630284328168670406", + "0x04FD3B77Aa2b12C04BB744b0257e8f1776Ddf75C": "13205399917899163284", + "0x04d728fBD2C039F416Fe16783c2C9a6F8Da0a6E8": "11280472458717335913", + "0x04e647365556A9D0ADE9Ce326A969a466B20C6AC": "8875860633000338292", + "0x04e6839909B7330dc28BF267230d28da5E83Bd2a": "18629990097220760975", + "0x051505FdA961a41df1fF0a62D9d735114C608735": "43784125826720478202", + "0x052608222CE5fDdCC47cDE31BFCF6c22B33dfbC8": "20741606610620723019", + "0x0538b2d1281F44DDba08BA5E371dD223bF486D20": "21028410933783687102", + "0x05434766aA193349a3528B393725332985c95bc2": "15585001135370429632", + "0x0549ff024e0585fC0B11aF6e99A5e6043Df2F8E9": "28746510329325003123", + "0x05C07a6471d97F3A3716483f7dE8a088082C5B4A": "10493132821277992023", + "0x05E409980586A6bc82ea888C97974EDd1e093a00": "6460962742170779168", + "0x05F462A30FCF00b14be7F6596763a486b2A99f8C": "18400808621849698781", + "0x05b6A86fAab79CDA829722Aa5cbf191e888Cd0Cd": "12730035038284375419", + "0x05bC8d08B394f51479F5f5CE71A0e4831159BDDa": "40141439744721418230", + "0x05f8fA4430A899dBdB3AEf05f436A613d2f2a6B3": "17724987325095836666", + "0x060253f772bb050aD5439E5C980356DF02Cf0725": "220017902546584723", + "0x0625b15a34D0F688F60Cd86Cec59B35568461F64": "265315067522655392", + "0x0630aa53b3b77e048DB040e76Db6008e6C4CeF29": "14023612008610859407", + "0x06386E3B55D9A157Fe36677EFAdC907207172e1f": "21017719432552692783", + "0x064bb6f039D1d2cB5662322f5BFB0D7374C9F728": "33923977490805964428", + "0x06642b98103e3679bD329DF8e4C82F3821d27eE7": "8946068712090520475", + "0x06A31C5fD9E0085c5ed6330Dfdb6556CeeF91916": "13473203586028872010", + "0x06B902875e7d8649cd9cF6CDcC64eB6Fd7004D55": "50209098262018426057", + "0x06E6713B756D130F239183C664F1b057A9a64912": "5332309749452062875", + "0x06a1E3C6202f665b780aF38785Fd1973CB3F4502": "6869520969962434624", + "0x06b3567747913e158D34115CC3D1377C6fc4D151": "263400292846275766", + "0x06b7d146AeFC1A6407668ae94420B60E0a7b41b3": "24669153740436765272", + "0x06d13d1562eb9da28C59e86e9BfC2a87d13AfB01": "12107114496877504237", + "0x06f24325D64103B38d1c1492220d9563BFFBdb49": "26994986261420683141", + "0x071b0366aEeB596F954D79606B291669D9e56A06": "95630439163902236114", + "0x073C841e832b7CC2e75d0FB1F8a98DCa355Bf485": "8312738092444448390", + "0x0752Adfe7C42D89Bf2Fb3c22fFa18B7d0871C807": "716969018071495852591", + "0x0764daA1bC0c76499964c7BfA62Fd6971ED4B7d2": "3082545506443367124", + "0x0777c074F2Ca22c925e98AACE07E283D7bb8d532": "10316736701736561736", + "0x077E9B772845c83d137FA7e8E096B9A974FEB910": "20563044698224368068", + "0x077cb067a97Af7b519bE1A6a9f1276B8c16270B8": "13018649120951253964", + "0x078B8Ff955e3cf77550Bf2f2eDFc0AAcbc29ADc6": "6700045011360757", + "0x07983d28C831c8aD69e9373B25a4dF725593A68C": "50472955790280037226", + "0x07D1c7ad4b093CfF6eF406f5834294F2e0C33D51": "14257516431231831228", + "0x07F8718EFeD7f0dbF0596669C99BD4087e6D2a27": "12464928772302868004", + "0x07cD4258a5702b2E5505175E97a1e19EbdC5e825": "923675808401181131", + "0x07e4413e6d21bE528DA0B216724d78F271F79c59": "331663327324177006", + "0x080aD9D187b0fd917313BcB99B9fED79EC6b5AAe": "40485840268638324005", + "0x081F3283E5FCb70803ae7dEB3cd44898c970E336": "15947513864248579580", + "0x081e532f59C5d92C161eeCdDAD8cC4151adE601d": "10978907904264467930", + "0x0825e50EA7160Af9962Db0ce5b344EB9ADFaCb28": "23802948557036065172", + "0x08293aAb4130A9642D89096e049217297029f204": "17349215461074446994", + "0x082CfC02e0e681510c42eB5281D99B8934c7241f": "8981231433812395009", + "0x08378DACCb47692e28665105818105904Fa50f4F": "5049264351217946016", + "0x0839ddD64018e2922f1ce010724695bd1e0AF0C4": "23717134883950975921", + "0x0867FFc50F82c98e2470BB2E3b21a5f347c3FB81": "24860387280114347040", + "0x086A5848f43251d5d5d1ffabbE3AE27227Db576F": "46018171484294082457", + "0x0871E6872f0CdEb32eb013648a76575B4d2dBa80": "976230120982251388878", + "0x0874bd4d84faCEa3b754455C04b0B31FaBF15eF0": "6647265548537585409", + "0x088Aa2Ac06473084Fd57BEb3b06d27D0ddf68240": "10549666049871668602", + "0x08B1Fe528e7E5178c672e59C277c47b6785a5516": "27764550541491708499", + "0x08BDc9EA71603106d933F86b642aD571e7686854": "264254098884572220", + "0x08C9A7b289d228790A478aC936db1e4CcA707E01": "17915349038209578535", + "0x08E5Ee59DB9BBEaa060134CCAcB561691d60Aed3": "10345363067191395650", + "0x08F0565e8Aba8e9CBFFFCbBC39e0BE38d01ace13": "130153314889980617", + "0x08F236c3050E73f25f7FB828e2311EACb7aF8f5B": "101146299223452410", + "0x08cAe32b65f6Bb88A3A5a895b99a23481f3bCEbC": "19467850098927017461", + "0x0922Cbf6852467571670540f29c722C8737B1a17": "388847914866802456397", + "0x0934d8dF6b77169D5755853B06AC46D5f302434f": "25068391199608434062", + "0x095E5D0fa083bF92f09E590c899Aa962Dd1Bb5c7": "87217095572972047559", + "0x09680e225e0310540DF56D6972eA6ff0278314C4": "7857430879466634532", + "0x0971cB7D029DF6d7949F293037701BA0585cad88": "9715835999663729488", + "0x09877A3e0EFc16F973cffF48BAc79e9Eca48f737": "31352599932939622", + "0x098D9a770f3BD88beF60E72C833aB8Db240d5928": "55448356784393355070", + "0x09D0ed8D3eBf0b0B5d2A3D7096546d6d7085B8Bb": "68387384110533018300", + "0x09E291D0F90773f6dEB88B971B6678b18914C272": "4217324875834191700", + "0x09a4866fd6A450C364154e73B561A56e2a304B73": "91917983477479127557", + "0x09bBE6493CB9BA42922183a1AF57110c805d591B": "20806169472493414712746", + "0x09f3C4e3CC9aBD59414CEB494FB2B14729087D27": "2666273045125229235", + "0x0A22C1a9baCA5448c0549Ca1E18f0632995FC77d": "120887704011665614776", + "0x0A2A34CDFbADE6634d902D0D0a8Dc7533d26f7E3": "48416448091066549441", + "0x0A5542041D46C8694C770Feb228018215db4e821": "18944061770937439135", + "0x0A776ABBAAE0E2161D0E131f57e605EFbEA4b99B": "94525472618877936597", + "0x0A8af6815E83bcF6AA68b9d5E203Ba25a846407a": "5862446447092539477", + "0x0A9A7bd671abd81D611e62D841f329bAfB445a88": "6228810677646209386423", + "0x0AAE9Ae032b04fB8AC1F6265ecd7710f443995c6": "455219168320666174047", + "0x0AAf72DA643570Da1bF76E8b3063C3f378b3D3D4": "16046335739190912687", + "0x0AfFb5232DBe33496717C95FaC589E2eEEBAe887": "14657204378942151652", + "0x0B2c3d2709900db4a73055C2150D346Dd54cB427": "1173499154218563904", + "0x0BEc2a7885d600DDB7a06e58ea1ff475dfc7cc22": "9093129005835625056", + "0x0BF1411083AF9E92185678A9bE53073908046F90": "124494230844239770128", + "0x0Bab9877982a07CB14ce3715BcA4FeC6D4300418": "131466101987173564314", + "0x0Bb7331EAD9E001Bce691c8039c3c0CeBD690f50": "13835332228607271729", + "0x0Bc459d576520B252D5F5f6809FAC12F6fd8d1cB": "53181175191605337154", + "0x0Bf00d2F1F2a8F139a58bcbC9ea6612Cf7E6b35D": "2882136619634486169", + "0x0Cc83bD4C5e7f2D159958786b5d75dfb7f9093d1": "8472190192438949855", + "0x0Ce390F18Af702Cca546297845a4A51D102123cf": "112820875702889843513", + "0x0D30db85Db1A4Af431397877d8276DE47f7f4e9a": "276077807495454227", + "0x0D54C892Fb457C8E6d38DF8541A1F5B94e9BeBDc": "3386095526188083288370", + "0x0D7aE40eBA6E9F853DA10b8658627514bF744B4a": "5051810685334474721", + "0x0D7e1167e1dC4447437F1688a66C2260Cb53C063": "10399086192837604653", + "0x0DB52eBF79f1b86408666095E537De787B19250A": "3625225007256798608", + "0x0DB5ffA6616eF4139cDa32Ff297eC67A1D231C0A": "4810821044517633944", + "0x0DBcCB2F2B16926dD60770ff72C6bF6E5cAb3CBE": "653313413839841689", + "0x0Dda8f010088299AD9755D31FC7ed6173003ea21": "38185800438568319889", + "0x0Ddd25ff224005ec480bf47fE93Fe8416B70d007": "8634111454931654097", + "0x0E0b40cdC92Ed34318DF659C77858DDFA264210e": "44212080984547889343", + "0x0E5E79DCAF1A31c61a8891520c2e7619478B4cBC": "40136521216163273675", + "0x0E6f434D3647fC1025261586D6f710CF278BE0Df": "250296233131904773311", + "0x0E7686A71F9c8D4DE9F92ecfE2E5Ca8E3D4DFC27": "30460777423884604902", + "0x0E861F1D1A0D4fdC90FE18CAcae65bB750105dBc": "987334376044644628", + "0x0E9698994fD5124bF5969034268BE17b460774a8": "19709906268845456433", + "0x0EA1e9AC50eC4D8dB153580C2aEC1c5ee13C0961": "11570299149979906333", + "0x0Ea39fd6b27326DB886c8807EA93ED27Af75Fa9a": "13763662636072598367", + "0x0EdB2494D72916eeC7A19c05Fb97c2bb937D705F": "36136059375450755029", + "0x0Ee378B323239b83EddB63Ff2a63A107d4594744": "13346510263159895920", + "0x0EefE22Dd6dBB89eA3c931315a73266D6026F29D": "966576245720681357", + "0x0F156356A3989C4C1b339E08fDf7BAeCE53d9De2": "9662385045108084025", + "0x0F2B20Acb2fD7EEbC0ABc3AEe0b00d57533b6bD1": "7603388997263830625", + "0x0F2F9599c19CDDD869D0Bbf7BC3bfe354dd5b40A": "7549538153417274849912", + "0x0F358Bd6448C630F18D92E9f7d1b5afa2cDAC235": "65658746456988448199", + "0x0F3d33d609293B474E2Ab2E98131f0fF43E753e5": "6670711056350624938", + "0x0F763341b448bb0f02370F4037FE4A2c84c9283f": "29326528494179754921", + "0x0FBaE150882fFbe8bCf2fdC9cd07694711fD2A36": "679736699428253166", + "0x0FC0e5deb2208928D79Fe38FbFa897A83a44E692": "19408888892986965440", + "0x0FC3381627CE2Ae5241d773634e457988049fd4C": "2536297906662096872", + "0x0FcBBb8afd889141BC1B9951bB34689C64aC845E": "15229612878438846772", + "0x0a1fC491be27DD75f58F9E956aB8864df11568b7": "1973076939099495525", + "0x0a51B133b304b8D476A970Fe655d870FdDd8168C": "14985116897035995011", + "0x0a608F679244C5c3dc4868f11f69803252b5d24f": "3889107292313221090", + "0x0a6226165ff532E954F91fd272CDc1aE9Ee2E95f": "22873422795530415878", + "0x0a80832d7884343146397D130370D15e81115113": "35126763191622299194", + "0x0aC5A04E3Ab72Ae28e2939358387BfEe16e1D47F": "18729945776755622535", + "0x0ae509708E0847da0133Bc779896b8E1414aD121": "164477651868361394567", + "0x0b5c77bf369F8b1efc750Aa1541a486B484FDA26": "66508538301276483175", + "0x0bC407b8A67c2d7189363930797658719f9b461a": "17097602403794181326", + "0x0bD9fcD63c1D8f27c4D4B93188B4f7c9EA8E71e0": "23370353985559500866", + "0x0bDA412D375aF701C4a6d393f13f23a5E897310F": "30466310170104545825", + "0x0bd0DDbC2bcDEe46f8162B169118E7893053fAFd": "4255598774798441070", + "0x0c35a7F489E659F2dd9BC40E5398c558Ceb4BbE5": "16092928868671273359", + "0x0c40a5F541897De8DCD70c175CB25F2Be957996d": "27588429885663772617", + "0x0c5e5A784C03C0e7Fd090fb012BbE0773B16176b": "42655416850629192273", + "0x0c64d2d32ff842fb089d664D425Ca1c12DA8EEc2": "20670672003823850919", + "0x0c9De2FB933DA81095254129F0D18BF70D9aEac7": "2499688170574015855", + "0x0cA1A54d56B16287A8D7d6783b70595591b7ea2B": "14717550237040595880", + "0x0d15333aFB629cB49eCC1Aee4cBfDF8a66A93B7b": "10938693401632656613", + "0x0d4308BA399ddBd3DFa98DcFF5B396EDA29EE04c": "9131885650567660105", + "0x0d482ee06495d2EC59B7Be33fcE3B85fBaE322De": "9251150456731236121", + "0x0d4a557680a8Fd391B82195fE4Cf839D77EAa9bC": "20715462353958143731", + "0x0d522c0A0B06828CaB5572713813c61EDCE4849d": "19195772359505695166", + "0x0d61e6FcE1Bf915646bf19aaDd5A9a53E6eeB5C9": "11111847727118546740", + "0x0d77946d201Ee95d272C21B3B3588E419dF95586": "5424042674316653320", + "0x0d93bc9654DF5a50e0E65Df55D09BA7b47Fb95cd": "198223480703697936398", + "0x0dF99381dCBC7715556a41e055f875b752Aa5d90": "30691050683419920378", + "0x0ddCD81A6FA021Ed881230e86b75A31c892d7F8D": "27770961678215142774", + "0x0deF308871440c858B1e16B0022d7C92dF706714": "1875674991786495141", + "0x0e198F0c34A93aea5F6bD3967cbD1B8F8c8C8319": "8027042850358136208", + "0x0e63FBE4f224338a4C93394016b94B55F9A43491": "91888118419651590", + "0x0e646936D6ead098F81ac02433b3171e51157B9D": "17878705469131577059", + "0x0eA59C05BE4b7149AAed26bE764b618AC0255643": "36433001798298524718", + "0x0eA9239001E8EBe447d9dEC97b3433E5eFcEC5A8": "25335029658005443108", + "0x0eC6cD3f48039139f74D269cAe549a9F0748979e": "40095916654136288671", + "0x0ecA9757acfBD4b0D8Ce301ca83527A55B7F1146": "20344414714076020873", + "0x0f493c98d6C4c555bf5E5863360ac08fca7C9bF3": "24987293640703154246", + "0x0f7481CE6143448bFFb0E250aBD860c89ae09AbB": "2962685878594907372", + "0x0f97DE84611f43Ae212b4CDD04457F2498692e37": "10327396974360495395", + "0x0fFEb7553eA55f2Cb96D404fcf2eE4099568e4B2": "22674058417698477469", + "0x0fb3565B50eea3d6EF1bfd60Ee2bb23FD7fC6F83": "1111856495464895401", + "0x100c322564B58CaCFA06119E29D04AC5a1BB74B3": "24100338069120212333", + "0x10166A6cDEf9354d5518680aE671dB3d9661b929": "25866195843709541259", + "0x10175dd92Ef35298D0f2Ef33cC43128070c1dcdB": "9251646748645376126", + "0x101e789DeD5a3456f1D5F04D3BdA665BA045076f": "93638352657091493991", + "0x1024818db7dF76fe6B4dc6192FdD32B3EA74eAe8": "7539120917079426532", + "0x10725Af1F2919d0AcC5Cf294285d97710f980490": "28899326302020523911", + "0x10812253AC4C1D1f66189FF37be98d844259Cd93": "24043884475525392124", + "0x1082725E9d32EcceC4A12014AFd127F172D9CdEb": "45701656590112875416", + "0x1084C4ee87d1488d1eD45d11408b09AE1Ff90576": "29890771281034563514", + "0x10890742A1a20A936132072C20Ae77b081486190": "36907314812000082923", + "0x1092344BD96F351a00D07e75fa4974076342b779": "30950887689997442", + "0x10A7c7971846F32D142F803E270D113dc499AA3f": "4795713336935263239598", + "0x10E5a1628A392446c44912818F683711B0f2B3a3": "69779418190400135773", + "0x10a8496001622D0E02952efb7584B269df936219": "13455015312398667624", + "0x10beFF1B93cB379C2D4C1848E7cAdf7df5b7d19a": "12898480128276239078", + "0x11062FA052373c3Ed70a318E8E47457B7B001950": "3814587619241789836", + "0x1113710701253DAAbd72804b1Ca8D14521b9f25c": "1253682543490480784319", + "0x112630bA98300A8FB0aF4EdDB42449c03fC65a58": "5570777858628785307", + "0x113D3fbF0A682c1D5324d70Dc63d68E50D1668C5": "31944701950131250997", + "0x11433175F828327b9F83Be7C39e33392735FcB4e": "106631274136169468879", + "0x115990dB1626CfDc642c4D8b1386379A9256FDA9": "631363108534046368", + "0x11697ad5Bdda69435Dee2E52a8947CB281804e4F": "14124408940121151796", + "0x1175c2dB6c50b693B1964692Cb775758AB4d3e89": "18331367118112914337", + "0x11CAa8A6D1cB287082114304483dAf4C92C1f7a8": "17252425076317088888", + "0x11DFfa24836Ea2FA184cF66139deB6274564D8f8": "14842324573858650816", + "0x11Da5aF42D92126E305b9331F2b57E1762f3F9A4": "791499111195852298", + "0x11F1D3bC41F50903060fD97fEcd27741452e72ae": "21212533306120530365", + "0x11bC1fE797DA8428fF275c9ad3c02971ce8BA104": "14968904719104808412", + "0x11c34D9C67162dD21273e8844c831f7B182026a6": "8214065090660044540069", + "0x11d64F176B72F831d5760E562D8eD01CF33EadCf": "497528653058030", + "0x11dC841653Fc7792C89e3b5c8E0D5059ABC02672": "12092748591394224053", + "0x12027072154A0F4186A22d007874356287050272": "8613588541229102364", + "0x1229f3C7b483e0d06235aD6A570C7aa55D0f3766": "13872287652009052909", + "0x1239eAECdF3A755970f413d8b7Fcd1e7495ea97C": "7752490247029151893753", + "0x12635Cfddd2c1bbb421E1417A8cC1D30Ab57EDbE": "15586176664388422088", + "0x127624Db705Bcb66179Fa4b27BacEF42E8454d30": "6475864252172785646", + "0x127bd872121C9fc7b30db85be48B3cd0433C3D86": "20606436452549813885", + "0x12850585b8fC94142a383116b4234CfAD34c5f30": "2544092521939622104", + "0x1292183D5fD2a430C5d52a31c5Fa42CE27dA25b5": "18491182441936549597", + "0x1292c5DfB24F7287BC1f57020c378b4b3b89803a": "44088464727855450282", + "0x1293F289F3b3f48A595c0e5EEc407aa036132926": "351536613332351341", + "0x1296B0A9aF2C396a03093C0ee576504c877F4f0A": "47617950525859886309", + "0x12Dabef2e4252a3A19b9886B1e40deD62a1e1DC0": "6653107492852571568", + "0x12FEa79122404634A03Df7Ce08e984E6C128FC21": "1033346549160026820", + "0x12a59989f8F06130bdA8D6E936B2045C734F19aC": "10858301820900312053", + "0x12a875E5aB90bf7e9eA3a2B8E24C782572C472d7": "31746918211879055542", + "0x12c11a2ebdc9053B7A1B7B5601E2EcfB24FACb54": "215168579678521567", + "0x1306E209951b1bbb150Eddd894B7ebDf29fd0066": "264052588036520525444", + "0x13B0E1c351e4a9Eae4980ae5469022808C8B3B6D": "6681591440246382949", + "0x13B7F66E740bc3fdb6f2c22302705EF03d4A5DE7": "5963949727958676193", + "0x13ECFEe59EAb5669d21C87C1e4eAC5d6F804Fc17": "89897147119732209871", + "0x13F84787f8328593B4da75A9A45EE62Ec552C0e5": "12534568897140513718", + "0x13c3644E789c06bC4Ab5251debb5C3983c6D3edF": "11217184754600604003", + "0x13c94DBb5040C64D8ea176FA2f553299577046E1": "12541207237067924628", + "0x13e9F9d98FFE62bAdfA5B634f735493dD80AA0B6": "20831659640417810110155", + "0x14095be62e87CEFf01eaDe8045748Ed16A349aCb": "10477479830045658575", + "0x1414f6EB491F0C1dd69766e217cA98D67C2b9C52": "5877670239101008650", + "0x143c23bb9575935ccF52591D52A0f0dd0a51d935": "24347073981225140678", + "0x147b58481d047D17Dc774be993E70D2b6538DC63": "6427936252057170822", + "0x14941c86aF9589243ECEC0dE4160BB9486C8bF86": "148421152393204753581", + "0x14F50A926Efa805b31774403a90E510ed57db3a9": "536739388237155739", + "0x14FE0C79946094910c5202B5C1C09D1B63CF3612": "390309158843960127326", + "0x14a599695C66A73f217c8F153aa1f737C192Ac0F": "6903245854900595276", + "0x150F3920d1cd428678761B8049C98B80178BfE58": "11448726070211753465", + "0x15173802E808c337971A3BDC304d8deeb5a9e75E": "15351413664384378219", + "0x1530e79fE93209292321cAaceEaa468C73157e11": "235120462273168637", + "0x1543BCaefF63d988e4e724A7bE221A7657555Eb2": "5074466393736851652", + "0x154DdD224de50828fa81Fd4DD3F9B07dbEbB3199": "27759745379243918655", + "0x15917616819694d5d15b6d1a05B55114601C503A": "10797760776112445054", + "0x15D195722c9dBdE5808939d0Ba6b38e42113E40b": "1902665388826527795", + "0x15D3231FcFE4337C6f8CB35c0337946eAEd4066f": "9159224523656893891", + "0x15F00C0a3FA0B3D54A3C075F5C572637a7Ff8347": "3654398518260984078", + "0x15F6D02B4F2c72418fE93bc5914e12e541A39F47": "27964228704290243652", + "0x15bB706E4F34E71C29d9A4C18c78283BDE006e09": "19737378861561873191", + "0x15c27ED229C6C345748603EA5DD53F6eb18B7Eb7": "107805601662015710", + "0x15f081872aBE9b3d0141df6f260B16aB5D7eb6E5": "6822227897219076389", + "0x160A312F4891d00a8363d952170e632d62544ea8": "326533981109613599", + "0x162A9669c0e162d9EF545eFe37f70b010F4BED77": "5181756519467996145", + "0x162eb9EA51929cFC8D3c4639e6729B428e575107": "10528795662919644777", + "0x164767126f2570a427E3c2F34dA27003f8394a40": "20848146265247129090", + "0x164BbBdb5996709Fb4655DB794339A511b6FAAC6": "5680765202647387658", + "0x165321950F7B0bDF18567E503da253bf58EAd756": "10182371677669774902", + "0x1672C75ABEFf13B9928FC4A5C89668252d695e80": "401179475840763005415", + "0x16877726e695443A42217BB111187446d9e8e6e9": "45944006561564954007", + "0x1688A712393641f19661354E0d5F15630Ebb976b": "10508311720744127593", + "0x169ee44a13025bC455abdE04b0725BBE84bc7a2A": "1446344421096724765", + "0x16b8Cc5B1558b365D9844385425b13Bde0ceaa49": "103642990271845989923325", + "0x16c64359eDE7a3F446a3bad5Bc1Cc428Fcc82767": "15371994848542492631", + "0x16f02196803C78E40475bd267690ddbecdd320C3": "1656291596625845737", + "0x16f7c399146C9866716031cd0ed1aaC43a697714": "28232484743506765650", + "0x1702f2d0df7c99011a690461c34e51BD81cbab48": "8981632083878674627", + "0x170FcdC1Adf439604ABFF4FE62Ca360Adb5De974": "273576916629231217238", + "0x171839e4DEdA360c0aA85e95980D26cF176597d4": "36221996490720076591894", + "0x17404FDf967349D0e4100CbA6f859b605597A903": "19128960669862759252", + "0x174A31278C5EA44Dc8055C57CF719E5b7cA50db5": "85292352887633198027", + "0x174FBB773040FA9f09C9982505Df77aeF8165448": "707661980899471297", + "0x174b39A64b92f5ac0f0cD0d83C14Db6954dDaaD4": "11641169272757550568", + "0x175cd663355666D5aa84875a99f14f204173d1DC": "27745938349258221824", + "0x175fB20b9B5bCf80a0167D403405E6F3a074cfa0": "52151368578776151915", + "0x1762C2816990dD452eC39F2e4354beF1B55f1920": "18138631895370053716", + "0x17769093721BdC8eD261bc1E583cD078c6375B4c": "9634063841832307717", + "0x1778CB9fd8D489C740568A9bF16004D948d9b6bF": "201321462717063402", + "0x177F12d47C58DC69476d7032da6Eff9D38b9BD7d": "43119738500881100263", + "0x17952cDF0cf073B4f949E91d4cBCffB466B1Ff9d": "396404828598071778", + "0x1796bCDABe823A34Ab0E052450546C5ACC8A3c73": "15937011412804238697", + "0x1797b3998655F5AD3197DBcE7DB084c2996dA5a9": "210476799688267009", + "0x179d4FE1b779ce71518402cbACE9732149581481": "13965895030660026064", + "0x17B89CD2Bcf2e02DEDB1e7121C8f3B435736357f": "18529795649219261248", + "0x17Bb1a4BBe5808cE15cC42889bf3E0b8c78fb742": "14060812935075394961", + "0x17Cad5D9F8BE52519C9d850c41411d1ee75572de": "41256138820135008143", + "0x17a02673caBfCA8f24FE770f375B44BBE2712180": "5205417650344149927", + "0x17ec047622C000Df03599026A3B39871EC9384DB": "43294473308217317913", + "0x17fB4db24b8f1817bc33d6e167b105FD77599C28": "380923249852704026146", + "0x18144Aa401ccB9bA6dC69Aa2C2c6F536Acd4f277": "7129289459670190103", + "0x182316b14Db4D9a9B727356C197115eACaf1714a": "14271773070376329380", + "0x182EE985362cce8b9f88f121cc1c013dFE9b4720": "13759886457540221013", + "0x18393570148DF516f664EF624d6ED9e808F109fB": "6898800396056657674", + "0x1839AdE80FfccB2e58B1B77328906BaEd51F2CCb": "33564101295878971646", + "0x184F44a581a3FDf67e834Cf2A0F193CbDd08A3b9": "254357596426480244", + "0x185f4bc68449D70a3609EffF8f16fE789d3360B5": "33371729404894055845", + "0x186CB235a7749e85daDc4f5D92ED2a2958BD7E38": "244825274133820843", + "0x1882142b506101F35CE157Eb61fFB6EA2545E05D": "12141327794806704682", + "0x18857923D89b3198A2d5A9AF9531Bc5C281f31f5": "12611483516165937271", + "0x189552138c5fECA47675b104503480AF646c4936": "191708302282364437", + "0x18B0Df21FA2F4984b4a6f62C4bd9514556C7C3e9": "27279164894137807730", + "0x18BE859791D8F53D85dCc63453690dE93725Abb4": "33747765306470707940", + "0x18C8049CeEe4F18A059CA3E79d3642d682034225": "43381071123871018735", + "0x18b2F8A826f26418FEf55c1f7B3A43CcD90E4a82": "19682799610601655798", + "0x19071345C02cb215443c1085BfAc6D5077083471": "5357964212203864826", + "0x19160D8DabD011583D684510b65af387028d71D1": "106301139473694445864", + "0x193991827E291599A262e7fa7D212ff1Ae31D110": "184088244471309063528502", + "0x1944Ea91EF6447b64d9a61d8C7D0FFA0f00a26D7": "18884192592603458963", + "0x19671F7A750c37e6ff12D899F29F7120fA07cD3C": "9634706725994153944", + "0x197880eF3cfFdC6bCf391a59558249037bF711Ba": "60509409611982384864637", + "0x198723f678a146f133dAEBfBd7120A6Dda1ed9fE": "14670947799025779877", + "0x199409B7B94091fd0013f51c5932A0Fd88896b94": "116440868252227808", + "0x199819F4DE70E3DA056dc131724358255A7Cb337": "25526643119316836402", + "0x199efbFCCE43Fa755362E2c44c7e01e87cc35831": "136268470999741060708", + "0x19ab52CE9c3a46460A0E5508a55B2E00A17957d0": "2973083956211797270", + "0x19d50766C78a75f80Bf2bd33b51e9bAA26882a6f": "242122411345397429", + "0x19e0591A37be5452F6c7c2dB9C5689ddd14be715": "19898038959094728811", + "0x1A05579346EFaF112B053BAf62fF28875d0F24d0": "9965336632239534022", + "0x1A4a900A6a96C908880C286eb7fEF7B7e87c14BB": "5595726301258181555", + "0x1A71D58cBf7D83fe9f13Ffe6bf8589C82d64ae81": "413221603388385030", + "0x1A8321056F8Cb4106EeA5AA7110153c5C97170A6": "7359211592789102389", + "0x1A9E49573d6510E5476b525763FE3955Abad3eBB": "188331316706665334101", + "0x1AA851d131C3Dcc1B1DaF2bE8378Ba0f3eEc9981": "16681196739528993508", + "0x1AB290C0C7412773aF2A5eF4bD61D1F072F215c5": "3563751885066869084", + "0x1ACdf40A98664569A41648b1b9c72f27407f9436": "1533774398842057989168", + "0x1AdAF09287235F21B5A4DdC3cE29dfb3C596f034": "12604004504670349065", + "0x1B0C9503FCB2167765b3Cc83C0a9952a39250F8C": "15544862905377044106", + "0x1B2Af3971C0b730d2A6B78B66c7a446C979aE22d": "7945172066722188003", + "0x1B642BacCBde14221d8bdAecA37632269100f3cf": "2350482539739246485", + "0x1B793b70834A80B1CF1b9C279084409De419c956": "332427894028974202653", + "0x1B8ff06e834e6892Ae856881545249878846B66B": "122595902888268409", + "0x1B9FeCDe11F3d45e0b06ee8C09a9f24132aF3682": "7423061836176650863", + "0x1BC64307e6DDC620635b862FD2051BE32Bbf26A3": "18152682300957610563403", + "0x1Bd477FC34B96aB561156F2438B8F9a18FCB5673": "996712587726569421", + "0x1C2805f915b82e3b38f1bdecadeDE8e5EDC33715": "1121063098070105802", + "0x1C471a81f12E97D7C38581981084265B5a31215A": "227826826140100130527", + "0x1C67EC1dE25F11411F0530289bdF9514672f641B": "1733478794398744678", + "0x1C8972ABD715C744368bE88785515d7594316E54": "594953631392245970630", + "0x1CaCf7AA1676B16863748E9F5D749eCb3168AFB3": "10541682816071338820", + "0x1D1EC9ED0358c9FB40648f09E3Ef6F4EecFCA178": "1272141027307157102", + "0x1D7210fb5cac1acCe5BD98e41e6576089fbc72df": "20627917904247097048665", + "0x1DBa1e365cc98984bda59785792F5738f0Ce24aD": "24843539972854892543", + "0x1DBeA91dB955a8B700dc686e3cC8441ee67E28DF": "5906767862607641652", + "0x1DC723921Da7F9024bA975b29b313AFE8548E589": "56182957049030786293", + "0x1DEe49Fb5ae106De20DCc273E72dF0AA01DFc7C1": "29771965769004844611", + "0x1DaF1F760153dd18784F4bf03AA353695cDB8559": "9256249660559492509", + "0x1E21F4d02D25434359534EAFbea21E8eF3D50A95": "12970071855364078846", + "0x1E258EEe256605159e880f4B910d48A24E3Ec668": "3916752665838900329", + "0x1E321Be460B5B056e861F682323fDF1511d275C7": "13422047585230428762", + "0x1E75FFcc64d70b196d255EC021d0A7494F604D2E": "6226745570917752434", + "0x1E785Da93fFDA0411365678C6357BdC8939F6C1F": "12685284530371238333", + "0x1E8e395D9B38D776231aD4276447188A757780FC": "10172819668892402599", + "0x1EA1e4eDCf3b202eA61fe0Af3648c1a44Df3b0E1": "5073383180232036719", + "0x1Efb9f8b00b4a5dBF0F779aa032febD4b8F38a94": "3011008908383978958351", + "0x1F072339710506877af5be4D81Be243cd55C2C54": "280075270830084661", + "0x1F1b80e970a7C10004feef36Fb07aB72851a53B2": "45720844728077671025", + "0x1F41a778350F819A686625b506545242d1fcf418": "21794752540439734921", + "0x1F427A6FCdb95A7393C58552093e10A932890FA8": "26655566224645891759", + "0x1F7d1970b0e9F229Df8D81f1F358f08EE52462Fd": "106630921051856091598993", + "0x1FC269c81886420Cf200EeC91CB1460B65D9dBE0": "17692963983946149826", + "0x1FC3ccCb9A3e678BB8a58d487Ceb6dD019bE984e": "283207450764901713", + "0x1FFb72eA08df1F3Ef0057d3Bc44065Ba44905778": "19723521749756772640652", + "0x1Fd9a3A5aCdAdc8E46F300Cd83562a50BA138fF9": "4373771871920620102", + "0x1a040B4dAeaEa1326f0bE072A8CB8F173D29915b": "27671166047182211296", + "0x1a1fED4157F0EaeCDCd1dc4749C74765754A6594": "444813314666390967", + "0x1a201469D96f7D443E71EE3997efdd6f2eD33f50": "355639492756327422", + "0x1a551b5F59cFaFD672c87C34B2Aa643976161a7f": "40602700285947678781", + "0x1aC402CC74e8D0F5552B8666281a214D8e89D7f3": "31388057167808465666", + "0x1aCEff73c5C3afc630c1Fc8B484527A23f4eB134": "166725710781457533664", + "0x1b2bE3415CCe36EA9e406233eE19bae00DfdeB90": "51367041193237826944", + "0x1b35fcb58F5E1e2a42fF8E66ddf5646966aBf08C": "6614925668960069254", + "0x1b87743969c292e905F1BA55fE3dCF87b2f740b6": "8592144207536668020", + "0x1b967E911A426F592E7E8Cd499598c3E0b3e2190": "262035921387543801", + "0x1bCb24248b8873262AD56b0d2281920A60835749": "11957504778376565727", + "0x1bCf9937B3AB27910253d2D4c5c882BCE6681df0": "25954192488450814732", + "0x1be32718D0e44B0140FaC069bDE714e4aC920d90": "500129604161919964", + "0x1c274796Cc49a866301e676C0875cA859DDc3C7b": "13415856971032940842", + "0x1c354DA1044FA00f08e5588D18C256d88C49dE60": "32568456239256180566", + "0x1c4062b8aD171196ADa2c22c90B4D9B8EC02c197": "12052693318207933055", + "0x1c5626Ebf6F18299655b4Ceb17c24850Eb330B20": "16194353607346952826", + "0x1c699126B3F4646EBB27c79B98CFfd7FA1D4722D": "27115561931767477608", + "0x1c893243bA33e8FBDbB8b7ce6CEdccfbE6AE40e0": "630166529089178645", + "0x1c9Ff60c5c865FBB643cCc274C63bD63848710A7": "1370098567071912927", + "0x1cC5b35989c280C4729FF83C0BFF3da4B50a9C35": "18624096851215542332", + "0x1cfAFaB5953bF36a2E095eC4DCe7d64889f2cA8F": "11815804741966163407", + "0x1d202DAfF74d2a6F124A95b588fBd010b896D267": "7858774350075787078", + "0x1d3bf13f8f7A83390d03Db5E23A950778e1d1309": "54743440366536013571", + "0x1d4ACBC9F70Cadd4E6Eb215731B8a20BB848D042": "73447702999712288433534", + "0x1dF24622941C97840BA53e2b165d4BCd0d86464A": "17068827387132044246", + "0x1dFfAE74aCf1df1Aa4118b993ff73ff84932e6D4": "13216878445140242668", + "0x1dadCfd0f1594d44d56733043c80Af9B11DbFCde": "869933934902274387", + "0x1df6Bad81d56877077B0885f6C4771a85cFC8008": "42906876524332612682", + "0x1dfcb291d9CDe084930428d4448898B982Efc495": "4738114007846249109", + "0x1e45afbC4e95ED847e07cBf549ef219E5B4aA293": "26595111742995368222", + "0x1e747204a10AD56306fe6359fDdC495329c94293": "107029910866984006", + "0x1e8994FaB0648dbCB7D6f0bC5b6415Cca99C79B7": "95588085619043069872", + "0x1eA41a823C1CA8E1C59587FF1eC3fdD37C4C4636": "38102190736271731", + "0x1eBdBEf9BC82293F71f655eD8594Ed1e4b42BBB0": "21347336792545989085", + "0x1eF7b8eA611d3e1c1cADF638Aec70f587458D613": "6130200264290852871", + "0x1f13A53c146be6057A869aC3c4fdc9A78ec74431": "26888371378059514411", + "0x1f2f129BD9F3746541E5C6823E3Ac0f1CA796542": "7832821434138700190", + "0x1f40f5e887B14C6EA96e20E1668ACeeFfe1E736F": "24303320389333663736", + "0x1fF034901dbEe276aF5f75DbA762C3aeB59784D8": "20763524779132410808", + "0x1face209A92CD6080bd21C5c5775D0756AEb4D47": "22638398881002358501", + "0x201F822105A9F7bDBc970588d1ECAE8EEba9492D": "8752372875655931224", + "0x205F9744Db1ee7F3509828a1cf2eDCaaE9c66aD8": "17288958912209674631", + "0x206Aa4C31fA4B2a651bBeeb738fF4F34caA76f86": "13014510516015496135", + "0x206e329247cfAd8a4CCc930E262D6F24Cf034CAA": "778894303735459651", + "0x2079C29Be9c8095042edB95f293B5b510203d6cE": "279348651098638907667311", + "0x2081282543Ec37AdD388C9449b621D27A243af28": "2526228959126473034", + "0x2089863A4f255117d893F025Dc6C8d2F9A97a13c": "7157274522224123286", + "0x20A34034AA95abF8C98d5a6fbCeCE22093c78C49": "7126371062234248882", + "0x20eA21B8C700c9186F4F910db0A39578F13156EA": "236652769044365571", + "0x210e67565897403f719B9a84475EEBAe2f6e9f12": "12148707975113901712", + "0x2126A769eD8e6b30dE08c03670f33fEaf82638F0": "22385258226087481408", + "0x212CE30Fed47639eF28Feb40C675e3Bd475a53F2": "38540741188617000102", + "0x2139A12FF5377FceB02729c8658f4B0922A68047": "15143683446097612495", + "0x213E76aCf1b67c45C9E9f41Ffc319F2292108E4E": "11889494903289887483", + "0x2153F9042925f9f616eE0230bD0F75416D058Dd0": "16069574223267041532", + "0x2174e69aF9F1E4A7bDdedd50410d695Ad1f203e0": "19795758042365493039", + "0x2184378F222a83d1c79b4A3D67554262eb578432": "12962178613527966794", + "0x2189735145aB166A5Be6A15DB568d40327FD425F": "195536862968443982", + "0x2193Ed5E46874A48c04f3F7ADB9943FE42153541": "34032141145594932", + "0x219D23bBE85d60eC01548daeFe916bFC98e5f970": "10034076005127415905", + "0x21B5Ed2F361cf4deEDf1E2d1c3b6C202a80b9645": "10544283271772694760", + "0x21E0A6FBc6284d238332F02Fe155827b5882Cc2f": "20950418742980578298", + "0x21E8F1199a777142C32A0d0b099cc4051900Aba7": "29914537137050399701", + "0x21c478a21b6bAFc131c94e2D110412b9CFDC6396": "41253121053552615272", + "0x21c9aba2392dD5e15CE74BF9C8685aC4907B5Fab": "118065356959343049810", + "0x220fA1e83B826bad7AB69f4BA34A0A998A568EBa": "6048717935007563226", + "0x22187b5570FeDEdaaadA267741dfFF8dfd0eD57e": "31985519505415290481", + "0x22194AdC42b7ded3ad3911226019b95Ccbe39Ed4": "23779692295311330164", + "0x221F7Ef08329cb498d2cdaA15213305a9b995C1E": "18885063954499583358", + "0x2220d7977AB4Bb15dD9CA8a83b11A0aBB09F0c6B": "9837741707364322", + "0x222124ac09cE2f132A43577B1c4b8F4B8Dda63Aa": "2987445047496127831", + "0x2233FfC86c9C929187d7E2B7aF374Ec882dCa2d6": "26458212553368962416", + "0x22790c96665D2F77b9cdE11b4e3A0A69B7c39271": "67157046309376669502", + "0x22B660F6E6A007AceA649AcD028A8d057c15620c": "13790440502147101710", + "0x22B9EBc010367724e2080972B3BD51aA79b48E47": "8542794027414890549", + "0x22EB2fa87Be7A007660Ff48eB9e59EF9f083DE22": "17418016116811353025", + "0x22F3Ef9C1471734f88Ad3E7D99dB5dee4DB7F8Db": "8139760329779445917", + "0x22a2ad7C8881E75Ab0ed4947912f48fDeB0eE1C4": "84441381308888710", + "0x22fc33e991D97703e0f882f444b0E22C762412d8": "524966901137633030", + "0x23076B3b0fAd8DCaF73019345812550fDF436849": "6248073702365837865", + "0x23188da77b406127d53B5A0a2047d10a8A481AbD": "38868959109789052064", + "0x231a19C04c6B314A395c915fFcf5d49e1E95cc34": "11936757476289773273", + "0x2322aC6e94110C5C902ac20CD6d64da07A41a3E8": "737982541882209586939", + "0x23264F16aE0D4fF244768b8d2ac4fAdc5bFE445E": "25676168518403350839", + "0x232E01304Eff47efdC2697018992715290AbeFBA": "16383314597833123166", + "0x234f4f0e9F083CE662364CD510b3E3E686e675d1": "9441856316801775934", + "0x23534EE59D836607310A313Ce1193A65a6171874": "46331419966498771413", + "0x235eAD7B0E1Fe7FE69b17239D42C73e2BD3208C8": "25592945127263115526", + "0x236b785b23a3d3859C2E1D29c0e3929D9866dBdc": "1466485258515693", + "0x2389d2C02f9809567f56F3681cd226F756e35DF0": "19572584914733837540", + "0x238EaF2a59e41C49b956878D61F0659ee1f7446D": "1367869221823545906969", + "0x23936515d9E5e667F336aE08A34156cCbD8983c4": "5659817889484601310", + "0x239909273E9283603957fC62C4FEa578Bbd6337E": "9542814186092690997", + "0x23B7F1aF621377D5745cD610613984828122Fc2D": "35924161923810962673", + "0x23EeE7C7De283ccD54489e76B03945E973599947": "20245959745798242685", + "0x23F1045cA09E9c3206851336a2a05d35bBC812d3": "20486534952707143399", + "0x23eA99F65a44f38D2C97C3Bbb29b47C3C76A1F70": "10561257747604355073", + "0x23fff5E4375A68a99b8509302a484586988814Ee": "15904707117888922524", + "0x2401bD5b0A25f99eEE0691c59f39a37B26E4Fa9A": "11319572391509785153", + "0x24064808CE69CaE1491dd7b49A884952f8dca27b": "5095897320134963645", + "0x242260fC106F99d52553b4dD92db62247F86d948": "13294461531881700856", + "0x24584671AfdC6c4661D606DA0d2A58a0E86270f1": "48848536514486558774", + "0x2470C2D7A549d872f4D2b796C8cd49A5450458B2": "532322647029644455013", + "0x2480bd6e5EB3e943E19538e01e7C0Bc73411Fb62": "440469049720119151", + "0x2499B14Bf730777eDc615BEB621394e2ef57600d": "2226974278186456538", + "0x24B2D11cE96fa7eBa69893e3b65aCE625aB52e2d": "285818662121946611711", + "0x24EaB9b366527556F8dA10176E274cEc0353A8b8": "20186422087406451612", + "0x24F700BBa64905C97dD9F1cAc3DAcA8BA81f0285": "5871503896891342215", + "0x24F84bd39d4092f4c5e449ddF5f1d913210c5691": "1150172569446284549859", + "0x24FA431e0276Eb6b1F70C64590ea28840100C9F1": "56015650196388144617", + "0x24a36710e0BB2D22944A4F72F293848193ad2E88": "58108460581436084708", + "0x24b3BcAda9c1813559A9aF487AAd8212D563DF8d": "819326213719019285732", + "0x250377eB09BeD161DC20572153CdDbAa9e8fbA1E": "53897190671462809096", + "0x25133211D5569350D9CE80288965B3a7a74b132b": "9261449823031845473", + "0x251F91e6036B26C970F8B786c7a98b872527Efe7": "746983885818209", + "0x251c19dac559fD9A6E42860aCC8B376aAfA91b4a": "2868359267313934701", + "0x25217b4A6138350350A2ce1f97A6B0111bbFdB56": "2078525362686211932", + "0x2522c822d1b72CBd27827216eF5C65aD799B6212": "23931637482043514180", + "0x2527cF5f0cBf7E5e28888bc3a1e6B5E522f842DA": "784824879419109", + "0x2537222a45717e8A80BBd96704DcA18b4dC8BAb4": "495770519685694611", + "0x256A431F0cB1d282B3c52Dd6760B7Ce4983D2fF7": "9039059677587004945", + "0x2590cd551F58c7BB11A38fA96F5Ba3B7f9badaFC": "293515972574375566514", + "0x259A2816B5c2B3355141F44F5b9B16Df66Ca3deB": "13182013025354897648", + "0x25A52cD99bdf9A82cF6C6b284C91F579c70c9945": "16388635124243926056", + "0x25aFa567503939E17F26Ec60C180B4Fbf5074016": "16954905735986040526", + "0x25dDaB22AaA7889F0872077265c7374EEA9B738a": "13237950791652695731", + "0x25f105A10C67d00087C52350a921687d3afa3Bbd": "36773038063265746627", + "0x25fCFD73eE4Ca9E68c9E36952031761C1B8AB3b9": "7886282179732673852", + "0x2620298951c1Cd8566f9C16A291391d5a7dE8d0D": "12942161858668432843", + "0x264252E126f811028227771AF3B1aa56779C2c1E": "24716174468148997454", + "0x2644d2755d6E6a8FA8E1A0eDD388bcD05cC42588": "2635370331141427", + "0x2648e99BC8eBf9164cFF4b0432D0522618E65241": "39752797176730118144", + "0x265EaF30D2403E0e3Caf15a7CBF087CD624E9d61": "9014696031101024108", + "0x268dDc9A79f139B72ca3EecCcE3DA76671DCBD48": "10774259672911431928", + "0x26938DFD4f89f9450A5402688A4cb1Ba88E09d29": "44916047192281328740", + "0x26DC7680eeDf5FF8C7F273eA898e29362612a3Bb": "193784123842085534855", + "0x2704eCfaBcF3ca07B10F151bB4A05e602d8221a1": "30189631576099432586", + "0x2721D28690ACe1045FaBe0A662e2a0f9951eC4eA": "41203583153822909346", + "0x2730BBb1a1dC9061a1c689Bf89280c7Ce89d5D9F": "70240098056096791023", + "0x2731c3d6F8B5aC9B643075191125cC78a8CdcE79": "463778333214592323", + "0x2734095379244c08FCb305Ddc412C069E619a3c5": "8336471016446772059", + "0x273861eA10Ef9839819Ad4e6289E361c2076F8b5": "1300159367123827508", + "0x274776b33F87d97B7aD9dB819fd15a3838Cf2611": "15408502276100107235", + "0x27713B555cfCB9D29d211d40Ed083De40e164185": "58718898036541283822202", + "0x277C51669E3492430779a0D52eDF07D33356Cfde": "13021880303260128892", + "0x277CE7CE319e8aA7DB17d5784F5b24D36579Bbf7": "11537314873442551221", + "0x27849ba48c6f979e634F501FA1EA21998262fdBE": "56465007208351", + "0x278a8453ECf2f477a5Ab3Cd9b0Ea410b7B2C4182": "285043363486016338", + "0x27A0C474dBA527f7f9dE69347Fd48710CbCb8dF9": "31341652744887469357", + "0x27B61baE54b622540289B90b35f4bcdc34f081d7": "54835930162260244383", + "0x27C115F0d823973743A5046139806AdcE5e9cfd5": "14986106079424721403", + "0x27Cc4d6bc95b55a3a981BF1F1c7261CDa7bB0931": "10307193855541082361423033", + "0x27F553CFfD607cCc2348d7b077e62eEa0eEFcc7f": "27120804504503508114", + "0x27F93E11CA65dBc599993C0e66459C2089C80123": "23397943925502740046", + "0x27b1c35bFaF2594F2ACB1011C81FFf9F978f3AD2": "72183402592421654516", + "0x27c72e4BD23C910218d8f06C4a1742E06657c874": "32460337431885136580", + "0x27e74339E2383970E200964692F0143797125a63": "8168959406332557070", + "0x2833A914667B4f535Bff494Ef4a5B04dff7F47C8": "21759235738941187897", + "0x2840220771A89bF1b8B3e480e3dFF548aF056080": "3194571063409258548", + "0x284e540c527498d5fa5C48Bc852155b0e3ba042d": "34172270944859378883", + "0x2854F64c1Ba6D303AC4c503c783d90f22220A997": "13966313041622047971", + "0x285ce8250BDA19425cafe86297Ed5A08bAc5d8e3": "1146818240344586001539", + "0x2865DE39e4D05C47FDa9C2acC0fA1E7A973e88Fd": "32661023359975329148", + "0x2875403e0D69641CF631f10E48E63C40E4b27Fc3": "301996286032312479", + "0x2878e6aE858CC26613E997BB35C4F3bcBF3432F5": "39271661970021395443", + "0x288379D5e4989E2a9a5b449816D085C0Cde5c961": "9590590394378867363", + "0x288B495Abd83656ba6EEF2D689D7a085a5A9FdC2": "1920209388736404223878", + "0x2896Dc967F3376E4605F4d5563bB0BC2E5Da96aA": "778317607106965572", + "0x289764709F4F3F87B7b17d22252d138989199C15": "18183943624997893156", + "0x289C1A136EEAB35fb96fd1a5823Ee350EE15Cd55": "31148809171191269513", + "0x28A5eC068ae7500cbf21B989D62C7a81e2665B18": "270467360710778562795029", + "0x28Be87b72eA9e245FC23981f50e4c231A3467E29": "127117150049652721713", + "0x28EFbbD0A97aEBea6E1Db33353b43679eb2e9f18": "6932218656794185456", + "0x28Ea4a0e9899bdce3ae67d7aAd4792f9f0780eFB": "50715201493898890207162", + "0x28Fec67235Bd0832e3FDa2BCc46f24c79AF92D21": "1594354408330168791", + "0x28a5C61E67af79C8b7F7366952eD0bdbF2131747": "10578745882298035876", + "0x28c2AfD1Ae2B3b1bD8673c944284fdAc781F01bb": "11377070777242816841", + "0x2930354594AD58066049EB033BAaec1878dc215B": "3489495960427819", + "0x2934AD40d86424172570b01f188039fCe309f42A": "16812175421133704148", + "0x2951B1F7058bd2C05F01954002C450BaC0873847": "7205853142197557520", + "0x29554de3a81E263430837319517D1da88FbfD902": "25368789890658209012", + "0x295765b9e8a0aC2530823F728cfa6FBD5B287ba7": "2616357430547020977", + "0x2961b02DcE896D5A63B57997A1ae124736dE2cF1": "14215067395983084163", + "0x2969fD8C49D15b596AfAFC0618df3041f654dc80": "219158849105773105", + "0x297a63B59F768d2b7F29a2C931e08460009bF453": "27701447185938445846", + "0x299eddf2F97c93B8A3C82911161F7369CD36a53f": "11855772409952628325", + "0x29d6B8259a9efF7d8f4017f059552944C770Ca1a": "2657659339121574168", + "0x29eF0Ca00be75728247549880eE9c51DDBe39801": "6881426549356083842", + "0x2A396aACEacA357071De41ba9821F74EdEf42664": "7183719112390891995", + "0x2A529ef7cA745335D2C17DE65F590EecbadCa152": "46858170082569092799726", + "0x2A58eAE46D0868C179dc3F3E6d732016926A97F6": "1141667529668465979", + "0x2A8E4dae06C0FfC8D2Cf9ba90B4c2Ea063925c8F": "13043988704587158853", + "0x2AE11EdADc3CA11CBEb077696A0Ea40E425acEdE": "25128610858005398452", + "0x2Af359Be7DaFD46e7Bf37Bf559BA97fc3d80Bdda": "8656046623892915948", + "0x2AfbEEc53030c45Cc36C4ACFc4ce2b5Ebe2d36ED": "21736137434631515433", + "0x2B6b0E6f66c4ae4C3ECe4A740145C71aBD69Bf2c": "19156224541767313430", + "0x2B8a2dABC877535efa6b1C010a943f4487123b05": "25555966154304438233", + "0x2BA7465a345730888bDFddFBD58Cc8d4B1a0180a": "20846023920424169720", + "0x2BAb814da5c1618815998F3e929ed11c24d7da38": "10112793743658190323", + "0x2BBFf66127A9f333C7bcc2B260A8549F4dd0Fe05": "8862880148440918478", + "0x2BC0c16caB60db78a580B7Ef2c840929e2995c83": "30932071982077503921", + "0x2Bd54BC94086999fC02918962ABdc5657A378Ba3": "5676553857123728988", + "0x2BeC3BB0E97206B683A06d420C17F2071C204953": "12946600427428672944", + "0x2C03C76932f9760214138100C193702A4d43079b": "183999408352478943368", + "0x2C0a5Ed29d463f6c6180fF4DAdAb248158b6DA5B": "215444772437883980", + "0x2C28B0F28213283293917275bd0999783C94FB56": "30788470489519143891", + "0x2C2D9FA040bDb179e256B41e6e8619Dc324bA3Cd": "610442437990389759307", + "0x2C3dd65e94f97B2A25239EDDFfD2e192c08769B8": "78566886414077144236", + "0x2C4B47668eA298EF4eF98956774Ea590E130ceFA": "246899159707557035863989", + "0x2CB18953434923af99f10ca7A960dD385E72f6b1": "2217839752148637110", + "0x2CcF7f1a8c597780344C58891894F73070F72ffA": "21255634742316192657", + "0x2D5dF49F5E524A0F822dc359Ae45C836Fce74263": "27971925730363976489", + "0x2D667B5e3eE12584b912221D47dd81CAeB2D05fd": "7091491954171022467", + "0x2D7EC74022d5C13caDF3C5A94c7dFb90624e135F": "399532818706910552", + "0x2D843eE07C3d99DbEd6b31e003738D3C41e87067": "6064941937339648372", + "0x2D9F9f7862a8E435D890f487A01Ea15eCEB6c6ef": "10523662351468913547", + "0x2DCAf803bE9e54cC7D77BF5176bB0B24D06F25ba": "12554420526879715700", + "0x2Db366Efe32C41d1Aef0fC67829a64f1F27f8BFF": "4059864754968124246", + "0x2Debdf4427CcBcfDbC7f29D63964499a0ec184F6": "111892881674209109166", + "0x2E21fC16d694FE5a951d55A97FdC40aAC8F4BFFb": "10373981442098143839", + "0x2E62174c79b893B4cFd12b9a3f9C1cCA463297C5": "133944227576896262257", + "0x2E8600733906A3057Cf20d99F63b5f161Af3A7d1": "13392008080489168379", + "0x2E8f7BEA00b268cC7E5ed708946ac1254A0B03df": "7304616479902778622", + "0x2E94252614ecCE59F18b041e5172B64B6D1BA0f0": "14004999555334570222", + "0x2EDF31423c9c678A23b905FBfAcEc6be16f1b88b": "7884329284555487908", + "0x2EF0782745B9890c2D1047cBd33bE98e22ec35a2": "517643917032874491", + "0x2EF8132f95a549870271905850A0b26bF06Bd5C4": "28545065775679014848", + "0x2F6102a60813aF809C8dA5f46Ceb1D022dd718f2": "5802186335170422605", + "0x2F6Cb6b5879638dA5761b859482525984263a9E7": "7448376947206811394", + "0x2F731eCdA0dD1Fe031C20b3DaF2f91ad2779dd1a": "6554485072375693363", + "0x2F823FEc781fb59cEf02c0a440E949656C8d256D": "6228461112583962968", + "0x2FCEfe620DE1080A711f123B9DB3027CC743DF66": "11952882063132398637", + "0x2FEb19D5954440A0396c844B58F6c51c1Cc73dA4": "5016409851022346262", + "0x2Fb0e09F4f1515eea040EC6D791BB5c97F0abDc6": "8059199684234257959", + "0x2a50efcAE54adef2f42D2c27eB3b256273AD2C83": "341914956594574668", + "0x2a534e0186D3Ba764Bd28C612a9c8079134F2C36": "23797204142134506274", + "0x2a668120925FdB9694FD48C06C2B00f784504F8B": "7443062870714900986", + "0x2a6d25BE9107320A122831E8805b3bAC24b36f0E": "30777993682774012301", + "0x2a725E163Eb00dD6b79bF67661d31a4b8514b78C": "43854115780290048627", + "0x2a7934a99Bf3A31150df32B86f8C2bB5297D8808": "16690833683832903811", + "0x2a8cE51e7C0A1eE60E20Bd859ecd07FD2530a3F3": "3094159320813999551", + "0x2a9C430831e51610ce84177bc3F69060C6221b2F": "10864290053878861137", + "0x2aB2a40F97832450e2D2f9EcA1d194673a29fB15": "39182115860060968286", + "0x2aCFd4D5EBbC9803Ee5B6BA190BA41B8b3e6A29d": "10782979603195672155", + "0x2ac05d5eAeAFef9f405B1c62111030D221Cfc125": "12883277585367356244", + "0x2af02d75d55Dfaf44409Ce85E61478B39A966E8A": "19322189367486543935", + "0x2b6091da312A3591DF6a94b24dD3c34d2B01Ca22": "6429411877327484640", + "0x2b69332901950D0C5B9BD93e04f63FD771Fd8622": "12999575332067121839", + "0x2b8CE91555f32562a40Eb74f330C757E883fa259": "5631071627484884218", + "0x2bEb104e39afe8336BAa6710e7069DD2a18B8A5d": "10259416328481992466", + "0x2bedDF5e0Cc3E8f85Af8c42617654A15b8b026E4": "130262123093202791", + "0x2c06DB750b9833F4022F028e8067A57107A4414c": "10546933138981602745", + "0x2c0bd8fA3Ba000b09173Ccc7f8bcE6874f650913": "38183305161490827974", + "0x2c7673d7F1C5B1E79D31D7730eaeadE5535D3e5c": "6810014755838605775", + "0x2c8c3E8A89E1E605562EAA7D9C4B2348c9CC3333": "59515781792865701664", + "0x2cF1dAe5e529f3025d5d0036D59dA06a024fB706": "9215764709495589824", + "0x2cF9a097C3187718c11eDD975a3dd23B441cCed1": "148923686027998902321", + "0x2cc60e5d0C2c193b004c356E87Ec90e6fb199f90": "20459311438625134687", + "0x2d03E362c60dcc2bd87BD6E0019F3D748A0A660f": "12886319584762045629", + "0x2d28AAd12157042b1C209bD9646c950e192ECC13": "27331077621715926266", + "0x2d481C39E28c71915feE81854D1C95cBcf5a5d74": "234445927761351160", + "0x2d72A1a080DeE2cf74062c1583E0bA9e220eBe81": "7522731818951357110", + "0x2d731a52401aa9BD86f1dc63774E5bbEffB7674c": "443326498342483931", + "0x2dA14D486aE663347e2e69a0189c0aE36248F681": "9637830383195297080", + "0x2dDDe566fe4d26B2BaB562f5756922f388A28D92": "719769031304807955", + "0x2e1d27C25214890C5C651963675d89Fe1025e33F": "636108455663548607", + "0x2e2aD60FB7d47709972a25f7791E982Bbe7056D8": "33705229679844307279", + "0x2eA4EE897805cE13a0090F060809D91525f08647": "6348433112385259870", + "0x2eDdb8C5a02Ecad5a0bEaC19f6f8008c603c0e15": "5546161780104548485", + "0x2ed393Dd537Bf9d60D7bB98C67811be135a5f045": "14166016824078484796", + "0x2f03E6f9d21029E926f7685C611d8ce087c3e600": "14986370543907484517", + "0x2f64FF324BBf8e724405B75D048605A8e33ea82f": "3332020816459948011", + "0x2f9864C9bfa19c1bCe217cD294EEc17815103568": "121713702902779743479", + "0x30176a0f484306a541c73f13Dc688D3c467351A0": "27084269865196220670", + "0x3025eD0c53eaaD84684A4A0e35734248660261Ec": "34303960024844039103", + "0x3026388b29Fe1DD76ce65897B1Fd4A9DCB2d9df6": "17471443425074649344", + "0x3026F93D804f01Fa212669FE8263Bf9a00B664ec": "15512556014148496020", + "0x30278a4bC54d7d7a753067312035D16E7af66038": "34586908915186143273", + "0x302E7EA58Bcb5f13C0EAF7ce3675B4Fa5C7cb1bC": "14614086622127014905", + "0x3036fB1D762A6854637f0cebb453fa9fc80326cE": "645681627405073233", + "0x3055c765b47e66dF9d884BcCA4eC31E8fF54bC47": "760714319801201426", + "0x305938C5C6ABB6440f1402cc7488b56fED153C0e": "403590505615881510", + "0x309a0b64913291931BcC09b242D4c4234A8d87e7": "7363360012246833325", + "0x309be18C3d1eA762E866428734C3aFD5a1d9da31": "33114020790097640691", + "0x30A52a4778df9880B2C70cf700c6fF1383BA4ee7": "27247137654894814411", + "0x30A9d632A08Ba9ee9a5694cfCab0B3C3d2ae229e": "689923459895636770599", + "0x30AeE7a692427143BA7e65eFb7db35D360a0ac51": "35759868465055989718", + "0x30bE4C2a35f7c7Ac68474D42FD1d8Fdb19520Ab7": "26465352325792255533", + "0x30c4E871807e765B2928def00A8dD1FCD83a0605": "13238602171139695260", + "0x30f4a02719CC8dcD7E383a0C79Ced4AB05195A35": "222729249928241448226", + "0x30fb3D62265D06714E36823D78E18e871f931669": "6922118742823899526", + "0x313bbB5Da55f6087f62DDa5329B5e466698C4D48": "4757425378466957634", + "0x318AA87FeBc5d4EB1AFa25B57002BB62a5Cd1852": "131923741998269416", + "0x31963B29de431dd1069582E346C0aA9eb65BC115": "1054700671325787026835", + "0x31979a5Ce57f173c80D4ce7fDcF120355109C413": "37468072492913659189", + "0x31ebd7dBB42a533325064da48e04E69B13bb93D6": "252921709084947370614", + "0x31ecB0819346Edd4Ac31E2C3aDACD6629e411A78": "8091194053588452343", + "0x31f856928a68320CAC35D439fecB52D1B98fdde3": "4524084553819625164", + "0x321cc5bd76ebA4186953Bb36f2AE30586e051F36": "21704794641763861060", + "0x323E5692152Cdf04d84eA8AeD57EC8A8CAf43e92": "25925706056143698111", + "0x3250F25C67d909B2bb4654Ff9248DeF64bDCDc7e": "345918686668432247106", + "0x3253dac62abF2513D508Ac2Fb65d1D1CA66dC315": "48045578821587161788", + "0x32768E62c32b741C88d350Ed575c8d677cB0CEa2": "14881072988082039133", + "0x32802a558795721Ca68AB913660e6b6bd62d8999": "6379546133283793010", + "0x328090B257165512fBA8cD07eD543383c82E841b": "24900662527581220150", + "0x328417c1dBb19FdA07A079f5046B6Cc9aaa2E2EF": "22453014968725671034", + "0x328809A567b87b6123462c3062e8438BBB75c1c5": "8896702143033958914", + "0x3291EadCe3a5779C37cD78D1eF8b6A25ab89685D": "68771636873478761635", + "0x3295ed83A39442460a3118d6e61D8424b47141Ba": "33203683148784501130", + "0x32A1874657673C8403059cb30880612aF7D2C9C6": "12730508657413221396", + "0x32A1F43c198772C9529924d0EEeeAb521C535Ff1": "5020649496690029907", + "0x32F15512417160A2BcF2b188bc52759e710bb701": "13470753098557139780", + "0x32aaB07F005217965db029A15D08da9e66291Bc1": "97171900347534781528", + "0x32fa9A94b74032ea68905fCdDa9c9C6C6bb6c397": "628852981429882038", + "0x332094a2d5ce19E0793FA8ed33D3f49c660adC34": "5151006333471338236", + "0x3324614199ca2A60487d228A96b9c58AA54a83aF": "13424151869808293447", + "0x332Dfeb61B8c89251373f7D5E0c0CD369eb504Fd": "30384700882414686682", + "0x334bb83244eAd0116Ade5EA1a38F02acA1d3A4fE": "141386621205111181143", + "0x334f7fbbFf4349eb48be49EA50C097bb3317c21a": "43523338627617211583", + "0x337101dEF3EEb6F06e071EFE02216274507937Bb": "7188157332819852498", + "0x338158b504f95578d83C532956811F27bCFA439F": "36501978786567885766", + "0x338eC22c1d5Bd86DdB921fc0216b94bee32962cf": "19430111851180195850", + "0x33995E2CC296496e911d92a25E849E7116C32564": "21081432494452272185", + "0x339A07A9a611925738B59233606606AE34307B99": "34618225965448042519", + "0x339dD90e14Ec35D2F74Ffea7495c2FB0150AF2Ba": "945388836332788904", + "0x33FD6292873C26599dBd18c483981bBdEd99BD29": "25779554207175686968", + "0x33a19505Fed564aC8E24796E0e5149E814190Ce1": "8974227022654143654", + "0x33bB5c19c076a721FE6054Db6924178f1aca0DCE": "7669944831093393207", + "0x33cFE233d06a85CCC04a87f43e7e1c7101FD43E3": "117460596071459790", + "0x33d288C6f473cFC32a837e6717D276891Dd5C9fC": "12939481895294542715", + "0x33dC060c784E1C299FeE82Da2b2424F9850878F0": "12494541389617070459", + "0x33e20624b403E2a7a278FF17168F86729669976e": "21717731039174332049", + "0x3427915eB439c923b8632Cb19b9cCb81Fd3726e2": "1018360640455582152", + "0x34286671237067Db48A8A62C2874c9dCdaB6fAf2": "3174079875342837906", + "0x3470a4adC7CB7C352772Ef2422f13d4558C821CE": "15357896868056885131", + "0x348C760152550f49E3fD86f3f8476c612f984D27": "13415796092835261675", + "0x349A01774f22f51ffD46270b48F1FDC85ac9131f": "13500563208280556600917", + "0x34DD9B043a8C015BbE8b6603e61a200D9f4A5935": "4163503411322382855", + "0x34Efd00E3743c16eE56d61E1F9eA6C5f7c5B6026": "18211627024590707075", + "0x34a21aD452817eB12110EAB57B84759D64C41161": "7872701372633745256", + "0x34ad3Ed8d36aD274A4E81531fdA196961e82493A": "6136729339222788796", + "0x350792193B6133F06EBFfa5143EC05EEA3229375": "65522169929152909630", + "0x350fC942C045Cd29FFF6a8607799D975e3F5342c": "8159549563004854801", + "0x3546BD99767246C358ff1497f1580C8365b25AC8": "39662688476408868985", + "0x3554FDc62Bf4ec8a4CE60C1A0b7CAe6Bd8dcC2E5": "11921480190513239771", + "0x35788e0219Fa98761c2bd224e450B207F34D558D": "18793398936132930845", + "0x3589e42C14b4621ceDd622752D7eA753AB0033e3": "6636299560027573506674", + "0x358f918632Cce81E476662274a443662Cf19f303": "12898156765948761634", + "0x35E1E04B759df13BD39a851ec6EFd1ad1586973D": "22613867273505906919", + "0x35a55B0CAa6d9eA3d6E1e919E58971447E1f49d0": "3100361825201173021", + "0x35c0C06B0eE76E3C800B4605c047F18eb230A118": "12277279911328365658", + "0x35cc48C5e1953A08000a3Ce31f82531b70C0d9ff": "15157890392527057730", + "0x35eD941098B9727C0b1638be35dDa2E4d4C0771A": "4652707911174928256", + "0x36139061C6C93C9C5e5E0C584c3a5db7Dd6bC781": "48536182750870328133", + "0x361e4012eA411E449dB874cDc6CF165fB6459CB4": "288235650423560684", + "0x363509EF6D67f430bDFe3FcA4DA04Fb91D343cd5": "47182882240510853001", + "0x3642A3a9A7adec05Dce1967652d662A8A1b28712": "60513289869685546515", + "0x36479dEB36f8CF299A4Abbc7b9C739Cf17194684": "8078304546285924893", + "0x365F027f73d3d176619b2dd8ca0bDD7766BcF24D": "84280383359072791", + "0x3662704839A85Fc74793FEd6ADA412f156F1B87F": "14292484793377668884", + "0x36791c410e271d381B0957dAc16C667D3c467a83": "4806383285584767632", + "0x368d2789972A8e046FDc86668038e5b1ffc07019": "56341252023333094587", + "0x369BB02409A711E1971f09fEf41A093Ba8536ECb": "22529975227763649550", + "0x36B0440e2106edc46b632722C531b6f6D5d4FC6d": "17454967314281128569", + "0x36DE7aE0C7a596bA2da2dd15A00cC1E385deB49d": "26765570857418305740", + "0x36Da87016D452105F975bF02F76eC4fDFEFD40C0": "6633893551943227955", + "0x37086939C56D4d14a120EC7c4dE0258e6b72B218": "281149592247933783999", + "0x371484e342E96eF54CAa6Ee1344081eF025E2B9F": "68523257946975860", + "0x3716D86606C0098415271164FC362E8520bB2042": "18322043673299568841", + "0x37247F2d5718c5717044dfA8eaE30ae1e97A523D": "15430948671504633864", + "0x3728654646dcfDd6a42A390d3CE70cF55fe93c83": "14663603587237273555", + "0x373C8E5829Aaf5279dA459Bb687B8BdDdF9906e2": "1195912931875691523486", + "0x373D35DD3cf75cf828BE9bb8C45F920D82FF682b": "41850855670364148598", + "0x37485EA1fEDefCf1fA6bc2205F4657A17dB167a4": "50220538844025899784", + "0x375F6A70829D1672170FD66d34Ebf7D59B276A30": "19585919956631819566", + "0x37697E9794200251aA531bC1448cEa1C6C37f93E": "10083392188401303482", + "0x376Ad37a9B3F0C7DCf4cf73a02d7E03558da0385": "12321816167165499869", + "0x37834333483C803FD8E91725cD589860DD264997": "24651923733794160091", + "0x3798beEd6E54eD3434f2E1449461f1881E74d4C7": "36160862900010316498", + "0x3799C2B6aD6998735323c11e46D3Ae63ECf4aC01": "24702483102701789", + "0x37Eabca712d27fd3D3aA608Fa5537c41eF21be98": "7102464169466292975", + "0x37F710E60AbdFd1C0E905c61a49dbCfBE5128329": "174941998383283225", + "0x37Fa7c6B28fc5545d9523D6dbb329Be7e1B9e7A0": "20849868491554258815", + "0x37c8062F7F38fa699Bc2FaE574E30bfEb1f57262": "13466249910304721748", + "0x380695b18f8d57D4b7ae3a819e4cFbD7DE176FaE": "206670616242248722167", + "0x381758cbe8E8DC8376f0027A28E6E447208b4450": "6341955475724236526", + "0x382E128Ec24E4d2864C721DC0cBE8052D9eb0122": "17514020496686851598", + "0x3830a90fAB5E01fa168c1784e79c9A40A90BCb21": "2121425248642522591799", + "0x38407376Bc9E65762a2bdf081cCd1048f923cEB0": "31842014383116006308", + "0x3875B434b0Fdb5AB42e4dF1cACa93cd41c8dF0d4": "11735398650276305462", + "0x38832Fb6FDC82E148Ac99A0e6A82e0071B0CcEB7": "21367400093514815542", + "0x388497c7f682C64Cb8eB813d5954658BcA39D766": "5599517279702307620729", + "0x38a30C34d8b82b660AE0b4d4035DC1Ad5BEB018b": "239086411354920409148", + "0x38ab17c5b796F15305EC81fF7eF2A0b00d796d1D": "15760281312013841575", + "0x38e7d5c60E97452605918695A43FB26bDBE6a263": "11749642809746178309", + "0x39132C7F68616FFd34dba3CACFD1635f3B64DDF6": "4267451331864024847", + "0x391c76c8A62396b800641C67AF55791cf7572a17": "6907270307835919605", + "0x3939e6cD90773C54c7EEd4A222863e42028A4e27": "27690457585276092507", + "0x394070A6D1cB8E1848321cF20b7b7A640D39A5FC": "10769459173671608616", + "0x39411FB528A6a8415842b950423048119c388a06": "33886630978186128603", + "0x39522e1292B67595B566fF3c4bCf661bF6c2436D": "7997822841303278819", + "0x395c21e566FBca61074fA0304C21C5729FF4D5FB": "5267761838180216590", + "0x39607a3bB92c5Be4A324Bc8eCc68166A570e8501": "18079599022008750402", + "0x3985f46E0c518f5De26938c073280e6b37307054": "102297058241060352", + "0x3993996B09949BBA655d98C02c87EA6ABf553630": "25629536519389165275", + "0x39977d3BB9611f207776aB13Befe643cd6f14bfF": "4325351754831919423", + "0x399a4e12dFC9FfE2E605374E91eF58dDD143FB7A": "21097566455443791319", + "0x39B96D10bAbC8E79dDbE245E436f77a0FC590905": "18251517983932550696", + "0x39F5DE15Ea547a98aa0FeFa0Ae231268c24F403f": "34154901159008823107", + "0x39b0F0a335566D07D793626aCedbf39c9F2E70D6": "10000320864765612705", + "0x39c231bc7CD7998BA640926Bb8dB23da7d53Bcae": "14795791548761026057", + "0x39ea2f6C8285CE053ebA5752A965D58a122Ba8Ef": "81898757732694579910", + "0x3A0E9687e87EeCaB45c339348f2fa9D5BAe33CB4": "12037891673451171162", + "0x3A93F6830f76B62aB9182B97f702e61d04bF7600": "20255222494475268865", + "0x3ADC4C907B591d351ae9a6dB6c9120033a6FCC15": "6480072203147811507", + "0x3ADf354b8DcBD613DAD6C918B0f1D8Ce1b944535": "15536337451426906400", + "0x3Ae5E6d599231eD4741De91554ea5f98696B6210": "92348519827070171", + "0x3B55031d7272324AdE1960DCBB916AD6fbbE6CA4": "23502619658691172306", + "0x3B78Bf326Cd36f22e5a478401fb4d112caAea9b8": "16328902292138941576", + "0x3B9e51B0736C579d71C6B2E2267ed734D405a074": "115388151142158669", + "0x3BEB2D391e8a06b28C6189247C53172F1Ff1f732": "23968461456244620582", + "0x3BEc928CcE3F397a0FcfCba8AD3BfdC8cbe0544A": "34656862150837319", + "0x3C05Abe5b05Cb5869f39F8E8EDf14968309A0F47": "11929850513994427359", + "0x3C0AC84424eC73B65fFb5Ec58034d5c8d7E50024": "147569213192206952308", + "0x3C0Bd1da40D9e4cD911694D725370154ca5F690E": "253960591985164362947", + "0x3C321C6c15A375a30CD3eF477FBe987e707Eb8Fc": "17959031185194949316477", + "0x3C5CFA01F586cfC34b4aAADE419056FCc2D24D7e": "5878769714667697613", + "0x3C7625d2236eD6997D2bFaCC1fb36a09ad3A1d59": "59815435649177821286", + "0x3CBa3df09B62025d76c433aAd7c3684CEd0e59f1": "3622904316844495297", + "0x3Cb46B2B45eB8f1B316B013C6cB8Ad6693DE1194": "36465269736377122049", + "0x3Cf3BdF3e523DF5a44B7A4d485c4D5780FcBBD3f": "36052346762365144462", + "0x3D05E4130Efd171225D5081EECCfa8B1d6d4b647": "45035114531772129896", + "0x3D5E111Cdfd8425E256915DFc0118a1c9DE5D0B5": "20994179535119040873", + "0x3D6D300AB053cBb126ee1AbbeE298FFe77260e35": "1319079636117846230906", + "0x3D7FAB5EcBa07D933567cb9DE777c7DBac872867": "25855258219301756196", + "0x3D8250Ac679dcfd1E90c29E7a64AB5013645E579": "59820490366502178", + "0x3DC736B84d5bB66Bccdc07bB1534A9CbEC10b9FA": "8034313027744401902", + "0x3Db11bCD4D9d8eA3896Ef298b4EFB848BcBc39ad": "21444489661219095698", + "0x3Df9e23C1e069702D86736BE5C2f425b9e528835": "4166205994182962676", + "0x3DfFc513Bd4B61D6A0EA69B566b1a4D55fCfA539": "15392584315615927639", + "0x3E318080759257d7Ed9C1beCCE6156Bfe0d2d4ec": "46685645198223", + "0x3E81591249A51b1eC69D92455441b0CDb3f8881B": "180981137381613569907", + "0x3ECE3e2B1DeA3e1FE3cD0df2cD4E6FEe32A3B69d": "39206831496053723419", + "0x3EcBAd0FFe88236804732FA317353703603B81c5": "107806677017655190344", + "0x3Ee3d0cceF50bc9a6Ac43e763180C0c870fd2787": "23841264177514915398", + "0x3F178a843942E34d242067934004B7aeed954CB6": "379638894960326551", + "0x3F3646528EfcD96849823EC0652ad7e4C1Fff812": "22097149858480905288", + "0x3F438c3339757A27df6680a506D5CD14Ba81CC65": "24882281240608764808", + "0x3F72A7B3c7abdD39b8b142A7fD233FceB844e765": "46589489725724830304", + "0x3F7A4968FA9992D77af365eb34918e6C0b8a4240": "84469371782962276992183", + "0x3F7aA1a6aF4Bc3Ac327dc2130D4e8F1fF5Aa32c2": "207717757802497456943", + "0x3F86f18322a888d9b3adef38f127c941bCcc014D": "37977042348046332283", + "0x3FB811143B93079658e5663eC4E2b129cee7Bc39": "50762841764761858012", + "0x3FB92bdCDC26780F52CDA5b505DE2F84fEE4fEba": "23658798798589411238", + "0x3FEa4750421C61253bf98948718CBd24F6a2a253": "47013491250011841157", + "0x3FF6517C30BD615d0A3c51EF2460F1886625C900": "3088855459054559453", + "0x3a31d9d9120013A2f1F55Ce45068Ed9Ce4795e9F": "24398346092888269848", + "0x3a382847614AC253B892070785474fC3BAE725A6": "3441991318742519037", + "0x3a58A4532f8433b20D3CD07da6a6A7146cb1EDc4": "3445049081838747735", + "0x3a6EDb5107E04278A4d63a122F8Ab35BcB39628c": "21333616719714415307", + "0x3aD921041F2B53Ab819E6C87a7f186f1B7B4D0AC": "44843142162665357806", + "0x3aEF3Ab2bDf88439586DCA812F9627a88C363989": "14535143072996476672096", + "0x3ad5E8A55A6479B4783F9b7eEbC9e22eCF2e7b17": "7315320280309887193", + "0x3adf2869B57Ef6404F617Aa55411DAB102F9Bed5": "16023453703049153541", + "0x3afd6dE682Bff496224f0552739fE45f3340142f": "93070454519788633666", + "0x3b3b3F2F40C7777C91e66d8EaA635d4901f8FcFc": "275054294350598865941", + "0x3b63294873689f11A7CD0E03d474031BFa81ab32": "3616908263801577373428", + "0x3b8c6E94804d23e5574e4fb2f4b72D19Fa707056": "5632454671113727942", + "0x3b9C83a9c1D1C9eE84D5a24349F60f21a8aF19da": "8827344057861626799", + "0x3bF5611dC6fF73b4b285e73600595490D10C2Ba2": "68949175695760937", + "0x3bb120273dD3AaA87878C5a0F94B4De10F5EE626": "8696176756888757737", + "0x3be6e182e07169A145eB2aCbfD8E3Ed7086F6160": "6800437200044552739", + "0x3c366b508Cf25c182D121C4DedC834a25cC0c65b": "5125713310142563651", + "0x3c3C247d6687fC7920A14a2cb299CDbC8713C95b": "14234626931979421505", + "0x3c454296Cc7decE85452C969e105eCCdf00A611B": "8489756117668202242", + "0x3c495A69FF82E36A6479F4Af470F6389676d0b9f": "248251998913092478952", + "0x3cB8Ef313491B4C7795A698e6e623c49acb6b021": "448495722528849381", + "0x3cD8Af84b79763E4D5e5daC385f91e7961F553F1": "12042356720810227296", + "0x3cE5E11F6Ef92e4D6E11727a04D1dC2DdDe9B62F": "27955767781505292859", + "0x3cc04f1d229fD07d4643684320360aE23C6c4253": "14510746004072159671", + "0x3d55023C1eCa7Adc2fd549273f22E4423BeA7f18": "8940330940727589711", + "0x3d5Dd780298475B37309Ce0F35611F0E0a44b408": "9053921119254848645", + "0x3d62F25e2497Bac899bC2E3b7209f3aC6d94802E": "19931813480294631265", + "0x3d73ca37Ca20A288EaB1616d24e23998374a60C4": "2631024910007562641893", + "0x3d830d759cAD45eA153Bd6d2d0151b03ec5DbE69": "11697164665518911875", + "0x3daCc6E692F2eB2ff25471E9819811a761cb82e9": "8598490473204386376", + "0x3db591cf02fF17E813CEFb373b29090a076c797A": "25667017997092509290", + "0x3dc1Ac6276bB78827bF9c814B39396d2b729ba17": "24081985889065952903", + "0x3e0cf03f718520F30300266dcF4DB50bA12d3331": "44143563871815210541", + "0x3e214264b9Ec23311a383B8CefD40eB5ef83A8eD": "8248730096920048275", + "0x3e392Ed40012B06F0784086C275B4d3427cfcA8f": "21153844829893731319", + "0x3e3cC1729D996a4A98E7F34Dc7A7512C78aa4d74": "2629985221700090809038", + "0x3e48a03D12feEabbe2890f980919dd09523244c9": "6163096944639032903", + "0x3e8197E8AEC0178623F44C35c697CC5275F24977": "19611524089127630092", + "0x3eA4E9d60c02E6C4687a24223eB7Df87c42204AB": "18055305925845345343", + "0x3eC9e5b79091eeba91a1E167421FfE87812E3487": "4453330016693708479", + "0x3eF480b60531654D91E5F92D002d97c2c9584d4E": "9527629926865846433", + "0x3ee2D2A2D4bDAe79406d73b4A7dB9DA3b7B522A9": "16662837911138241526", + "0x3f04a5A984406312B455D8c8a27B0a74F6de7Ae1": "1673615214265763713", + "0x3f170496f84c11668e00c572F391DFC5Fbcd1db9": "13795989146861306", + "0x3f204F8a3b5557b3C0e8F05b1335c68EcBCecEEc": "1166491043488573811", + "0x3f219C755b411e270A8d3A587Ca8852650167AAA": "12640139350605214851", + "0x3f5990eb8d85BB36D20308C1Ea016632C6b028Fa": "37561795954095868937", + "0x3f769C3666342F642B0fB3De045eA57b2709cc6b": "221596832635663981", + "0x3fa6A04037c84d21CA3caAe4B996507fa13C0d10": "11141867618781499547", + "0x3faBA029341e85973Bc36Fec0810b78220E0BbbB": "21929197538349163543", + "0x3fd2EBB12047aE4bF4A5C2E20a67Cf54963cE915": "234309357388204740486", + "0x3ff338f321A774221992b89C6fD7acE47246a60F": "3465686215083732", + "0x40097b0b30652e1308A046944BfDd06bbA65A900": "11278056643251536761850", + "0x40131508375D5f0D6A6426A79fb5297aD7757079": "10867195554486135551", + "0x4014a54b8BbF39b6954ef2969AAC36D4CD86da86": "11988566592491361809", + "0x40223aEB96355c3160F654A343a2ac1757331e8A": "11825812736465397967", + "0x40276bA5EfDFBBf749557f6B2A094ABd78197164": "254357596426480244", + "0x4034FE1815220A6a43D37AFCa02B180609137a26": "428851096370195069", + "0x408Cf2972C416AD18083C76DaC2c30584745Cdb9": "23698813642109005619", + "0x409357CF3c13951F8DAC11F8833F92421a4Eb407": "11033938825834989436", + "0x4093eED436bd6A5320316af7De30059a58f70c4c": "7740727375495782485", + "0x40B72dA672B3eCc3E58ca75Ed3b7736bFb4bAb6d": "13039077280801480317", + "0x40E318616E5A84F7baF5CA5e1fBAD917e86F4beA": "31007893658737435759", + "0x40F476eF251F6E97112B5E964149128ae8bB2578": "4373738018387286162", + "0x40Fd0DBCfA9134334F2A7640a109fDfCec275c29": "18400855760538856079", + "0x40cf5AbEEBaDeD527d751d829f82214Aff60eEcD": "50588109964045065256", + "0x40d28C55969Da89E53A093F27B0636b1A11bDE7C": "35662371974210018973", + "0x40fE788468A65281ffEcF36a73bb5433304fD4cD": "45963988363208161470922", + "0x41044cE704bB94f4F4485aCDA0a45C7ca8c6C68f": "207978389157666389", + "0x4114a50Fba9C166454798A5b1ac1Ac2974A8eD65": "9010008427767005453", + "0x4125533e8c48385320069793C463Dc554C77A398": "15160738980124354893350", + "0x412f10AAd96fD78da6736387e2C84931Ac20313f": "2629218743786359254", + "0x41304f0735Ba141Fc16Fc96c5457C7e7D3ecB8e5": "11853055580039361988", + "0x4139D60D1E014883cF13FC75514CA1d9600564A8": "5249341540296059398", + "0x413D80Bf4EDC28e9781e6c79cbb2D5085CB03A99": "2334793539015970138", + "0x413f39e0EDab05128E5A0F037c89aD846eF75Ca5": "1400405901390662317", + "0x4147D2b162572468c298fb13d7A98Ccae5Ce3200": "9332713819300813362", + "0x416a60ac6b05f7cE6f8F1AFFBd6C66A71Cc200bF": "515753095705693514", + "0x41847aeC46D0a86A7e6C460cB0Feb3c6b6287ba9": "18875375294092386661", + "0x418B5d44c42C1BE3bd631Bf3A30F2B86b580a5dd": "318995290936322183664", + "0x4194cE73AC3FBBeCE8fFa878c2B5A8C90333E724": "20099623674055591704", + "0x41AA62ff4f26074C2080e79645BbF4D745404ED7": "29483676748810497895", + "0x41E5372f4C024201783005dE6dC8C7CED22Dc50c": "25772520242130221053", + "0x41F219C81722f3D2244F6f381E725E1f4875E796": "321268784997821576", + "0x41ca99b7a5f95f49c2b0861a8623c9f46293e09c": "7339886687570888", + "0x421000E3f0F8114F2a2c84dbA3F576bEE77A9328": "82172606619382726117", + "0x421cEc23e1936ddf5ED6e1de7c9E102223E59012": "27361045602060338380", + "0x422316ADEb0cF8a13Fd7427035cb8C6FEc3D071b": "131620718815954420433", + "0x422BF1EF9E7036b1D358DEb73c24E8AE7cba637A": "6445594067267908656", + "0x422fAc9209d91C24B3115bF7fB0ef7a3a7Efbd7D": "4688193007044419414892", + "0x424B8722b214174CCDCc92c85B376673C46b8689": "9643436144735078546", + "0x42532fA38A09b6065D84B100C7790F523de54B38": "17920841261281687060", + "0x425DF118975af86feA2a8451f4FF61c3E703F55d": "105613352811252018", + "0x4262C623f4A7E64CABBba3ab70393A6857deA621": "317284470097748858", + "0x42846729D75dd99A2f9018D3534b181B1b0Acb0E": "51344384315312837394", + "0x42b39f9747b8633c593b727B31524c624857652f": "14073834155027024596", + "0x42c029e3536A8b83b0a5C1b3c2d611e1C03320Cc": "13327995790834804798", + "0x431D47eD942f1c3ad7bd8BA43C47A5afB50C657C": "322358226017192900", + "0x4326192E79b09aCfD53E8E5c08FD8a6f94D7D001": "5358945424845588106", + "0x432cBD3686d33436EA788e404603E44888EcAad8": "10608800914742757030", + "0x433685C7C3E650CA1FF1aE2b328C6e0Bd1fa6C11": "9985994343669271391", + "0x434Dec52a6062A7305567d22b50650fB6a40fB50": "7092630925519503844", + "0x43584Dc82a8077d8558B7c8374918Fc939574539": "233038549182320829", + "0x4363E2a9f8d78126D817050d405a00AE37a46340": "6235311733332762015", + "0x437ddfb4C64b0c8CB810Cfd71B2d89b80cf2F29E": "16524173563244601408", + "0x4380732cdAc053FFFFEf40C5cC0D3679Ad32154a": "19158788985574492060", + "0x43D24E4d442eEBB1936EB5DbE2abB4A9Cd68F861": "36732919550365780506", + "0x43c853fd0A38650210f215cb30161E0EAAe87B86": "25769005165517875375", + "0x43fdE846472945028f08d4eC1c5Df082A5B3FFf8": "1333635872048812293007", + "0x440336C0741a906338B86A5FE6f82d936b631F6A": "17298901008614697790", + "0x441599E98107aA7116F50C6dCF3CE6245e5F339E": "139330156860952229818", + "0x44262B4169190A21B1E52fC54e15b0C5fBF47E72": "19913039783984065219", + "0x44322e2f396e4E5244f4F09b863044847E4a54dA": "32512384117792153760", + "0x44399E0c7983310b266972a0Bc76d526A810079d": "2678495675795415867", + "0x44631b8CE2dC92c738424C5fC9b7484DE47aB202": "2032080130918037825", + "0x448588D0441f132c5ff677fC7Fc459A91c0484dC": "261326995409063600", + "0x448c69F53B2cC7ed835C24343255B364d50900a7": "197612839333889838181", + "0x44997fB4d6cCD72b8dcDCA99336aEbc9BFd8eD8F": "12886116030787770540", + "0x44Aac91FF548270508Ea36adA0c8Bfd393Af9494": "25643762674103887572", + "0x44C41C28fEe5448b2A0041B1EE3a3fB757D9cd38": "23208871843826148101", + "0x44aa1c276260ddB8B886D85E7B36085e0295159A": "6063908772729674133", + "0x44ad519E2D330F97c046a38b23582bfF0d1D0cdE": "17621413170650519817", + "0x44ad996F091E911923cd23c65c22C2EB74A71416": "6267977023382473012", + "0x44c04A965a8fcAB013839B966E1cf6AE69d2216b": "22077096999220258398", + "0x44f5b66B4bAD1a423319B7456eE260F3bF15E8B5": "42657295559577589607", + "0x44f6d4b38e3c9bbD74D6D1Fce79A54c58bD1d282": "27098363865103033180", + "0x4515957DAF1c5a1Cd2E24D000E909A0Ff6bE1975": "24406264121095899286", + "0x451FF7B74676268823cCc0886D8305aFF49d166a": "44057583085361705", + "0x452269ae20f7Df9fC93f2f92d1C5351B895a39B3": "8004997885000411709", + "0x4535Dbd518c545CD7FE27E80f8f22a0Ac93D752B": "218951373116632187", + "0x4537a45eDF0FBcDa54143dced8B2645E4E693C6b": "7581755096885548689", + "0x4538aEBd011516C2513d66A3C436DBa01a7Ead39": "14643898940242578480942", + "0x453bddAe23920A7bfAa753C53AB4107b5580Bc52": "63548783596937181568", + "0x45408879D7BeEe608011AAC2790B6aAa95e30B55": "10566156988636150963", + "0x4549Abf58E37a806c1C66BccBbb1e9D44A202e15": "194249156251676319285", + "0x454d45c3701f5aA72D082471b0298B75b107DdaE": "9137774872681317159", + "0x455CCC868834EB28aEDe0C329aa07DC488B143eC": "9825490579202006965", + "0x456166AA032f9099Bdf6ee619849d0b7c0e701D9": "421296131297410001", + "0x4569c1Ab9C4fc9B29CFbADdaD569E89D5A202F3D": "58709629297001591348690", + "0x458A648fA220D13314e70e02f034D2E5747e6De7": "41317829781857556054", + "0x45B4770A2035d342AC30dc7e555781E3786fEF21": "13252867474776280641", + "0x45Bb80bb616A873d4d654f5270ab731D484c2691": "20138050449279151284", + "0x45D3b7dc58B42C172c23363399b23918D96f0cBe": "17215501025227072245", + "0x45F6E82FA2bd96540ac52990449aF2F5D21AC3Ea": "12257423274109524433", + "0x45a1b2157f9a1B464F949eFCbeAf40309d7B07E0": "9602784988532682999", + "0x45a1f7FABfD9c69384f75740A8C1CC4aeD33D7A9": "53341803112458348", + "0x45c62644f406e0f99F7Cc81BedF96Adc2708eBf2": "14653773345688443712", + "0x4607f21737448F0b7e833dd6b9fA19D72fb60b68": "258254994263223755", + "0x4616Ee8276bB1829d7B153C54a21fc91bCEb6EC9": "7743192531421285903", + "0x4628c573359a7becA8C89c24fc97594D57659BCD": "11875960833986454725", + "0x4631977Bfb3826FE7eD915c6ba0FCaC3306531f5": "6638144494981934227", + "0x4634Df7098100aF434F72C0E3Be7dee08402826f": "5134846738724844083", + "0x464F27C7c5983541B3C6CD1cd0fe264A48a1271D": "1224434831576804626", + "0x467927774B59F7cB023863b07960669f958EC19a": "12297298981102647895", + "0x46821532292560E52a082fE1276B1a9f3c0c8185": "93638653644143524041561", + "0x4683CdD23cEb0cd1945bDfd769975756D22994Bd": "28368024761805727786", + "0x46881A919A87F13fADaf8F028dA9cFD4c780E16f": "1849561794078033507", + "0x468b84EfDf2AdFCEdde007403290E8FC396A0b3F": "263876762058757668", + "0x46E6AF4BA5f94835cc6e723D457BC64C91F39633": "11083121334770480067", + "0x46b3502E549b30c1b5e879Dddc73D4f8B5B25278": "19257205749820268411", + "0x46b4d316792344d4f1f54D20C4eAd3a8fd59F219": "29972492595701200", + "0x46d45E9fed3cB3B62DCb6b656Ea637e44e71BDe6": "70247739266312581736", + "0x46f653efBddC78353D634274b8133d01CC3cf319": "36215484381528354551", + "0x47139cBEC96fF8e2d06E0595F966827E400492C3": "185190978846685625317895", + "0x4730ece4963b1Dc58deef297b937b84f56C96741": "590333032306730954563", + "0x473E370Fe873C82cab9038B6B8ADa27391782c24": "10341345198708767727", + "0x474F18a13762dE5F18E5400A026a19B68c35BcaD": "3021967924868916476535", + "0x47592768B1813Ad645329fEC11CFc6F129968e30": "8747329227579011700", + "0x475A3B7945ba10A659a605584D69962Ed9Cc0aFC": "16841113306040106724", + "0x478AB17D8D686904F1C2C0653b1D1d0fCB1115fb": "57295385096703456679", + "0x47955F7B04Ed98A4F24fE1a284555763720850dF": "5990275884102530070", + "0x47C422fC3C62ce3e5f6262ea92186802e17bAE78": "324512342834516132605", + "0x47D249b48F9dbBFBECdA57b73ED91D00B1882186": "11353821457352702816", + "0x47eb8B917017850f139ea1d90cE84936F218A869": "2474394129988570321", + "0x4818F545FeD4b0c9be8D24c3645F18F48f928E2c": "9562913658582392132", + "0x481Ba80800E7D0845718aDf42d3fdE34e8687A0e": "1016449165047634524", + "0x481f2078e98a1C043429187A84172f604a6787c4": "35952017383258903626", + "0x48285b1D8F77EDDE6DB6bc6eBb2591DaF53b8f27": "1000836781833746267", + "0x482F853cF74DA712e6c0C2cAA7f23dAa142Eb903": "23179216970411648862", + "0x484C211aE86e22E4201CeFa8FC2fd9F343dAE192": "26604741567207823533", + "0x4853Dd73D534946A809a26d0A997aDE33bB3e4f5": "13330629819045781442", + "0x48596eab24e984646aF8902E7db5f2Ab0a35e5F7": "17454050512241708031", + "0x488fB9d2d3189565793696514B18BE118aCb4e62": "26821076634288342234", + "0x489979F11fE898078958763d475d7875af7Bfd3c": "19245203476483324970", + "0x489D6976d96F558c97398A2C87cE89F3968f277C": "79366346669091339689", + "0x48D748210Ff77dbFa1c16B6a01004c71096A0032": "239097411649494774", + "0x48D93dabF29Aa5d86424A90eE60F419f1837649F": "448954453024500701270335", + "0x48bD331f5977db04E0A3bc3Aff00231Cd7c19f40": "23735151936812392536", + "0x48bDc8fe55a916479104807974AE095f27fC89d3": "41602094417524874707", + "0x48c49024E2885679D0c9Eb3d4d6e73f2542B5839": "11690620237432326736", + "0x48eCC8ED5D5C7B43d43f75784594333FB21Dc6c1": "43081521013228939325", + "0x490D809E27701Df41f99067483c83d021255749C": "8326848802542942159250", + "0x4913fa1d86a9D13F75c7B951f282075fdbbD1a0B": "29296577489738524716", + "0x492Af9a0B99FED66dce727bB96Ad133dB83CdAf6": "18238761518226048271", + "0x495c25612e59DD6783756E102edcfcE879aD3F61": "1352314728002565176", + "0x49644DBD6d72e369158ce43d053Ad1a9dcEd9f84": "5461905187110456267", + "0x4964B944bfefB59C7f62AeE74592791979f4eb4E": "13396387783719582687", + "0x496ea957960Bf9A2BBC1D3c114EaA124e07D0543": "6111422973316307289", + "0x49845b039f87cA2c32b3091F658F2F7e7b96D4DE": "37586016959643817429", + "0x498944ab7c91971970d8329114406e0926EB87e6": "40843485487894088822", + "0x498F119215f978B66886A4f905658E515F3724d5": "73197834068960684628512", + "0x49A2a0D7e013eE31eEA00E403E2Ca0F571400B7C": "5317150343968514612", + "0x49Ac35E31A4Aa60A10a10E7e7b24500228e040E9": "9271817272599068328", + "0x49Fa0a71C8C1E4C1a08Be6FC124351D5cE8ed7EE": "879583184280954844", + "0x49b353670755B552d83669B1fBc929442c91d48D": "458593640355006303886", + "0x49df518ac5Ef19Ee3767294A0790A24706F9b88B": "233279801676347924", + "0x49f7EFfBC2609d64eD40afa7cFB78BcfBA0665aD": "4809362891368220722", + "0x4A6cC20606939C7653b384bf53B85aF1825874a8": "24837689338838510568", + "0x4AAa26a01756e91501043163aFc1bDfEC7E9c8C2": "19875809090174111851", + "0x4AAdB81fD85FcCB039FEA2C7e8EFc77942b91339": "80793566170192360800", + "0x4ABD9DB8fbdc9E668A1e34F7ae77034bcFFA8448": "6130279815425728030", + "0x4AD1dCb36877ca48bc8bDEf8Ee79bd244FC1eB90": "43046594204462442571", + "0x4AE5DDf159Fff3B26340EA2a97677B7e0B94EF64": "16446691840938320126", + "0x4Aab9e6eB125cDd378671188255f19325E3A804F": "304931557943399285", + "0x4B0da1229D2248baB84d2ed6Eb1414A17Eb1F701": "20679295562388896719", + "0x4B105ea26088845aBFF6a082C49c8f1c894EF9A7": "29281038928830477070", + "0x4B180F8d8B44791aaB3cae890371Bd46f341639b": "13510247446627130248", + "0x4B2249F08dF569CA99cF1C49EEB763655d563174": "6050383561382125611", + "0x4B2AE6818334F152FA4f6E83f9284817B7558444": "8333560925651090707", + "0x4B3F132D97FbC6D1fe15E7E5c852F76D1B048F3b": "3355513161256009375", + "0x4B479F5e351181689E8ABFEA3544a365c54c1ff7": "47584447398546572826214", + "0x4B8977b2d63A29C3356A2dBB9D3b6F23A0DEeed0": "947351875896841382", + "0x4C28eF50F6485D74f6292646308D7709f731E990": "32613329677913403809", + "0x4C49BF0E5587De02E70AEde7ea1462479a4C8F96": "100180384363684932846", + "0x4C566Cd29d4adCC59047865AC3Ab8ba45b22da33": "754349467252855629", + "0x4C67Cad1E66BDe163B4aB64E041e7bd2cf3f2D6d": "13764990908487331025", + "0x4C73C6CA10732b3786002df5Ba2142FfBF7BD4Cd": "26165594870659965392", + "0x4CB263f9e003c33876a6033c1Bd64995D387989B": "4669076212266108947", + "0x4CEccB1061557cbBDE9917a3Bb582dAfA3802a20": "6769757883313101268", + "0x4CF3d4bC07fb1161B8B3982A8C4Ea48a41959952": "4001247399412390473", + "0x4CdF040935a1f3c6424F96cda3A3b748DD9213A1": "149137037045154526", + "0x4D06881F9d1427F8C71b088df205Ff9aBbD2a962": "25624944539014703424", + "0x4D06bD93d38226C6B00c59A3525145cbf112b6e1": "12359605745714009355", + "0x4D0Ea318f899f20077F0F592F60A5B0153716DB9": "16573118913665785959", + "0x4D0e439ba905EB39aee88097433aDd619cf5257b": "70191382944603345471608", + "0x4D17676309cb16fA991E6AE43181d08203b781F8": "6623162574163329069", + "0x4D38Ffcd547E9F6b6823fb52d4166eC618E12BC7": "15389404048891768734", + "0x4D7E29af94Cc3deE26B36D7f1E2B2DD7194301ec": "26919868383055191666", + "0x4D8002D7f5234C741a81dA7Fabf954042A1e1A94": "77547551730216756286", + "0x4DF97F293C01A2327690653E4B685Cbae6627840": "91783067946018727", + "0x4E01BF19bFEDBa2CDED3E61d7Bbe5dCbD6463bD7": "37260863288169443097", + "0x4E0393e98cBb4eC52562403205e49d1BE5242148": "9656020566413444330", + "0x4E695843b8057987F2D432A7a89bB1b0570Beb79": "7661408005919943575", + "0x4E6b3C2cad52b1f9eB469f6feb03dd88fbEED68E": "10179970800322015207", + "0x4E8315ad5604B3C46E4F51Ce8b651f899FD3B5B4": "45101575099656530942", + "0x4E97DfaEc8e11f43eE3fB326148E603F283eb43E": "6829120175694414863", + "0x4EC6fABfb182471b9A1d3d32d3cbfF9540Fb4daB": "18999958067786378665", + "0x4EFf2F739B1B0d5719662f9094A06A742ed99c43": "7022435871144162731", + "0x4F37a4954ed64Dde99142661692C46E9BfAdf027": "13867123103761348815", + "0x4F6ee4C8AFC5Fc9f28CeA4ec08e519B886ce6880": "13316226023757902675", + "0x4F8462951f09D4b20908fDD794D5196F3E4c5079": "10569267301568968671", + "0x4Fb6683E2FB1E37D54f8D55D473aeC71963bfB00": "34250220118517809400", + "0x4a02071b4dB3fb5076f86CA48aD92D838622Bf8d": "249787594210231187085", + "0x4a147BdEb91fB712718411eE291BC229eBac5D1D": "39158512216718491933", + "0x4a2CdE37BeD286b55604D947f717F9E7013b23ec": "86036287126676483213", + "0x4a754BC7A22B95591187504A480C7653e64E8E10": "10198841451478028235", + "0x4a9C3a1182E0760495adC43E6A0ef75F31f06d9a": "20616959929046645544", + "0x4aA776f6ba9E41E343F5e0ADe614aA950A1f7CF5": "10201260215741156718", + "0x4aFCC46DF189D5ED525E322A083520D6945469B1": "26820219680829832901", + "0x4b04ee17650da41Eb68A6d8E352d7CEa8F7C864D": "12746429767069099115", + "0x4b441cd7C5085d0C255eff3dB7eC3417cCA1a1a0": "139543861245024365575", + "0x4b87a2FeA26aeC8fD205fbd1d5255D57623eaB2c": "137932614651827764573", + "0x4bB53422f6C7911a838E5514Ab228FE950d10DF2": "16181127761894346221", + "0x4bb965b51F0e696508D6379D55851698D1Fc791e": "9939460814900821897", + "0x4c06A0aB57dA91C9479E481D1Da2FAfE77e31761": "6702888864713391714", + "0x4c13c1Ee5eF32eCbD77161604ee83B62e0639dCe": "5884969610235422559965", + "0x4c2083DCA8012fFC985005bdeB24E6407CffEA4C": "7595282482866485947", + "0x4c2B52dAF92944D99A6cDdcf3C697e16A2638600": "205581537268666146212", + "0x4c451a84841d9efb4c573C881858d59349228139": "15551556138973509784", + "0x4c53d5ED8276b8dF74b87DB2090732028F6F111b": "6991155359541715682", + "0x4c8f8089607ba1d370c7c62743a309Bcb01D1eeC": "33456683242350734", + "0x4cB941Adee8dB9AA26659e7De75CFBb1f3731b8E": "5066364868846465009", + "0x4cC18487Ef4075cb08167832c0F186c77CbE93CC": "6480247532801827353363", + "0x4cbd07cBfac89d0dB3E463ffc747d1C8Fa61f0ED": "17076656813552899166", + "0x4d62ba270C8845d0f8fb27911411be0E119880E5": "42036548418368776568", + "0x4d71aD660bFc28fACe851e549440D2c262F75246": "21582840466594715248", + "0x4dA4b904Cbc38ec8E0b14D542314318850Cca976": "68921676283277185", + "0x4dAfe72A4643fd95889D222E11EEB9e94666Be3b": "65639248423008474644", + "0x4dBCC6Ad74431A6A95633CECC00E097b4D3F0Db0": "10804477691781739919", + "0x4ddd600580116a21FDdcB9E1565F741d090a2396": "331260566279946111443", + "0x4de8Df7842B5B3345540Ed8b235A014b2b9D98d0": "7352419172679211576", + "0x4df3567BCa63632F084fd1A74666f50532E29A39": "6657690123595223236", + "0x4dfe13D8349F8DB76C55fDBAb0FBC2F5F27F61be": "20222118552149498072", + "0x4e445f420cb3da08dd49e554FcCE571115b77Eb4": "5521280134372738056", + "0x4eD0864be1c171D95c7b66b3d507359f86122f35": "314457361027691893317", + "0x4ed0f6Fe7156eFEDD299812b8D27F60a6C70fF6D": "143717044432218987", + "0x4f202dB032dbE3aE84B3B250e9CEE985FE53eb40": "11945870934745978160", + "0x4f4cA836bcfa668bd275344Cf76191d575CeF26d": "10769176161470507545", + "0x4f7E8447f908B8C989F1A2bE5ba4846e529c2A0b": "17210551651259962754", + "0x4f9EBC78810951317625736c9783635C343D2f82": "24807956463030342318", + "0x4fDC94AB2617366C4C3A4674D1D31da8EC6E5679": "29693612792275314491", + "0x5009F123E49061266ac21d397cD28BDabE1A899C": "17101962877004251140", + "0x5036993648F9Dfa2CdCd26D6b1a3c1a4904FC579": "28022902931642367314", + "0x503dF7e0380b07220eBD8f0B3ffdcC3B91F22750": "5964079690768967135", + "0x5043438E1e8E6a1eB08373C4c2a6BEa8Db780aFA": "10694898830828396064", + "0x50488edd91473Cb44906185a48673Cde0297adDE": "17892890489403061760", + "0x506cC4485a7fd42FEA6f2aCc97D7DE697B88419d": "18557627192487016584", + "0x509a7dAaDc0C6D45Bf3BE603F9fA952f2F760103": "10778088567585703459", + "0x50C96Fe0F62e4c290119C7Fa0381eEA092fCe83d": "71748967464387048034", + "0x50CC5031a3368533210b338188bF26e96C1e4584": "7578372596861426182", + "0x50a259a4AC82ff596ac929Bbe120846677f04384": "224296406618832613", + "0x50a9D58F8fb5D8A4F33C50dE394BA6b57066260B": "27047451121833139812", + "0x50d4755846095170460188EFD59fC47A83261323": "31363702127209663150", + "0x510053e5CdE15A46Fd06191158aa44Fc39155772": "24976851402025669341", + "0x510398f76cEe472A7c9B61F403AE18073E84a5D3": "4418000271618114132691", + "0x51044b1d18ff9A9B84609982c745Fc8a373179ec": "26824329596864767957", + "0x51063a3c66b170f56Fde5436eD50fCA44499edc1": "33217800841403871404", + "0x510B0068C0756bBEFCBaffB6567e467d661291FE": "145555153566846139807338", + "0x51183877d54b084C65E4f1626d15f9224D79160F": "6874996298346835448", + "0x511B19F5c9e8c5E7A04fF4339f8028c692B270ea": "9547572963466005391", + "0x5131B24162052bDE2A49fF35e4C294c1df191e8d": "152144555268012363226", + "0x51390748702DCf022A525407e577956024639b2D": "19986450361903144807", + "0x513cEd51c82721260C94AbB303f5eB1DF8E68ADA": "8564944092553777489", + "0x5162fDd0d340Aa10e790EAD2296b4ccf6BC3000E": "484389207207095476", + "0x516BB12e156A5785b6d16753126eA3773EeC58DF": "24209579953301373250", + "0x5189bd02E3631c29bf3B49c4A92c9aE6ccC2c8A8": "354335279220255581", + "0x5197C8430d87f1f1171B9a89CaAc378d1d135b26": "95364138027288071", + "0x51B33E7BCae29d75e9Ea0F98422Ba69F56FA7e7e": "26447780464836246188", + "0x51B553a31Cf3027f9F5a212027Ac1717B21782B6": "12206890949301370500", + "0x51E4aae33514Af854591Bc68d0052b670AD54698": "8980116727664000482", + "0x51b092F9fA48D6540b7A8BBfd13e22386a3C5f65": "26112573864553309265", + "0x51fC44f14ab20FD1663A1ec273b9535cFAd0057F": "7289317937206266835", + "0x5216212b8b8685C6da20917F98f18176D8203b3B": "7032198672879839106", + "0x523ee49daFE2d7B685978E2AB9b5387296c75500": "7235297293240637524", + "0x5273D758bc529d9F0A26Cf5D8248456F6950683D": "19246577327362603881", + "0x527aBBd3b14eAeC4A5539b9186D18E71D0f6d816": "18395375263908574330", + "0x52867Dbec48a8A95b437F499ed147102565D63A0": "1123112577559485836", + "0x528dB94B9DA6b42d0523B26ae54Dad3e4eFbC78a": "11533453812213436277", + "0x529D698671E1a93B14342FAc9E34A197Eb22A5fd": "88731448101643315017", + "0x52Ad58D877e12BE41C7b2282FB999240521f26A6": "40593512218512785621", + "0x52B0c756d6f36af804C51211BD5A1fA4AB5dc911": "459504105684091415", + "0x52B79aC488a5D368840cA11EAE60A50d36dAD710": "79047525362159284347", + "0x52E17c81ebF287AC30ce264aA20781D163021bE3": "38245368192208810077", + "0x52F88a1fFa3B21d0791014cBcF0d9FE3bdEb91D1": "46300990622699141933", + "0x52d1bD5Ce865DA99aC53AD0605a13CCcA59e2923": "15462662384607747642837", + "0x52f26fCF837d272e991f70Fda1f04867E83078c7": "51680948318248624393", + "0x530806225607092ab6274b153c81978Be69A2cd7": "22816826458478348769", + "0x531111CafbA1ccEaB2dD39F5891edc4bD684AE91": "17935267907019418755", + "0x53202dBcE40e7e3c441F67c2EaDc0EC26b955079": "4970046116687597804", + "0x5333c1d733794e02f34d5f0d88c65d03FD2E4Db1": "9914909720682253261", + "0x5335Bf11Ccd9CC36680952d20592cA9B3ac3d86e": "11259258697743884507", + "0x533bc32019D5cD89298f053E1F7928A7DDDe998F": "1258824057577273305", + "0x5341FEDC3881F5b2626044F60eB0073B6d1Fcb6B": "39093224910601060717", + "0x5342e7e3e91bb67957d97D6023ad5d15a4Dc6Be8": "16214796076835164826", + "0x534424C340d62040361e0510Bb7A6063Be7F9a38": "16275396369792338719", + "0x5345ff51850ca1C4FBb499599624b6E6096fB92f": "26261705186219263247", + "0x534b4A04E36A1EB65225953F233E59Bf0BF64364": "8084248234707805934", + "0x534eD935388470Bfac56F136dDad39E160d782eE": "16357114742357627639", + "0x5354bf7B5339667fE3FEBec12085F02b862d322F": "125571121336805564669", + "0x5356a883FdE8fCdfF413547226522A11F8B3bD61": "6588361342329407461", + "0x5367b193424560Be43bEab4Cfbab90E7cC3E8Ed3": "8815182017332827220", + "0x536aC77c4711470209810a1A48820a29D2f1933D": "6011688649011769150", + "0x537c07B610E31e671065771aD2Af4EA412043460": "21184231431503143953", + "0x53954394c4BcE9c612e7053E2A929371D594898b": "21736076964550774703", + "0x53AA582412137baAB06A138b1b8e2fFBA1a00613": "9308863667264897413", + "0x53BAc8E44cFEa780545057c2BcD6cB86619131b2": "10479544019541213644", + "0x53C601621a9Bdf0b98ADF8B1F7D41AE63bD46c07": "9071399877731228107", + "0x53d1C6a6514c198BA12A4388572cD200662E4406": "7085760343801556648", + "0x53f76e55F144D0d9Ba4536BBdE40519a5C6FA6D5": "11198838894684989379", + "0x5413f590D167a508fa106BD610858323AF789CC2": "31772860212242640924", + "0x542A0eAf1358480eC0703f07BC3120A6503EBbc1": "939984102132029164479308", + "0x543F3B7233F461935255ba32F71b9D910F91f6A0": "25336683440311219", + "0x543d9aAF49579A30b33D6f3351F1a31B38010CE9": "890299872479527863", + "0x54600F7C7b03237e112Db656CBc880257e020c0f": "72795042249684864906", + "0x5485A7D74d7286aD65933cd1b3f0cCFF0F8D5A65": "23391408133272536491", + "0x54997507579B699CA92021f4AB0452E5123AD563": "13593888837440257694", + "0x549A01C0676dE55c514c63F19C38a0F3b6C45c64": "10268752952344781975", + "0x54C4849e1D25dA384B8b30Bc2fA9e03267D317f6": "74523261376115371944", + "0x54CC0802aa8bAB73b21b897f96b37AfF16239EeA": "18443110931191160323", + "0x54af4e643f1bB47DE2D8Db3274E72e5232846d6d": "426494202416913073980", + "0x54cA9E31389ecD63B90C628c17ca3ade29BDa68B": "201870412505332129840", + "0x54fC6BCF943bbe0DaC876953Aa7F4AC1f0BdBFc8": "64214200567346894160", + "0x55444a1B19e49518CAba6Fa49Cad856Efcb3cb35": "26454470585209220217689", + "0x554b96aC937Afb4134a2e5D2F60294Fb0F74Dd8f": "8661781323134477950", + "0x55509e365814D07094EC3fFA645C1E2A3dd66376": "1216220070653778894", + "0x55529579A2Daa10fc9aA005cD761b47Ad40838B1": "1244048801188423161104", + "0x555a457351906003D7Fd58E9Fa7fb3EEC54F83C9": "912830738207966296", + "0x5567932968D231639Cef6E299CdC9737521F99B9": "9301420184924170252", + "0x5579718ebA9128F7A9b6316e81C6f867b44754E3": "279201143358497912", + "0x55826f7459236341EE817F0478ee7832Cd6F2E7F": "321877582562738302", + "0x558D58A8d3Ed3c5d2D009dd2B629054280e730a6": "12542949845881136063", + "0x558ef7fE962Fc65A6b7e0ece793012E514721BeA": "38068727194734800143", + "0x55923F098d30ea9fb85e661f89bA849C867C24Fa": "21204968354091180805", + "0x559524b8d5aF5292E4CA30B30eA3DC8261e1DeA4": "286694194543403860922", + "0x55D4Deb9198118354F9EDb1a0d0Efd754a3B765b": "10002100519315987403", + "0x55E2744e34308621c4572B1370CFA07f12Fd9C93": "39442366236283937559", + "0x55E906De444E0215Dd6882acb42250F7b67f2c16": "7444512977033264356", + "0x55E9d21d7BD2702040C49D7A5116089ca15fF49E": "11550712732264567448", + "0x55Fcdc8204e21Fa8429139B46B1a49D92e13D0Fd": "7270196196213642409", + "0x55dAe16C6B16ea1203e3cfB0DC56F58bDB3d0805": "1973305043367700999", + "0x5602233B5783B60d66b9599B1fF74Ca85C2e407c": "7569751686428423446", + "0x5607Ce36aA531A8cE77Ac21d33296b7CD1c50687": "39249507070232753196", + "0x56175638C153194C86f03CF472Aa33ED799aC73A": "19659810628866240406", + "0x561F7F357240954E8e4aA1abA700dD71d69E8de8": "268294839246473837", + "0x562BF1B67Dc40d9b7C3ddd49E45aE58e61E1B76E": "254357596426480244", + "0x562fee6B33a341721e0Ac760b26077E38a7BaA5D": "58276435461906535793", + "0x5636DD8E88983c5a4e39B157bfAb317b4a590232": "10625246281575411359", + "0x564B1a055D9caaaFF7435dcE6B5F6E522b27dE7d": "717330861060878146396007", + "0x564eBB175a9A27aa6209aB1CD298DD08099Ec77b": "6525200886720598734", + "0x5652F20344c1657a5475890c4dA3Cdb94E580509": "18945278509943947258", + "0x5652F49c9F4276E8a31664B11AE9037e4f4bbE5A": "34937741501939176748", + "0x56581d0Fa0D2C42Ead20fdcAd2ef8AeB8171cD8e": "30282119080390396057", + "0x565F1dd3f6f0d088f8cF48A9d57014Ef5f89a54F": "8377015944700046046", + "0x566D3C1A2959b2d567ae088882a30D5BA964F352": "5866075595015343033", + "0x568896f5fEfE8EF7694c391C7C9c898ff015681c": "61286767024113653", + "0x568F4ACaf975bdb81d8A26Fc1BF3991656a745d7": "150137509671381", + "0x56901449d21A076f1956Bdc2Cb3E46B630B8ca98": "17205798723201442096", + "0x56C80F67B010C58Aeae3758113B912a522bCE0e2": "142977579788035971208", + "0x56D2B23Cb73CFAD66d135e7cbaAF882eB86B0972": "1335330346127457683", + "0x56D66F659925FDDa0cd7F16B20afE9af8Ac177fD": "11029094087136561071", + "0x56E2A8ac0f406c5F233FB5C7Aa78193B136239f9": "10316320985550707106", + "0x57043401DccBa0482781e8632faa7E328a726Ef5": "7088007069595778575217", + "0x570C565C308c46BFaDf8cECe5f75026eA402A4Fa": "15310890283327478141", + "0x570D75BE8F1D57D6b1415FD4a49C7FBe6E14811A": "63616692528344013305", + "0x570cf51ac81d5871d7fa72Fe1f02Eb71670daCfA": "10222370406188021630", + "0x5712Ec69B1dEDf934303cE530aE2b4f1D3ca4c61": "16965868169788497143", + "0x571fE40Ca73c26D41ccB46B0bfe35Ea7c986BdCA": "34982129896873531294", + "0x5728bEA8A7b446B07eB906b72782628cDc906b44": "5089651367901713300", + "0x573f7C392F3Ce8d005d31264E70B513B6c71D8a5": "23083595271543693619", + "0x57478b221022952C825668f105D2EE29c8B87ba4": "162314967654905070997", + "0x574BbC20BF13c4eD16f209a820F2E4870d9c1c81": "20774411709869749218", + "0x57503Fa42086300CdA9fCEe6FA95915F5bb04680": "13660579610784383976", + "0x5761087BE422eFa2CC75970F3FcF9accE6e47aB7": "547778209466305970", + "0x576DF29c98E4d06D4A525D41eEbD543d6baac76C": "2222579695823661477", + "0x5778DC0EAFc344Af7f5441440aaf1A0bC2Cc8106": "24582927929743213225", + "0x577BE3eD9A71E1c355f519BBDF5f09Ba2018b1Cc": "8682120228503577199", + "0x5788F174DA75EDDc0c22f8EC38B0EAeC8b93d3FA": "26706176669866775923", + "0x5799605dE9d04a7A53F3d1F4Cd4941924995e840": "36110369037583900861", + "0x57A25611ae4cb86A803ab6cebE76F6e56f99A9a7": "10859921288717451661", + "0x57B7906f796aE1684eF859E7e4F4384675EB56b0": "6270315187590973919", + "0x57C6dC7Ddd00D34f588903C9f7bfd9594c9b7Aba": "1623041847970318388", + "0x57F39a945D28593B7fd9c0e54C66364D795EF6ba": "64078785584234762396472", + "0x57Fc1704785eB2b95bD54e0Cb158f00845bCe555": "12267970164893145883", + "0x57d9f09eeff8877A9F94afF75cE582b85dC56f7C": "655175589316889998", + "0x57e5E5c1a5B41788a0015FAc91d3946190DB835E": "2212854698823652469", + "0x580B29c4039FF07E01D78A7Df58F3B88F3765f09": "25908061146955286405", + "0x58152749511AB03f0226FC65F18154E439bF5028": "9337681404371142099", + "0x5815819e1fb45775153f16E5f52CaDD343922851": "14570225045831266910", + "0x5818228e94Fb754DF85fDf1B7ee23ED47Bef8D67": "31624066040217370824", + "0x582c98Ddc90dFBdD1d78e6EfD5fa96d94BdC9c10": "326419233885831819", + "0x583D03fE81B13D399426516de0badB93a428F1B1": "2263762982066215331855", + "0x58475B4B52aE07C7D1f1bD46A71233400C5652fd": "12449816755428192356", + "0x5853eD4f26A3fceA565b3FBC698bb19cdF6DEB85": "25745993369522237891", + "0x585Fb5CACC65Fbe445f0F6831AF51D9cD512F850": "16722715539846288610", + "0x5860F2AF40C8A4Af47eD1B88dE9Fe8103Fd5f892": "17003287368278802525", + "0x5862C27568486027963e4d4Bb75CF2972057c784": "35266909794735953541", + "0x587b9292d90466747e74dfB13144086C769d7e2E": "677777537056790021", + "0x58C4f15D64Cb094D1A78AA63EA6BB0A3D4E99be0": "254079212912676506908", + "0x58DebeCBa55F38Dec07fad3701396d1D7BEa9d60": "1632516045223268148", + "0x58FF099b5624a8EBf9b6D27f9FCaD4fd88a6b9f1": "6252202388138771815", + "0x58a043BE3a36A5b13D3247C4140090E5881E7047": "5096701225407858660", + "0x58ab20202782006B7691431d262fc8BA3271aAE8": "3940129945276235", + "0x58b21cbfef2E5cB4915B40c117d8A7c81132d097": "8439226709828691964", + "0x58c99C2Ce97E00CE72e2E7F2f0C7c7D5357F8F05": "14377854628469102178", + "0x58e4241F815F2b95aAB8048290F9a346bF0AF235": "5284915312430555272", + "0x58f3034c1761859F60c3797d351599c06Cb2920c": "12307929104549537512", + "0x590F25115dA49eE3e3765950A23Fd4112973Ab9b": "8752421083556479235", + "0x592b07EC348f6bB9c6Db898432f9e2a25B5a514C": "22676459361046858681", + "0x592d983A1A8C157221C1C7E46309bd87e5A1692F": "13078325739673364340", + "0x593786CF6f2873dA22FE4F27FC29592C8439111b": "15083718549584091084", + "0x593f192c6C28D65Dc4801925878cb48941AAc969": "538153283451024480", + "0x5941A4423b55Bb7E035Fe0fBb0091e530e82acD7": "184630437337121718896", + "0x596F6D9f5D60b33b672E7D2Fc27Ff848E20d1Ac2": "11529892170503944859", + "0x596c7f583A9Cc48304bb7C2a73f6C49e168d1C67": "36725554225110034732", + "0x5972dA5FF1B91a83fce2cdA94Ad8601DC0eB14B3": "594017822222964036", + "0x5978e8BF8E589F878ab9dcE8885308A92d8AB34c": "6155343739115724498", + "0x598Aba3d787F737CE6B22cBedad05E20eC3FA414": "7425828146353853303", + "0x59A5A9f9325130fB6eaADE6E77B092D04E1cEf08": "23089125074025142362", + "0x59A6D1342f09fF5ac3C3b74039E5B152ddd8153A": "916626906382068916", + "0x59a661F1C909ca13ba3E9114BFDd81E5a420705D": "1827948688115721771567166", + "0x59aE88779439e5F57dC39A3c836F741B9Df78Fc3": "55676820449246977890", + "0x59e0375e991fE25F2B9cA900DD3eCF3173e02D31": "5843500598918783594", + "0x59fB17eF60F7C3c86B326539d88e87C5D74a5e18": "15188512388610976485", + "0x5A31955cD60ce710C320DfeeC11960216d36CdC9": "2366002213023524198", + "0x5A95338F086d25130e2a27e14609d30F4cE155D6": "662863819169331483091126", + "0x5B07c29Ec992C8A660B4265db58DC418eb67334c": "13043142342405893563", + "0x5B21188a831C0520411af8CFc5FA20eb159A396d": "472490499271838214", + "0x5B59c28D73d65091c2eaF7162c6d7B815Cb7CACF": "9124607229362788900", + "0x5BD87625346F120b0B84391Cc1f1756cFC03FF87": "5157813899213944893", + "0x5BD9B20eF76A39eD4175548b84c544502e68c5b1": "23042543951656577945", + "0x5Bae37bE128cdE6A7B5A11b3C4222684E4e9EC44": "1209776889593220667", + "0x5BfcE71a1909b4525156290A8Fa61Af0f723aB4b": "3561682713490922286889", + "0x5C1589E661D071A302ac29b7F8f0b56833300981": "18350346945592509101", + "0x5C3443c0Cf8C41c1ad6D976eaAd66b2a714cffC8": "14264577061149022833", + "0x5C7e239039Ef0CCd1167FfAb3850e2B2ef0a46AA": "9888763946076801177", + "0x5CB1623bF988f64dbeD487a8c890B9B97853dAe0": "24487383538383995813", + "0x5CD1cF28C0cC896EabF99Ca07F1E00Db64128293": "94031898906623051679", + "0x5CE157c714D800AE283E3F36CDB5DCB83a4B78ca": "10655497044028697642", + "0x5CF6817a3950E0f6A035093942be7530f480A0dd": "988503572288656702", + "0x5Cb269C1645C49A74C992e3B4E5aD54B02b27007": "33205328569646070500", + "0x5D0aC389c669D6EFE3BA96B9878d8156f180C539": "16776543093801487061570", + "0x5D0b2620bBF21cBB33af462000aD69E0138d2B33": "713751330960541503", + "0x5D153908BE5bcaE51BeC451da22C50Bf89fa0B14": "9944736959923068641", + "0x5D1aeF79aEfe7769855B602aCD3eFd2939D99b65": "1312843354845190268", + "0x5D5022C066717824cAad8efA69d6949684eb2a12": "9946589795761336574", + "0x5D9F8d36BF79335b9D114A1d18416eE2c1B3E1b2": "663725875506992103508", + "0x5DC3E8F17f0CF332dad4C5De32342d4C3B57FD87": "79912523831458407679", + "0x5Dcf4010ad5141Bc8490a287F2d9823bCEb5994b": "8621697108946163572", + "0x5E372642775590f13b21aeb776c17a0615eB491e": "12470674280136633267", + "0x5E3EAC069cd6a0F54F616bEb18DDEF4e5c414f5c": "23718837017000697076", + "0x5E5c47880c513003Ab97d6EBDE50688E58C0e61D": "719057826868019549", + "0x5E7D1676C33A046af6592eBb53d96ACdE22BA182": "11975803628637719336", + "0x5EC68A1A5a742B24c7B20ff19e375361A1ca279B": "251610642016277587735634", + "0x5EDc24B4491DE8A5A02fd6705d08E0898726d2C1": "8546817578446171981", + "0x5F02A88b9ECC77388f4166d9E3A07750C528E93f": "690227160015765332", + "0x5F0b726D9B98a0744fE19141fea973546CD009f9": "15325048775233759", + "0x5F1a819017e2ba03231cf1F4F45973eDec1DB9D2": "24262278523972656566", + "0x5F94a51948d2376Ad34A6fadFa2544e651B74b96": "23458057659404662861946", + "0x5Fa2134E7a4d658b028EF5B2C991f78c6203bD7c": "8527790899854746359", + "0x5Fa8E3295Ec7678E4D3e5BFcC0C99840C30EE336": "5818329961717895066", + "0x5Fc8e118E1586dcE0165EC04cc3b35FcfCb3e1Dc": "17967735398116989190", + "0x5Fe2a2bB68F35229219f4e6BF0396cC13Cf760cb": "9098078106277178956", + "0x5a17fb00d21C3e33fE7DDb7Ba6449cb568c4AcD7": "973356097446201517", + "0x5a543E5C423c9EBD22053c7CDBA3B7A5Ff8D58F2": "5230387256433000334", + "0x5a8DDA80db0C8482787cfB3f0C3FF97bd78809D9": "5003032369335310635", + "0x5aB0e4E355b08e692933c1F6f85fd0bE56aD18A6": "58601567215463699491", + "0x5aCde340f697E77899D323ceCE3a2F44F551297d": "27713622775751269688", + "0x5b2Fba087df960b13f9Dc1d50205D9b08a3F9f51": "39114105804903469466", + "0x5b46a6d7236C6E248460639929c4d6446BD033c2": "274936929367744830059", + "0x5b5CebD8a09a1cc5F556EDbD328087B96713af5C": "24987527295926838642", + "0x5b6683B75B744ffdf96BF92E1296F284639dd807": "14455273228207509034", + "0x5b71746B96E9d2986f8A4305B20e1Ca6F9247D69": "242114218173980384", + "0x5b8eD34811E71780D075BD516353730f122d0777": "109328401663312968833", + "0x5b987E7D8dFe6E28744bf5390C80E08925d5CAb8": "12758342497244533878", + "0x5bB92286a9a37dcC77cD677Fc0aB2e3EA1d84BC3": "26424653766873689311", + "0x5bCFE2a84D5Bb81d1d4b295c45dfE44a13Ad2134": "544817222991429374", + "0x5bF098c74af6E0cD4FCF3C4f664E4364BF7ACbe1": "16335047600501565720", + "0x5baA1FdB401b104a6E24D31F3c5DDD99a7c70F07": "59503349947265233616", + "0x5baeBB9c595248C9080e4FEda6787AF5bDEa449D": "7567618194464980001", + "0x5c0ae2059198310320765936e6E7Fd577158D5e2": "8679512258576745177", + "0x5c46DeeA1783f1d7e9579B963f2021AC1B5BFE7b": "7036767632178455139", + "0x5c678DeF0a34fb01A349A54F74792467DE96D694": "12825546582837014028", + "0x5c9e9D7081F8969Cf9aE33b222C75c6D94a8e014": "36718525425007976483", + "0x5cd3D83520b6D8Eacd9396487F2BACee230da15D": "5293186580662692864", + "0x5cfC1e580Bd80336e1474A804Dd5b56444c9EAa6": "24004690731608440452545", + "0x5d396a2106694308A40608Ef14A1C0892B6b7fAa": "175400896148592898759414", + "0x5d81AE293cBebdCD0fe57F62068bB763E56581AC": "5659981621614119141", + "0x5d9C806a23830D6Fd39e22b7d416a7a7A3A314bC": "45719045100535360444", + "0x5dc462617C26cba8f5151967070D6A153eEf81E3": "18873062149299295439", + "0x5de6980D284616d689c1171fAB748949BEA78230": "18357627205969169496985", + "0x5e0b5711a5509e7F927220c66D95bb80e61Ef91F": "12164052795375227092", + "0x5e51851EA2D99cDAB606444fB4178f1B7fF6AD64": "13819480472515153508", + "0x5e51934366A5B2D328610df5ea2B9196B0181CDC": "155823020778305899202", + "0x5e64d21C698791e08411b5dDf6Aa4f453dB8288e": "79522967497319", + "0x5e6759d814AA0bf3bA8d18d0815365023E546F74": "12780500214281489113", + "0x5e7E1C123Ff87d4178C85C8366314b48270e2cc6": "1879803573875871476", + "0x5e8Df32D6f7C2Fe7ECE60A8fF00DC055766a393B": "41046248706559087398", + "0x5eA54a4D1F4E9b16f702BA83761c0fB53c1fD61b": "11088546981151338284", + "0x5eB39E8D655F533E094EAcAa28EF919294480471": "38431910339928181249", + "0x5ebd4B00f7d2d5A86c0e16DB3b1902Ac110bE59C": "7651002435046956296", + "0x5f443a1c31D17C88eB22E302228A32177a2915Ce": "32260595184347054469", + "0x5f45F12EA82fF791511966bEdadA65Fee01d056a": "16966009358722556789", + "0x5f51837d90bf405d77B53b789365294012ae0eD8": "1993079251944172409", + "0x5f9832b92d3b28394685aAc5DeB32badB3d236c5": "14031700358464018647", + "0x5fEe346F339177fb4a918462B29e416ccf6F7eBf": "16352566219072360577", + "0x5fbcf16669A45ACdA27a1E323e3BFA9245B8ada4": "5679326885904759795", + "0x600F15504C67bA9489371bBC23E43d026De64f32": "12619050691603711896", + "0x60203B2D05f84bAF615095596C4353fF11D2A407": "25030666822868866031", + "0x603028ec8Ed0bEd832d266C93ae4232458b07201": "23136324435841420386", + "0x6058aB417C18cFb1Ae17Ffc80beAb7172A83049a": "6138488921823313158", + "0x6064566F96d123fCA884cAD0C26f428E2C766C27": "31267078652359101908", + "0x6065fDe34F3D06c14871822E42E444B047C0A95a": "16700629879242679023", + "0x606b48D6b2F4B168f99e1Bd47B382c8e403f15bA": "1307209816424132256", + "0x607865dC586A12f52658FbccD7A0126dE90cFa4A": "11580409548351149583", + "0x60EB54EBCBcF83D91A2D6FEC75Fd2b0Ae8727dc9": "5685413082566588097", + "0x60b1191C5CAFB754Fa19B2C82a8400A5d477AEcD": "326549847392318780", + "0x60b36A8F90990704E15cadbC5211B38495BeE56E": "8236844078845836965", + "0x60b6C90Ee835207Fe0D82Fe7B782e8e58e70d77a": "5622491549631232820", + "0x60be406a0473eC36556BfFa3B7850a8a0Bb18ef2": "68493187540768623367", + "0x60c33CCFc3935b2a90AC8247012092CD46fa605C": "91997797539266999", + "0x60d5DA4FC785Dd1dA9c2dAF084B2D5ba478c8f8b": "13854401470778106026", + "0x60e13C6287f1Aef43b94BEC1D79ceF2494419bD4": "2340236756890530882", + "0x60fC79EC08C5386f030912f056dCA91dAEC3A488": "19756770191206951001", + "0x6102735109EF4aD6e57B153286c1D88832B43c01": "187707746121326170", + "0x6106E20130D24d1109e844339a8f4B70a8E04864": "19270746727402952104", + "0x61114Cd93c6a34fA3eD5fc439933c89a87191307": "1839308927291760842", + "0x612348CD2197D941B0AEfd2e133d3591B26997c1": "46235741548188910", + "0x6125e4cbfF60CAe95Ae629b5264A8368E41eBdD1": "280616815002917546569", + "0x613C601D7E9e3D2215Ba7eA5d839C6893442aEb7": "11172440792712837964", + "0x61409130B19b6abecE717959cFc213935311385A": "242230181890198939164", + "0x614e523255f68f1b1C2744042E236D002284cD83": "151090583584419067950", + "0x615C43EB9a8c0E3139C222E111A400e38b74b9cA": "8915647298809555473", + "0x615C7Ab2E36E5B7dfF3eF9E88243fD6dfC00dDa2": "10759358588974664470", + "0x615E57Bc80d6fa97AE21f459B7904b2DDd0193Af": "19558993335924582436", + "0x61648e0B146f2bf35E5AcabB8213260eC5daDd5c": "33563149853148472087", + "0x61742dF6f341F84c59c408d203e7BD38BE3B85B0": "360462726169417196431", + "0x61a1D9C77C67a8457220ca5A0ca7Fa410B5fE0eb": "7925979767025702339", + "0x61dF64A1a7ea979390D7ebd98D9f66fCAE2d402b": "9150538691143691504", + "0x6201a8bB8336e8aB8ed22947A2a894C6C7B7211C": "708527434388857941952", + "0x620429F58Ef17006a04BeDBBfa97Ee361Dd3953a": "1515567221353024873", + "0x621E458b29483373d7238d94C9c65ac09A8C1a48": "21913754335053364927", + "0x621c030B237c27EC9853B656e75859C0c54428D5": "16543483689857629718", + "0x6241563d91d6Bb40086c2604Ef049dfB147EE98c": "12256647783842917423", + "0x624372C0618CBA8EEa907BA17046Cb6160DcF8Bf": "216124477136940061754", + "0x6255E5d2b3f82e4025959C1a3e8F19FeFE087cC2": "10357031283872112997", + "0x6264B7F05fACAdAf24b71a96E1Df3f46a654b799": "21544962794522799927249", + "0x627EfACB0309EfFe01F2DBdd4978E302DE77325b": "10121529602563352718", + "0x6289071a919D25E5ae90754E851E6F8507108245": "15216851310325415026", + "0x629b1166064abc68a4eA392E37Cd4133103d7516": "1624297466625104420001785", + "0x629f7596Aa35ecDdb1Eb092995f38e7a4F65491e": "79351935172508561824", + "0x62A3D5E9bEED5375C3F144246D796028DC139662": "5913073433159943326", + "0x62A81b91BB2Bd824c4710aef111c93dC5a467d10": "32135625491040148546", + "0x62F25d0944a1B512a1d77e4dEde57F72FFC8ef25": "321881146719463771", + "0x62c65C3f534C20A42F9B4B6B4a4A386F6728D6Bd": "1411955940228633319", + "0x62d4971dB0133dAC13dF915Be1D11FB9d0909a8B": "11295401100673362153", + "0x62d87E42D8A0C77998327698F19Bd4aDa003dCEc": "6907312276785003177", + "0x62dE352d331528E8EA050D6975037641DbB601cd": "25610720930006957360", + "0x62ecCE30BaeF5071b4495DE97114A4FfDCB17DF6": "1640545099022509827", + "0x631C5e7Feb04384b7d2510D13b809aFbe481dCd3": "29314822654716315125", + "0x631c09f804c9aCFE892e482c29051B70E56184DC": "12747350745537378551", + "0x6324ecc9401C2ee8741f4A930D7AC11159D0a06F": "261215548938739333", + "0x632d12fcc51423ea35B955731629539A7562B1fB": "65176278803850674192", + "0x634868090524a468e9084C55cd7322c652B25B22": "5316723793515591898", + "0x634Ba0d78A5D81327990fd3815e3434de1B1dfbe": "58322252720026088553", + "0x634e7133Dc0C827A9cCa98715f63783BdCE241B1": "1456463503297163580", + "0x635A2FCe4CdF55832Ee49eE2a4B8CB753EfAd8a1": "129831721363855801892", + "0x635Beb5B2ddb79fdd3790e889Fed8921F6Be8884": "4205667152751474701", + "0x636CfbbE8922aCCD00f48E03acdc362D287B3822": "8758595563626165882", + "0x6388Ba7C385168878918C62E5D3DB042c5E7Bb3b": "11285565168433236282", + "0x63A826e6EE45c24061D09dD918dc24FCc6D11405": "13756451454983600446", + "0x63f59aD4427616A3e324075e76bEe6a2EdC627FD": "49567007032837299357", + "0x64053898703f05A9dA8c89309d68dC33657D9B7A": "22183954954772527218", + "0x6407b26dC65ADFCc692Be3dC53cceEF6Ea89d06b": "17561943412040751990", + "0x642B5a4872Eea5a5FB67121794eDd41D7D560Db2": "192034976596610772196", + "0x6430028bC463d570FD0B062C80B5f14aC8ED5882": "44913217875424042304", + "0x643Ac65Cd8c8aCD3fb5fC6d1534FdFc159295899": "7073280166048486232", + "0x6454364fb68E3fFf5DfB7C5Eae917007F635c539": "9441439641356907603", + "0x64C40dF0F9E45F128Ce2186c864a70F8E676F1b7": "4519172944730330224", + "0x64E997E165F949e8066f4ba3D3e4f3Bf849c3A23": "11328248054392243223", + "0x64a720514d3F9EE4814B7de235ec383f577e9998": "26273869153912738169", + "0x64b07802FB794c8e7519589E85ebF67Da10c9f0D": "964441607188297225", + "0x64f013748B04126458df5014F2644327982AEA0B": "8654695524519806258", + "0x651B6731eEe777c9e95acFEC173FD7Ea11c3E63B": "3032813910773078147", + "0x651D617bE940444dDE4764840b0696Df361B75Ce": "29513194824947711332", + "0x6537fA59742f5EE2Bcb3243E9448301792e72416": "8436927416858666769", + "0x653DE56f7bE946f240dD57d08079dE77A69993df": "14355121687634839282", + "0x6544df975cF58A0b2C9a361a8db2e00D338e10c1": "782431143151841890", + "0x655A04370810d3ECABdAf161F215ed2Af92B8524": "12533242173323849784", + "0x657BF0193Dbf8Ee6f3b8A33f5fFbD29536227763": "8958469059141063001", + "0x658373afBD0A81a7db1B536687fd505aB0316fE1": "3597888191571094638", + "0x65850a10c28db1903573579b77EAC0A761710D79": "12813932199119290856", + "0x659f2D2A3FE826E6F316E8dFCbce509787A4e724": "13064043772775650944", + "0x65Ea84bAFf276562AD3e70Ef39d635BeeE281F83": "11960332026924905884", + "0x65b202d07bF9E0f5Ace2b3E82275AF5F3FF2d16F": "279708906142496903015", + "0x65b7fd5374981476012Dfa521F72b6143B03Bdc7": "2359953645944713193", + "0x65c6DCF92f213Cad38d143254576D6Bfc4263dcF": "22603684107042154447", + "0x66117242DeA714c82027dC2040A3D00419C56877": "6506335150294782557", + "0x66186722847FF2373bd9496B97b1a35B8F3fbF4D": "41494443594919889775", + "0x663592c445CaF56D09beb6f480276F8f46C9654E": "2005097671261630801535", + "0x66740DB3ee28781d53A7cab15C1435CC1C29De13": "6573906923537239147", + "0x6689F093bA8d1270347a09F7D18323fa2f7a03Aa": "243190617363710617", + "0x66A76EF0FCAb61E8E9939ce4231F3dE1219aB568": "34732965049159763815", + "0x66B0500fF4B3a2b9cA9D44AA39A91De1C267446c": "29941824216865701992553", + "0x66B064b5fAc00EeB32cd6bce64BbF5Fd98581b08": "26898693952714978584", + "0x66D9077DF20c6663BaB50E14C11D7Fefb4296b35": "19883127598919098004", + "0x66E678F79498d934F4d4BEDEE496adeb9B6b2C34": "279013603971353064", + "0x66E81FeEa36764103b755144B161c70e75906535": "3226522835026252964688", + "0x66F0F68E5b93Fba873Ae63aaF3CF81854C86401F": "672320184907921325", + "0x66b19A1241FD54fE74dD8E40B7df8C419492e423": "8962867490852537772", + "0x66c9Ee2Da35880E274E38BB180649a85DA9269f1": "18615057319361547080", + "0x66d857893F0756Fa5Bbc2dDC1f125B58D611554C": "25168309643703850100", + "0x66fB1cD65b97fa40457b90b7d1ca6B92Cb64b32b": "5076004389339397360616", + "0x6714Ec981CD903283f24595E4814a0B906EAa46f": "13163066029424667863", + "0x6715fD4994379fF0b1bC3d0bD3d599f83e9Ec4Be": "5844044788249469439", + "0x671A9736eDE5E289c8C8Dc497c76BC68464a1A8b": "45474136487045249914", + "0x674419fE714d1d4bb8780Bd87F6bC9fEAbaB1175": "10853238937947793230", + "0x674873e9Cd001335bbe0c5365a029aED5c1D4e32": "420773463712975166439", + "0x675b674E788a357a4FFa0793458e1Fac022e28E3": "18067109411589426745", + "0x6774AF134A7d99bbB608B22bB461E2027d0cA33E": "16771785362251384947", + "0x6777529D538c57D6CC6d46DA4610758245470dAb": "10710858403440728506", + "0x6794471ebC084A4ca462C506AfEaBb93d9657c25": "14903069324034321072", + "0x679B4172E1698579d562D1d8b4774968305b80b2": "5227815834889240922", + "0x67A2aa766abb2DCAa2B417952FCC4897CF7d1F8a": "15861310200065555", + "0x67D00105A60F25a2F0BD66785197bAa8BA0b3175": "13655589520525374532", + "0x67D21ebD269d61Ef8cD9F0f3698869b3d818a4B5": "12700942774396988488516", + "0x67D4b18c9A8DBBDd1CEBC6BC75A7B81f5EA99Ee9": "18135628708082275919", + "0x67D6140FDa661346ad4785F35412aa43fA3224b1": "2797514556004451226", + "0x67E3Ace9Eb925F581630aFe8591cEAd564F40b63": "13816887123733399368", + "0x67a5d3bd8d8143D6cEbb833df0e6ff0Be039Df3F": "6197219234240005042330", + "0x67d832d19645a61442Fd7967F9Ec9Fe42bf271a6": "20446314021789431", + "0x67fB0c7f652E64BAf8aaa6ADca05D6190D311ffd": "9767669083614384607", + "0x6806924CD3f076C2274aBe62a42098a56bA61ae5": "7575066987876454245", + "0x6809c87c1352c521c5CD5DD66E85fE2B8b0d1885": "5284316387989805048", + "0x680cAAaE8933AFC5c20EC695449f2632BD1F51e4": "29650262535680455844", + "0x6823E17568a00589D886960345d15e21C6e08e1A": "17320896571734403664", + "0x683208f5BbBE3A0a524532B9cc6ef08A2063afD5": "238053747804609604675", + "0x68346273a95890FbEF7f375Aa6EA1E1F46955Ff5": "2595828761324439331", + "0x683537E4d326c5DFAaAA6Ef9dd9cf85EBb04971d": "112020396196612964", + "0x684f49bc1e04339d84F2370f14Dc1491A3B4F113": "14270264446574642350", + "0x6850997aD65122C121c06Fe41Bf51F07f3C0D5d2": "21661650316590076957", + "0x685338533F290b537d8EEB08D04c4F048E4e2F7f": "21988481102758059767", + "0x685c99E8780e5a7f158617cC2E9acc0e45a66120": "28899230579351397", + "0x685fbB97F53C25A534c2f391cd31120EadE4a7D2": "15107287067719056612", + "0x686EBc4Bf64447876C703bD74249bC4e5B55F864": "43384282596641699944", + "0x687528C008F78cC62EEd8F10665Cf0A62bd92C03": "20468279117295396629", + "0x687543E02bAdB81E0283D0f0A4F2BF7529497dA5": "117062935430035522", + "0x68E3be61bFEf95C40934fce8af9eF19DA238660A": "13817171944584871379", + "0x68E8697AB23d7C74568D95C09862b95869C70dc2": "10122179825014038473", + "0x68c86c8c540D10D52cC85b8B728bA633d8a35415": "22084405798719966309", + "0x68eD8C853d2BE4F704bae0b668761c4520F6893B": "7068338416071423268", + "0x68eedCc4A2C3a981ACb59635E99C0d78836c836c": "32030810457370677741", + "0x68f45af53cDF3BEE49aFc507B363bff30651e5Dd": "38543592331865444671", + "0x69040918a15d5f624951A1fB028D0a9c4855564c": "1104713457755383976", + "0x69085069861eA80D3B08C105EC4c1FC3A0c0F711": "25398120837793195568", + "0x69295FcaA1206ad5a7ac3285CFD823Afbbbf2D7e": "23964920499534945322", + "0x693125317Fde2a798e62c28711D31F7C2580031A": "35525462559615401727", + "0x6934E914558878995a5c03aC6f334DfF0bf173C1": "11114595828909690661", + "0x693cBE621883C45c16804E9583E9083150d1D53B": "53097128944170543046", + "0x694415aBDbc7C0bB9185632db67319CCC7379FB1": "15815324877184631900", + "0x69454F5CdD37fB7B8933dEc94b6B31747Eefd29b": "939475320477672655690", + "0x69662921fA0390D85D457C706E05BfCf333e050b": "31391574876325330080", + "0x698e2e006a902b17cd47F4769853FDBf7515D025": "8568305673804587622", + "0x6993C6228BbCF1000DBA83C08DA656a466249B7C": "6502351479327892035", + "0x69CFAFcA9c889D6Efc1ACc5651ce7A5ec6CdC231": "8353053661006668538782", + "0x69Ed24795649c23F9C13BFE317432fe0e679f1F6": "10589020264307184372738", + "0x69FfEeF5a889E95d5DDFdF3A0eD30d99fEA60EB6": "760208078205019765", + "0x69bF4f4d839cAfD5013D9c5E6E2Cf553eAf6Ce04": "16586129320906881816", + "0x69c17bA78Ee9645160b3AA8308F2858F1B40DDeE": "138982426968917655155", + "0x69c534de9e418B6e60004416fdf552ff43A066aF": "26089136134419821690", + "0x69fe7e2ac58659645f0b8828d3E5c7dd26510ec2": "1502682669304912428", + "0x6A704875fed8634Db5fDd5C8ae098a60A9FF4ABb": "21472914831660543725", + "0x6A7B5198fAE53175EbDBf473FE6267EE5C4b3c10": "20017452101193378004", + "0x6A9D63cBb02B6A7D5d09ce11D0a4b981Bb1A221d": "46404379396702979778", + "0x6AB6A7D15fDBb7CCE6D82919b022eA8516Bf0f01": "6097790135291360227", + "0x6AF478650Bd1767F016d4FFc14a8C9211979db61": "388332445487019129", + "0x6B1930550B6B1F2e25C370d58a5eA397A3feB598": "10892345769443488930", + "0x6B377b507f96478A62d66F613D1Bdd5dAe5934Ae": "43849780770536322062", + "0x6B692287c8136Ad93BaCc50F28AfF1475a841f6f": "245219224133796891", + "0x6B7FcE72A60c4E8A3d59E53f1d79B72E58e2b6C8": "4308598981542562675", + "0x6B908f111b8bd670B4dB6150c8017AfAfE7C8c9b": "24324727752451511002", + "0x6BC38AF8bdd6D01F7Fb14F7fAC412772975193Cb": "16579355360456462970", + "0x6BE74c503E6d55A73B249D99159b633710B7Bb0a": "58152340442086494747", + "0x6Bd0E7AB4Ef8543460858FA69A22e6cc4bADe8BB": "11964432222034188370", + "0x6C22C0600F69F195981319B67fCfcC3100245C5F": "78674262578531353089", + "0x6C457C7D67988f7ABb1073126ad8b5FadD51F5a5": "13670980496321270055", + "0x6C63F89876112e6C7F68e46d9347476E29d5098B": "465604308551498360572633", + "0x6CDA52FFc4467950072cA55F5307B184E905AE47": "15133360957738213766", + "0x6Ca0a273fBd2590c6028Bfd93E3db2bd1DB5e04A": "27610404370574467094", + "0x6Cc9B2dB62D4dA073b5d057F411C7650a429bbfC": "19452542161208006332", + "0x6D01Fe3091738365ECa370c43F2aB46db19C7862": "39074347821036459", + "0x6D03769720335fB8A3ABd64e39919D43CAdcdb2a": "1424184126598140428849", + "0x6D296B56760Ef6AaF5dE3A4C1a3216d01706A12d": "41442158405536490652", + "0x6D589Ae18Ab58a6a27e921753767136535BF5E38": "342561491447995378", + "0x6D5BAc8f966AA11ba42d7f67CD3773A5a8F23FC3": "27867870702071866786", + "0x6D6215ae48B29E4C06078bA7Dc9658FDB5974F7C": "18647455325551612096", + "0x6D728585Cc9Eb0E0A48FdE826E3277D8058a0B9e": "4832988974488753541", + "0x6D79a8396288Af8653c3b32Aec706C833b0c0F2F": "18895224493242141933", + "0x6D96Cca234d31820eF15d7e4fE1172F18D300910": "5431147650460748547", + "0x6DE6E901Bbefd26a9888798a25E4A49309D04CA9": "38435211867818865028004", + "0x6Db65261a4Fc3F88E60B7470e9b38Db0B22E785C": "507886256686706723702232", + "0x6Db77eE44688FC7E59FB005592B0a904D0AD4e9c": "588295500157010400520", + "0x6E197F6A971364d0b798246d8E9f748a622DA463": "21922175659816188429", + "0x6E40dC97A419b42490923677bbC803E55338c26e": "520700160887050641", + "0x6EC1ad5ff9e53362c9BD5b6e631724C970A73C15": "24782995206845478392310", + "0x6ED5443215eB5282001343cea5BbD2df463e5b89": "298464505085306107890", + "0x6F1951C85D25986715693290Ba7E1525353804d1": "3908848960551521315", + "0x6F1fCB77C93889731Ea5E88CFfB37D9263f8868e": "2059350947019043973", + "0x6F23F04c3C974A95bE93069daD95feaD6fffF633": "10740702608172049705", + "0x6F5Aa7eE7Fe8870834451Dc8a7B41beB8EdF7343": "427446497170178988", + "0x6FAC2BcCA1f5397BF2Bc96aA4aE8f35728882761": "7448853270372278770", + "0x6a41278687f2E431b034D209AE3c9DC16840f24F": "107572229904688741580", + "0x6a59ff65Dbf14788F74e2ea2503DE500FA99cBa0": "12297915579833801169", + "0x6a6388c71BFDAbd129cbee5763510Ea1bB96597b": "6951703452873849552", + "0x6a70405F93479399D5D645Cb8B80091865a7910D": "14072288195494552700", + "0x6a70f38d4C1f214D5da8E31a50023DC270d2F7C0": "46248333596589770039", + "0x6aA7d6937404D182022182AB61D59Cd9146E9BB5": "12113986248255863639", + "0x6aF6b7D075919F55b6046258dCFAF19423B680C6": "1728165429364473665322", + "0x6aa00cCC64f64600389AD0618BD4F68A4dA12cC9": "25892172049588847660", + "0x6b1e87bBdb05c25D3263365E7097eecaD9b29e12": "9780584851549902951", + "0x6b465Ff5Cd58F95e96e6d4eE518f3d89dAa5A993": "89976041799220739559", + "0x6b6C46e99ab66c37766492700E667DdAEc8C60b1": "5136733657258563513", + "0x6b6f5e6a8167d72ac8951aC89E9d490A63912945": "27299914698794629612", + "0x6b80D32565f796510dc378E357E82094590C44EA": "396907289031818338", + "0x6b8A474056b98186bD084171C5C7fc3f5733a3dF": "19422541652779775552", + "0x6b932d926723f2FeccA9Ae374216E4E25f00eeA8": "10136869986624273788", + "0x6b9Dd733Dd9c59D5Ff4ba44bA7e7DfAc34f353B9": "54342521118399141127", + "0x6bC47D6dBbB600153e66C580F68EF7b279E8E62C": "18496991056747412975", + "0x6bE4ACeDA674f55c9a8b794af8cCaEEEc79843c6": "45237933809820194203", + "0x6be8dDD04F97B7119f8cf351a4dA35541d223745": "19089837108715287512", + "0x6c210Fdc6B7e2CB1E3F7E3af2e711ac8CB631186": "14997931470751150984821", + "0x6c4527e7d419b3E2ff45CA88497817421C418888": "3934078795546768545", + "0x6c4595e365910dDE0a963D3C9760040C96766cB6": "36310015619403925", + "0x6c5C2245659B76948847471CEc05D6e9CD9e8b59": "29381360983783622", + "0x6c6144f0c836662CEE855505176BB5c78E475cfC": "3688897041865051369", + "0x6c635fB8e325AF5FD91aB9Fea8761447F6483eD4": "31812715391796678044", + "0x6c8A91070A88FD3E5907210C8d2E8c9e7ee3a2d4": "2020816021821048015", + "0x6cf16a1344A3F3619F9eb74DCdf6374ED76f698d": "27276632620353642097", + "0x6d033E0EDcA8557BF1453d0146E5f595f6607731": "11442582836726920588", + "0x6d685729a6a9f1373525f7A70159357f76dCf132": "36167679419150883348", + "0x6d7CE3FaB45bAbb1AB87823f1C273D53b3D8BdB8": "35548987490154391753348", + "0x6d8C13786d4b3C1D81B293D1B239f3b5876ECedF": "16346673389172314882", + "0x6dBE901d689f5481522663989F84B1416019815f": "108827216884580367217", + "0x6dE94e3563B59EcFe96A5efD9686Ee9149d0a805": "25301396972162451376", + "0x6da0c6A8889089c9e466BE8699992f19F0E18e3D": "24694216151225563950", + "0x6dbF65020E3aF3293e46C49591670f4BAdE9BbcF": "1632476052363530319", + "0x6e0fc82e76FF88c2538b033423Bb0A4d4E62f6F2": "22358092859814529847", + "0x6e1992b6A6CcBec909782B596B7F520f8Ac48dcC": "6808428744757507043", + "0x6e23D3Fa33Cf57213bc9818462d0355bc646B88B": "113570087622507653591", + "0x6e335FC3689Cfe14d131cD9A493cDd8fa568e342": "677789039545435016", + "0x6e3AA85dB95BBA36276a37ED93B12B7AB0782aFB": "838394647759769199823392", + "0x6e5d24aE19eE92413F60AB707f3972F82F836d93": "217121015830688672656", + "0x6e873918CfecC6156806753DEdEF212Dcb3f5B0D": "487903037916293201", + "0x6e8d08e21999118FE5BAFf65b90c0e138907329B": "10789766159729055559", + "0x6eE0298dfDFc8B3193B745A61570f0abE84Ae2dc": "17784297887116010875", + "0x6eF9eA526B6Bd64167E546A26467D7fA9894E77a": "40958303534674009017", + "0x6f0Daf6415AFD37813A595c5769b2f644f467d86": "1531375919845300738", + "0x6f226269635978130Cc9De17a61a2FE0915c60FB": "7523727923913695347", + "0x6f9b7D09530753fF1340Db1A0941337aCfBfbA32": "640871546251189764", + "0x6fACAD44e126f2CacDE44a0b2B85ce1B643495D1": "5846384355746204273", + "0x6fF644Cf255831C18885639F047cD6Aa2744B1C3": "11468800988563695483", + "0x6fc19FfA9147d9444ef08355d5B1eaC7cEAB6eab": "15824306702343018852", + "0x6ff8823EAB125c2518405BA983CA921Edd617b02": "1229068588194034892", + "0x7013E8051161C6F3509248f9D5C30E34a652b1A5": "26469549814606670488", + "0x70263CFE75cBa93E084354eb9F3996c04Bc3f7fa": "19346866698666030120", + "0x7032681AFeC27522a44C789BA1acf1899F8edE01": "17929322034745600946", + "0x7082b8DB61EfAB2f86413efDC8d4dD2E3AE5629D": "476472888225208798", + "0x7088E0A5De9D92a5e7992B8A8fa7aC709D70C72B": "30037383646274882851", + "0x708A83f1E6c01a52CB1C73c0591609c929Cdd37b": "6496043766950380706", + "0x708fc138A0Be886c1739f1808038EC302E94b9aF": "27466088223599666507", + "0x709Bd8326118f17dF9E31c2a9022f7108c0266Ce": "138412415528459368297", + "0x70A2487e8bCf493FC56d4E147099458E518B3e7E": "2468860409803886517986", + "0x70BcCa115BbFe0CEd96c672f2db987c5F71c8Db3": "9900568272697483281061", + "0x70EdEeD42bFdc40B1086dCBA64a04bDaB25E0255": "5242003456031288682", + "0x70F23dFB067f3178Be204fC0D570b270A7E13CCC": "25951226439301946258", + "0x70F8257A21a0061b629Fa9fe07e8eA35a26DDE22": "18770735620098291588", + "0x70e703ba15c43Aa6D043b8c29e60927E3b01df73": "7577135243035411161", + "0x71044B815005ADD2377edd8E365f3D463a2c523C": "25155829604690076908", + "0x71045Ba19efF82e45cb60F6e00182E450Fba92E5": "11064484074894871600", + "0x710F5D9242Dd3f5b45f1f2F920E77941121cbB1B": "351921811701960749", + "0x7113FBdc1c6EF083a72Ba152b446b10654E4e05e": "1248255773062886066172641", + "0x711d58d28c0d6755fA69277BFba3C2a2B0B1f570": "9242410368864957924", + "0x71228a10fbFba65B1985A93E50CFA7685Cccb640": "17026363742328096162", + "0x71338d3E67BdE7Bb6E4bbD044cAF43C685BF5b42": "1188132876565954255", + "0x71430e64707Ed415fe6082afDf9984F4a42c7207": "9368785242842706984", + "0x71444b663332Fa4eB5fd19D2c47A948bc6bbe3db": "181122146774402027", + "0x7149C24Aab90fE6758b86947Ca3415A77851Ba91": "126519755285277905221", + "0x714D65fE0BafeCf29Cb02f1DE32f67f0B5646A58": "20367296788587271396", + "0x7164d2a37E6650A6d76a0891cFB66c11Fb4CF8A1": "946425615259352378", + "0x7176d7f0cC30D61088e4cc17665EF9a0e21780F0": "352837235712247530", + "0x7179eD411c63ea4BA21568142E57f6cDa4568E12": "224150472292637850", + "0x7181abeC856Bcbc77cFCD8ee8C85392eA403a878": "11010776215845571328", + "0x718409bf0573dEc6B25b77F33457eCba32930849": "3354293026744019", + "0x71DEEF167c63E8e2E47D91f02cb60659A6e755EA": "5362563634248625160", + "0x71E738d4BCDE3aFC603591Adcb1baca115dEfCc7": "31087018839271501944", + "0x71Eb9ac198bb5aB29c8524d74F8F4D27DeAf58C1": "216941134414702607515", + "0x71F19d91079B30739f31D160De77Ed25FF6FA67D": "5770749693066780980", + "0x71F9CCd68bf1f5F9b571f509E0765A04ca4fFad2": "8232647735407611476581", + "0x71a4a57f9E85e51dBa78CFbdA6108C39F05B417B": "353927149189793083177", + "0x71aDa13C8B21c5A9921E3CD4C85678f8Db90dE35": "502821159062321084043", + "0x71cB52A7eb3030647a237cd9E3A3F4891f82dA31": "6717658852691144308", + "0x71eF592ce89225FF39A04588C532089331858a6d": "3345887750723765196", + "0x72283cF1939C6C5A01C21D6C2D1c545aFFB262B6": "24027858863903493193", + "0x72297606627B594832282EBf3089D3532227C6eb": "17270034993426731884", + "0x722f0a6F970F8B144F5e92aB3f3BeaFA280b282f": "2154802797167234548708649", + "0x726042904a5F79962C648a7cd0762D10434e7089": "152594680696110494", + "0x72740De7c82588959b633FBcC214673182511268": "8288676399052578088", + "0x72761C4b437255e80685Be359d161a47212652Ab": "36034430708787393159", + "0x728DCCbd2A75c9da4251A823308c18715e2ed378": "9134901778218156273", + "0x72DF944D03b47Ad706C98B54fEAD828179412aae": "325820690561739847", + "0x72De70Ad8BD911e5F5b7E83E30248092365F99CD": "15314069138165283828", + "0x72E42ae82969aA14C06Dd16252d2B5ab941952d4": "19908246721424597491", + "0x72E90434aD38EDd609D536dd4041D919B3Bd9F23": "42820725823162018858", + "0x72aE79A1FCbD4B21B23FE1048971fD2e83CAFcDB": "18151291000767487008", + "0x72d19ca4d89EC4D0e35404C2cE1F96E8A2e4f046": "5340650893357095614", + "0x72dC3E6a8Dd5a4Cf8cbeA7da47b75d2E963DF30F": "13098985459752602657", + "0x73110506F21605872Ff5607C421A9e928B05914b": "52273939864807712780785", + "0x732103e3aF96B2280298c4D33ac3EEF44e090BFD": "8775024212517564950", + "0x7336f733657fe7Ffc92E27fb19fD5A6aE4C0e0c2": "5485839400804346332249", + "0x73393d33760B0350c3ce64d63Fa3F5607e5030b8": "15382318969177504546", + "0x733a2235089dE52dFA82e239a5BC629908a3a9CD": "12163330825697812892", + "0x73455dF7D5469302F4E58418A8dD13b0c6ad3bB3": "567950307294230310362", + "0x734B33f59791264B88dcC00DDAFa1f785c49bA27": "1333789557643809938691", + "0x734E4950db43ca1ec852b78B0A978C2b4EAA3033": "7813845336817666551", + "0x734c71EBE1A7F634ebbe75F7e7A8418B7a16135C": "1976561198571516322", + "0x7355003Ff9C2072423C3DC07eCCb4a832232D25E": "14438581257898013704", + "0x73611954Db32fa97BaEc20821948F4b70FB578D1": "272904733286658068563", + "0x73663Cd951EDa2E596B8C87795DF3146F18D457A": "235549943156742869", + "0x73670040FE316CEC70Cb988b3405c2d65d35f026": "1986226437687346218", + "0x7368225720a446DE211d45f5c91E5b5162fAF065": "12638166159646961708", + "0x73690B38E13e3154Def117A72bd989b8bB13C872": "12922882663552702076", + "0x737eC579b7cdD3EE6c72A72378615C5b9cbABc89": "7026804639540594143506", + "0x73816E1049290512392F86Ae34A931DCD5faA55A": "259576940169439446", + "0x7383C405f2a29612B824D186A32383e2B2f1fC10": "30187838230778616028", + "0x7389B02F313f622CD017c911308221649F88ce3E": "123503663230171284473", + "0x738ABaBBfD31c443a00a5Cb2F0f2cAb9FDB6aae8": "26928867348482188353", + "0x739B39FC23F8d0576Aa97065b0BE45bd9Ae126E4": "4801911886069716997", + "0x73A00a5Ce469D611533fE1cdD4D338DA513f9f54": "6660062286178524496", + "0x73E674574e77bb55dA67b6F38AfA60F1CB010001": "5631396543172456522", + "0x73e3F075FB6c2c47b4327F2e665511690C5eC54B": "24364562488247808115", + "0x743305cd8f7194F1FE86Bdc956107B27148D8FdE": "6826844915236340663", + "0x74415F5C83A77A3410fC3e21e5E1A4b111216C51": "8962436804199475540", + "0x74416b049041De5B126daf12a72B955df79611AE": "219990951016324902", + "0x744588A051f38A9917CE5EFC764f133BD343Ff6b": "30260444161471192944", + "0x744EA28AD4e53887e32Ba5B85EeA2CeD7a6Bd985": "837803671553164839267", + "0x745cc119C2003309661F828D1C5b98B2CA675021": "69202237976043915", + "0x7464F8Cd8feA7FB557616E9579f5385cd55F0e6e": "29082688208381627587", + "0x746E179a6B0186B9839822CB14B8155DCce504e5": "14189753682017641395", + "0x7476D1e9659a49B92C3f65F0A6De00a18fc3D6fA": "15245372957311582430705", + "0x749Ca18faC94Aae354dabf1bcdb226e6FBd881bF": "12757616510213845213", + "0x74Bb4995D5F1302b55b14BF6c1Df9eB39e3F57Ce": "20665905605682338711", + "0x74CF14c1f87a05b55ee01e5053c6932d3aa692E0": "8990587339914219759", + "0x74Cf121b6B33579982e3bf18682DC65aB1aC4DEB": "23262738354739117630", + "0x74D57d696E492610246B2c6adDEB803fa2AF1916": "15522251152877508688", + "0x74F8dE3f4b6A32Ed2620cca2d799F68b3be2B478": "26563071957981508439", + "0x74f4e644e2dBc8d2610a4C0c2d4Ac6e91f81eECD": "8929262846207766790", + "0x75086316AE15b560186878cab2aEF4DB6b924285": "6020202820725099177", + "0x750Bc990527FBdDE33E810C2958aC9Df1A468420": "7283840842784579188", + "0x750Ea760b19f87DdE87492b69479a5b0a094B018": "2887924828160277555", + "0x75175d72D581f291D823be077390440fd597AAc8": "33983726136111820075", + "0x753C37Bf6a8a1B742De026C78cDe70781E599E49": "33846511992722067295", + "0x75547dbdE1370eE1Ff3128AdB5F28Fca196123De": "3018110152150446395", + "0x75606E47d604d0302BcaFeD30063Ba2030f7D9F7": "12097097412969536515", + "0x75B38FFb43e268C56B8AE03b3aAD7627E83A8516": "6829780093137818086", + "0x75F20b76f7709A3dfd548cFCF0278Bf56a3a4AA7": "9280086050546803263", + "0x75ff34788D83A44a8aA63Ffe1591f4883c44abDD": "104794521059095541657", + "0x76018D681f2aa6E4702cA91209995277F3649a3E": "62120751770857626969", + "0x762E00F1e88a7EE05bC2dA9f210F7A49Ba8e4648": "9283480676940618387", + "0x76363226b9E31b78C2077Ecea78F440D81299f39": "423929327377467074", + "0x764CC71Eb8A92bf8cA054Ad137f3d8Ffe2452a7d": "6928414600141994367", + "0x76577d91fb3c4781D80eF0d8725c015FC44E4CE2": "33031124653074397", + "0x766C0DceB9c36D9091E40960F9b6BbFA2dC73235": "71528898122077414207", + "0x76774a6BF17c93F855493E2E5D5E9291047c3DCc": "6825185121435110779354", + "0x7678B844B1F6C5D0AD898d470E1175CA66E41456": "3092541842591125578", + "0x7690Dd45d1333697B9A355CC1aaEB23dA14F8a23": "7020180957390347663", + "0x769FA8B9cB6D621086FcCDeBe79b1459e5049aed": "107324563035921104624", + "0x76BC4125c76d7b2ABca0A8E95bf6BD86B3cc12bb": "5368041456236356788", + "0x76C46A858841b56c7983249548C04b7046555293": "27578191331375497062", + "0x76CD4015fEd6AaF7b5508F25aDeCf220E7630AB1": "68147589343617787954", + "0x76Da9F88e63a85Ba8BFA19F3821D5A271753D3dc": "9944507014852008344", + "0x76c2CD1b8A249F465F8445c455CB78E0eeD36f1E": "28887873004009522015775", + "0x76d6E364117872f1Ab49FaC6F6CE10Ad1b802C80": "339857802451545027", + "0x76da9C3462491F07D0cE8933ab576eF68f9457f4": "757658354124337475", + "0x76e61ab5189eF089Bd6a54370b9463CEB714fe70": "6371839861027158045", + "0x76f69BEB20b08Ec309AF5176A23744700C6fB5F3": "16666681780068729007", + "0x76fe4DBEeB24c9C3375301eb6Cf9b48126Fb92dA": "10717271488901040121", + "0x770425B4b681E19A054649d924a5217C30aAcae2": "18863450052092694425", + "0x770A946298Ec492c7C87DcA186aD33eF5Dfa988E": "21800678994764275127", + "0x771c7Ce18276cD64e6002e44B80203ff231a0957": "851453815454224624", + "0x771da65cfA93C7802458B6946781845cF559f105": "8442378690806091647", + "0x7728F3D2416dC0C6b363362301adA72e98FF1956": "285188349264844104434", + "0x7729F688f4Fb00f2cdAdF3048840E100B53D081C": "4032770892893360584", + "0x7730412FB1E0db3B5fb15662663527AF995BFAcf": "13609887936585595159", + "0x774Ade1735D597f6999D3E5Cb84Cf45CCb69ba8D": "455945544428662124815", + "0x77619d9D3B26AaD2a8bD897985ff7F513169D5d1": "1918041385629214497", + "0x7761E502b2Cf1fF59C9C987CF9d0D563400B87Fd": "21509696934830031487", + "0x776425Cf3482190cD8B728F7870bDD0585b85d5d": "1309800443642399578220", + "0x776C0F8a067bAF37890cA2EBc0F7c16eD3562750": "8044779939622347676", + "0x777d269A232302d38F22cEC643eD9A1c1C311829": "12295849099034303448", + "0x77B718Ea1a07E9a33cf6F15dF7bA5004A63be1bc": "53644432075950140460", + "0x77Ee91b30413d599fE1c9aD747310F3e69611270": "13290150769855547582", + "0x780F8B45617d2e3b40C2A2DA4Ec8945aEa2A89d1": "978386948488024726", + "0x780afC327e12C89c1f41dBc3DFF0329e1b941F4a": "8747661279933449453", + "0x7852d40F2a8Ea6C219A91aea2249f5a3F70D4dA0": "27963641931610991837", + "0x7855664E8bec5d6675d2A2A0514F97B1788D3C79": "18574556586101676454", + "0x785bC2484a15dC9a8B644024FC142E8BCa1289Ae": "17903341870568591096", + "0x78781c43ef8b82538f4c8530532E083472f0669A": "28219827975253442442", + "0x787Bb058f4fa03A7f2750d0a2F8a451CDa515B13": "2717642970597248252", + "0x787f0A3B812D23e71EfFe5c366530524B99f092E": "173289033470519647105", + "0x7893cBC9e89245e0470fe3Ce9bb8bC3fb0bF27C3": "463394185037744687", + "0x78A1Af88ae6aE1d57731ef7AeBb1bF42c2BDC767": "24692747670127920154", + "0x78B8227c1B93a5dbeFA2623cEE1eeBA1B18a7760": "26746729155527536651", + "0x78a986A49ac60e4E180c307cCB8143AFEDe5Fbcb": "15456269844951417894", + "0x78e3BDa7bF9f77A9c1aeF4C33aFD796A1307034C": "5325359194512688130", + "0x78f32a27559170f9a005b319Ed53441b9e852158": "23633614097608989378", + "0x78fb160760976f2Cb4A57386Fa50edA1c8432F5B": "20730023274478047439", + "0x790AC5D567046154F9b52e3d47487137053c1150": "355446748774682297", + "0x790a387412D410Cf7A184EA8cd162B116aAF0194": "6892637832987097311", + "0x791C60500AAC5ef9aA6d54FB4E8B8d030C63D2AC": "10860335659983242395", + "0x7926545bEa087c5F68082448aD6aa38302a4DBc7": "90418378737905049110", + "0x7937f3D3dFAaD801005144Ef311D02F28f7c0329": "5700245703485661641", + "0x79852a2B8386587DaaD501d90674996Dd19d88c9": "526044201464370767495", + "0x799FCc02FD4Eb0a11bc011eA3be0498d87fEDEE5": "32585782976473724190", + "0x79D1518b9c62109671Bf835F07fb73D69042fF11": "19553210942806643323", + "0x79E83F1a8BD5abECC23198758D2d9dBCDB5E9E2B": "227875816187711981211", + "0x79a555B77F09C3de481C4b412c14C25Ea78C79b5": "2955974022741228383", + "0x79cd88A44e7eC0Fff10A1F1B4b94378Bf072Ed48": "3582947737592831902", + "0x79dD11Ee6b3970dd46a333fF03c9Fa775680Ae7d": "87057985590445592418", + "0x79e94D515b656565ae72E0EE74390df484DaA0da": "9393292106220359744", + "0x79f6B113c2d420F4AfE12b25D2a8eA392B2BE45B": "29766084860599944119", + "0x7A47e9ec2499530BE78d9009009E215C95b25F9A": "22662541347101881818", + "0x7A5684cc85F9938522e87Eb93afc26177A82CDA8": "66516341257648951831", + "0x7A5cdd294D6064E7B23f27649a21f0997D3bC286": "22982858507286520642", + "0x7AD456d9efcEd426fe6a9c6F70e32ac83438Ae8E": "54661724061010440123", + "0x7Ab4A0973047e2a17AEDe3a96D1529F8eaf24dDF": "764265832973338926", + "0x7Ac294769e77014FfBdCFe25a3DEbBE9286036a0": "4812610008286343757", + "0x7Ac55B39EF52df3CdA2e6189965F60802a501Db3": "19298098327002894813", + "0x7Ae14df87c7f733f34439B71C3bEc097f2de43c8": "9642421902280136937", + "0x7AeE7539CA3393a5A26F000DFB8A4bd66FD75deB": "19640420418026321718", + "0x7B0507E0b2Feb81B3fd618Ac13e85C3f1980738A": "19206536643102231724919", + "0x7B06E0c9146023F9366711A21C888D7c73D84837": "1818245707880076350", + "0x7B7D3b27063a7ccF9F1c35c69C605076ACF12ada": "18503971761304609238", + "0x7B8F03c4178e0e0CBa208e62E563Fffa295C7CAd": "16217064938918322530", + "0x7C0A4877EF32D01679D1BD1181AB227037Ff5b29": "22851401894060869941", + "0x7C78396CF643d2B3Bf1f09C5E8EACDF78182d741": "8031741352911036593", + "0x7CA5F05beA3BebeefAdAFD0E55684Bcc62AbAAE4": "3739915360591477599", + "0x7CDAb4991d45f7a39E0Ea502f29b29f92bC19Cc2": "4577961085115193331", + "0x7CeBa9B588376E4D4733F1d657366fDB640C949e": "20777987673371530189", + "0x7D03D14d589257E93D091b67A64450fB4f6261f1": "2441830402008050270", + "0x7D2E10A52eB243e87e98648b89E09FC37B473779": "1051535944430165416183", + "0x7D62432743FE3d5cfC6c40979dc3E72377CE68AE": "18983956296072373829", + "0x7D6BCc72533122105A5f5131A5e99cc998208ff8": "190822625557590293", + "0x7D7256b512C6b14Dbb469d84cF285514b5150a1e": "26834734879488050093", + "0x7D9283C677c5a5CACFa94Ce505531F14D7e29fa2": "6226351028654920062", + "0x7Da252e0b4A3Ed36f300F864855ebfceA477Aaa3": "72670638379083839606", + "0x7E005f46ee8d6f43eAE60D95Ee47FF3A0e61d3b5": "11763715610144648122", + "0x7E215eEcEA18Bb1aDACF2C00dF6c61f9ab5457f9": "16064836663908251186", + "0x7E2913746Ce064661CF443BA4Fe192bC19217d5D": "12793720266107988284", + "0x7E7Cd3fe7D0B7c507e1Cc86e1F65A42515FA3312": "26528065552647222319", + "0x7E8e66E8834F762077dEeC97F792d83092EBE431": "15463149162822222625", + "0x7EB60e34BbE1beA300411Ff9A4Ce2e654C70561D": "296030045312776520", + "0x7Eaa799A2D28cb3420B51228d08905ffba7Da669": "32324263160119063185", + "0x7Eea6aE729caABae541B93f3CA023cC7DE89B826": "5686356811535265", + "0x7F671DFF0f7676f7a530Dab5b97f77AA50BBdF8E": "14753194406998510241", + "0x7F6A2F68e3f16b363ab65E07594e9A352851E759": "5886500133556150868", + "0x7F82e84C2021a311131e894ceFf475047deD4673": "22731115808121120409", + "0x7F8F1A3886d878E71849b9Cdbbd1b34f2Bc63b97": "53178989008461544826", + "0x7Fb653f2F5A3ffa425F8e9A9efdFF6778217ae26": "25187104680821657", + "0x7a0757E759B6331BDc5561d69a99f214572C7941": "9209635864897629762", + "0x7a0CE9B72ab0E8C55f3E088d2A6f57863b06cdE0": "12556558136791337349", + "0x7a0dff2a955B72159650300a9aCeF97146dd12e6": "25416566742082781949707", + "0x7a29f4cB4A33BF3dd1F550BE8c54643eCa0feC9b": "111915753058935584232", + "0x7aABBD7cBaF3548779E89E4F2dFD9591592C8D86": "22274884915886263988", + "0x7b14F838CC764e3dB7C64a913892cE65AE91B0FF": "5440102235919546808", + "0x7b235FB407dA3178F12262d40f8b6EfBe6Ecf432": "21023446132463564685", + "0x7b86b623bCEEaBFF09F5D48e84f8D1a5CBAcDfC6": "8457555870369309938238", + "0x7b9E708F20deaf3B5FcC82Bf925307d342C9922E": "39367223078178655042", + "0x7ba4caAeb923a7Fd97f2F27526a532F7edE01fcd": "17070827263581995878", + "0x7bb02Af4C2908ccf7efEE5D33667214E297754b8": "7984027974286183518", + "0x7be4dab3a583dEdf45faBe3fd22043830C4F47bF": "27757438877435300950", + "0x7c0Ba2def0903FB05C1FB16a7287586B16D8ae6a": "979829783832762875", + "0x7c2cdDb92480E1c104F882516E94A13d1a7a9d96": "251041020643335378", + "0x7c3bf2cdD3b465f540de36eDeECF899c6A80eB50": "35482032204434394", + "0x7c658C3B6d41cbEE6c9868CB444456Ae7ca6d7De": "10044296296218844519", + "0x7c74F84ab9d211b0aD306fd793c593B744135c49": "24532237643788014009", + "0x7cF59c7488Ef93c45bbaEF98afAe545f1B4FEF6d": "281940089623085932382821", + "0x7cFAD772B4310e5FAB66Ff4b283E73672E82ad25": "89435814391368518630", + "0x7ce6a0709465Fea758B7Ff1De924fAB9e5B65229": "35310834474481873251", + "0x7d297CE9597c89f211F5A742361452E0D1806Aa3": "11119388736110943484", + "0x7d2bfBf593018572f8b03806Ff729BeA5321fefc": "8924764894652490942", + "0x7d36C503B281aFCE2b74fD555875fd09A8bAe162": "29381819170897497109", + "0x7d4256C3e7c43a081CDA314ee072Cf26F6788788": "25788852217223892291", + "0x7d54cC64ba1dDc6db7e939D493Fe672472477Aa1": "6297095662567555363", + "0x7d6F24eC50Ec8E149CC256154c4E50c29b5f708E": "19767792662881370767", + "0x7d7866db38ac3b4a8A0603B045ff926534282085": "13367594017926819068", + "0x7d88725A64FD23882DCa5187FEf054D2Af460708": "18859119589600071910", + "0x7e29f30d2Bc86993dF6E0821027B8db667730088": "8068429106366625751", + "0x7e2a8227D91da5457b3712A19363cd6abcD17449": "7749821074757502954", + "0x7e439FDd495E44FEEb17956Ad9F44B23BE0416Fc": "69652301263481672759", + "0x7e43FC2Fb35Fa2b0A1f8fD4ebD2bD9cC3fC40329": "12023006142676927429", + "0x7e5260d3dF00287CFEe9b2e6aa1b0E2AC28A3bC6": "3845700893099409079", + "0x7e8685bE9FA5BDc3214654e4eFA7D1D23035C7b5": "5253370232368912995", + "0x7eA883C20882989792746f563D784eF051a229eA": "38052346770164959061", + "0x7eB12f04Effc4901D7520E4eBd62dE512743feCa": "780393097918903842", + "0x7eB6748425012Ec162576481F41924b59AA5b6d2": "15889926042008252499", + "0x7eb0bd9E153EF897A359ab0ef136e6AD9b9C706a": "90922414220802634148", + "0x7ebfb4537708D613d263578c0e34B559e8bc990b": "15292090258415809", + "0x7eeBC6C45f4Bf8Dc5a5FDC8b3915b375DFB1030E": "100360042098592754666", + "0x7f2605B7031a81D43c5Ca626C48da0c6B83b3d8F": "12842322404014026693", + "0x7fb0a5fd38C2912Bf159c223a3371b640547a6d2": "46745285363435675545", + "0x8011acAE4B3cB8209267bFc70b963EA0e7eAc7a7": "1397066431320901246", + "0x801Ee58d1743348D3a58BD299E90bA0367eC17d7": "3991703106333047004", + "0x8033562521FedEcDCc05487303522375597f9094": "6936704199631277352", + "0x80440238719B67BFE91dc510a33851A751dBbF59": "34553356346417969333", + "0x80450192c233A7E505774decC2c9f291ee794BC7": "22823554082669501110", + "0x8058B61B811377402e955CaB591f346CE8167dA4": "54047099042472372630", + "0x80C8BdE5a407eE738c14888409c0F146Ac5b80D5": "8449290654175801268", + "0x80D7A24BbFc03cEbD2664c7fbD79d67DeB028Af6": "24818627308563937397", + "0x80F2178bFAfbC8d3685F081b06E99e6a5B2023Fa": "10866848411202240854", + "0x80F5771E0d30d57129d6b8957964584b0cB2C70B": "6026368104201052296", + "0x80FCa000875c546fE408181e0A848A74e7Fab9Ae": "28701236533890810404", + "0x80b26dB6Eb3E37effD4C12a32f3460aCDacF704C": "13545711381296028513", + "0x80f9EEeCfd4DD35a330ea9d556028B3DF673867e": "19361156552531391883", + "0x8102a17654E8FC47724B918c08974c6384CfeF7b": "15468861081027597258", + "0x8106FFB3d563C06c23bA1BcAf5e2Fd2adaCf5685": "9520142209403320384", + "0x8117d6A5337aD722214071FFD1D38bD76bAf70a2": "420247914489538657", + "0x81262F44581600Aef0dB3a3D9B99dca57f846B22": "80431883412573011966", + "0x8133A5DCbA30387E88B8Dd3B782797ae00DefCc0": "9345845019705272894", + "0x81402DFe1f132a9E440813C2ae15981397aAa404": "5843613556289083140", + "0x8149DC18D39FDBa137E43C871e7801E7CF566D41": "5476262743837782136", + "0x815612815D7fB01B1E8a97fe4A0996e77245A3Aa": "763125862561003114621", + "0x8162DF0e38d724A20CD03126D69a57B349d21cbD": "13335345564444045605", + "0x816719928E3ce20fBfF5BdC4A09dC6f0473B7057": "623259403181205851", + "0x81762ba1237f4cf338805b9bCA640c44F7d96633": "13456588674165874921", + "0x818269A1FdEe562F1A0E264445097a6b499b5B06": "24380708595990833949", + "0x818662778E0bF8D3929967026830926E2993e004": "7034745919689718283", + "0x81B47C0803e94768Bdb05B9b00B18D609579DCcb": "2327464382487610809", + "0x81CF4F65C732089ECE79C7871681442522e1a3b3": "256909022036803940", + "0x81D540535f871cd97A27227f9Ca19826d3026736": "13397700536221909151", + "0x81D98c8fdA0410ee3e9D7586cB949cD19FA4cf38": "2942763930781986036", + "0x81aC8e15c036525D61719e132b3895f10C145258": "6666218706738457499", + "0x8204F5956bAe24291a8b6570EEd1B7685Aa41c12": "26975717823196848234", + "0x820803ba68e40B3d770496fC9EF2F1d33C7d2EE3": "692081761879712927670", + "0x82083f93A73de474f49d254d1C618cb9331F61bF": "100872113313527416898", + "0x8220b78606Da668Ec452f3fDb0389e5DFe209a76": "24496635372801960144", + "0x822489cBF5EB7D6C08aEFF8dF36216c1Cb942362": "21365014642533216060", + "0x8225352c962344379c541edCAa007C622baaF9DA": "2771318200044986041972", + "0x82261dA9de775E5BB41A2654e5097C7e0E749A4b": "807202593635905332", + "0x822cd8C02C182dFEb34d6f3E29000B834426B79d": "42299736647223603427", + "0x82534E59F5EAAdE45bdF21c74aF64e805c612953": "22480501297299034791", + "0x8257E1362c4914c744bA081FcdD844D253192A56": "2426229119230351241", + "0x82637d3Bd84F5E255a989ED0e6763A2EF04946c0": "56445574461694723314", + "0x826B97a3773CA3AB5488ccBC90aB14fC5336da51": "6575467964997355431", + "0x827FcCD0e3fDD837478608E86ecF98279CCD9Dbb": "834709707919948163", + "0x827e5D1042561A923F151a794763ACA6Cf9A6BdC": "42083712499982425916", + "0x828e283C249a4462707F258074D6535CE9d0fe6f": "4682067847451755891633", + "0x829245beA27FFC56cFB36874996183C3C7ecC0F0": "2527391145449318962", + "0x829c66804F6D94360EfF112CD1ECaE0972d736ea": "2718628073811825031", + "0x82AF599aE8a62842dA38be6E5d4b14cD5882bddb": "14850554229203819916", + "0x82BA248DacD2091F82eBCeb19A538082725D88b9": "21985644495228577875", + "0x82C3A2783E645035FF4269cD7251e8889974172d": "15738357078836805842", + "0x82D99d98115565d2A58e99fC53704CEe56e3C0De": "2127544808278353678", + "0x82F053f3c76f1b3afd00bD485958b53Ab39fF915": "5491013434899425426", + "0x82c42D62776C0087619eE5d9C0b4Fc953196Ef22": "1407443815023673553", + "0x8306D7B380AdA3F71b1d0B53b39F9d8319C08832": "371068029086435301", + "0x8308E128c5e32c53fAAd09Df95af7D9D33F27D17": "302208901091861547608", + "0x832480aa3b0e323222bFDecBE795acc007D93B7b": "11924947792964396424", + "0x832cB06491a4b625c11AE763779eB238Eace3acD": "6506523000135521043", + "0x834bc57eE60AbD149473D455991013C83889B049": "12091960723068517697", + "0x835ec5ba059F2aA140912AD288FcE4c8618CC049": "626937135752702769", + "0x8362CDBA714b8796Bec180F17bF84a5438889926": "28441294721305359090", + "0x836d21C8C62df5bC4803DB955dF4c29Df9C9C88B": "229180356121861025", + "0x83795Db5fB4507d22Db610Fe078BD12D3c55Ea05": "8048068329320248512", + "0x83B4967679Ba5c184f5a8eabc071783d40848856": "18877109516338336383", + "0x83d21eF6F048433Dab353cC07312Db0cB327b46F": "20338318779864283062", + "0x83f03902E6CD5CFc5fB9a6F3aE48265237563d82": "23572685904850536942", + "0x841E66fF97C3a1EBD6b8b9CF8100b68Cd56e0539": "24935950894585821440", + "0x84213924548E61a9a79DA27ADB679Ff94989aCAB": "15094502174969362898", + "0x8437e611491123B6c7E165bC3c6a6F005d1D3D7e": "9845439852528009849", + "0x843A8675028C91AEf9465D374b1e6eCb3B931b3a": "6139414707402197310", + "0x84562bbCAD9F0ae73AcE0D983C9FC8775e3490FB": "713943305999039047", + "0x84581843A7996C6963e22878bda45b9E6b7c0Cac": "33438411074584520935", + "0x84613F247AA38bffb08d2794f017C6985B44f870": "34340181485732981012", + "0x8471f499dEC9b270Dc05516F18cF338d47B1775A": "12669079401665185527", + "0x84788abFe3c785a1daB5F81e35e9eAEB943208a7": "3801043967768723183", + "0x847BB5881d7bf08B3590c1D3ffD7f4eD468d00AF": "19151173457471509959", + "0x847d7c18e77179d0bAF0226d9863E4d525bdE76d": "15109097014825870736", + "0x8486857F62EAA18A73f4F9f3Ec8D454FB997e2E7": "8289724641428157203", + "0x8495773Eb82f656FC4e5729Dc37934e80f212d29": "1028770482388892404", + "0x8496A90040Cd99F99faE94f7D467c6f669ca4570": "574293976306962715", + "0x849bB816Ea4AF883c43Ca10763D8E49D204f31a4": "20022509608441993131", + "0x84A6249A0a22320E94b81A517C1b1df7748baa0d": "52265000081662708813", + "0x84E1ECd04486b510AeCedB05224c02d52A20e554": "58392780426311933964", + "0x84F44B44702eCBC645057BC188a1AEf81690BcA8": "10219672735974488671", + "0x84f918BA377cbd0385B4Ef28F6b2b6d7E9B54a4B": "12453095079145219231", + "0x84fA5541fa429Bde1c4f00580Cc64FE9f43f287f": "6249344400040814112", + "0x85317956A1A6D1DAcA55b143a49aD8bE6acFc248": "6329689223000703605", + "0x85399353400C5B67fD6eE53B1d2cd183bAE7dDdb": "150181006834471692921", + "0x8568A12B39fdAe1Eb97c79D3693792b592383ceb": "7649236516259220356", + "0x856a4CB93c07b55Fe8aA9cCad884fb7e05b6a518": "35490074949096762018", + "0x85754bF2920037514932011CB4774987D435D6ed": "22033481108904978517", + "0x8577B84527ced5d2D9F299DC6027A9e049C17d6c": "11026056368400348587065", + "0x85AfCc279Cb7C97d7Cd0071c4770dd53cE7cEddf": "21851399592281807499", + "0x85D95F532Cb0c58143388393EF9e7B2f37394799": "133016255604539931974", + "0x85DAB902Ad41f43D323e719f98636Aa86db3115C": "29606714919440414246", + "0x85a54ebf13D09400328742734B85F4f4Ab7096d4": "4015477975199490300", + "0x85b2F21B858d90463FEa30d9509679F05BcD2665": "6106456379290430856", + "0x8607a7D180de23645Db594D90621d837749408d5": "177448118558338393419782", + "0x862aED8855896c902E6BA8cB160741C4F847b08B": "12868460988547548294", + "0x863A5b0Ca834296670ae2cDf91C2FE5360AB17C0": "631446316991019568", + "0x863c561909561503B7cE1B21d579cA11370458e3": "8992920131358299685", + "0x863cddA455914408fC078f116Cac40D492c53546": "300749554443628819806", + "0x8673274ccEB664574B737E41eF6934de03c243C2": "24146264266062346779", + "0x86807c8102853Da580dd944C4476f4Fd4eeDA2C0": "4641393608120", + "0x868fB2fFCB74111a27c86fbA78b9EA8AF8867a0F": "93207036697739537595", + "0x86C5EC518B800D2F644583AdfE46B4241C01e96c": "54430017020911219984", + "0x86a779f6B7e0a351c30b299c73f91A6866c9F751": "1244682803823450310", + "0x86c38963E837b6C977D6E4a5A78B5836F985ff36": "362974501434396347486211", + "0x870A9AfFe4e8AB81c9B2D23F8600d3bdF9D07cfD": "9613109533628290316", + "0x870E70E74a459fe4aD7714D77101593a788E17c3": "115593386028702480049", + "0x8711aE1F332541209bC6109c2E7B9Ae4a6C37E28": "17327822446828245221", + "0x8715Ed8C054acd665E1A086EaF363d628fdC7661": "31351126001960118897", + "0x87291FF55DDaA05E6aa6A94316d8117240fAB5C9": "13826855680138099320", + "0x872aFA060093E1ec08ABe9311aD23569d396ad41": "25911922740786", + "0x872d922868D1d252972dbc1f466dA28a65042F0E": "1217094324950862631", + "0x8736106b8142011b5D76568f82f496eBC2aF8B5D": "11851609530927196883", + "0x87418e31632bEd2F1A67d5637799e0fb2458A437": "5532665122270110764783", + "0x87430f80f12ce92eaADD51D26e26dA71F4dCa41e": "613203096112789560", + "0x877b5E1B890871369B31d20E0034E6e795bE1cC2": "1097315313141208966000", + "0x878AE67551A1Def7c9C535d71b6FB1Ba16711EA4": "26407843237108705205", + "0x8795499824D8C1C38bbA26e9Af0F6DC4D4D99203": "8120205414673847467", + "0x87A2314aC28a2fc68e11dCd9086AD831B3e57E76": "6679375348148776587", + "0x87E3c611Af31104EAf0a1c349Da84d63fB7fe26c": "1184508816879295925", + "0x87b9A3C47dE06C38fA4fBD58099acc612b34d309": "37510431078583852636", + "0x87efC7F789092d883cc501E073Fc9dD038292539": "5298758958904575262", + "0x87fC1313880d579039aC48dB8B25428ed5F33C4a": "81342079917947792175", + "0x8805Ec5E90d9801382533551A009aCcf0fffebA6": "5435568698570679560", + "0x88229D404750b5b31c09D3993A453Dca354c3289": "151676200475265556", + "0x88377e66d68894747Ac7CA88aEacB233e91625fD": "7971251296267838503", + "0x883e5BEF307B99fBa45335a612A40bC3D5A8b9C3": "11703708638869684258", + "0x884cbFFD05E8ff75379dDD71fA74b747D251B67c": "28863584309768902", + "0x884d6fA3A4B349880486aD4D7C833cA968c785d8": "13513763857026125270", + "0x88502AD3A70AB4F1e17Da1f86Aa419D147cd33bA": "698050714473086611482", + "0x88594d5F3590ef655fCbFa7be597AdEde84dAe23": "39026579844389674825", + "0x885A0EB3f3eAF5D645c4E6F8C7a17691c164Afc6": "10468263705500019064", + "0x886e4Ce9b524Bd3352838b7aE0b80ecf457db80e": "3209046607105727251", + "0x888412fe22910Ad8aF968FEF0Ea9E9A92689b54b": "28531739229681248764636", + "0x8887852b62d5496ed0EDefA5335C18Cc41B633bF": "6283486998479668074", + "0x889B88Cd64Cf2857c8713F66faEB235b8AE31404": "52875619491185305244", + "0x88B0c8BfFE54793df1fcc450bFEb955d97f035Dc": "6391481695389403830", + "0x88F91bDa415526c675E8f33B73469dccB3F782f0": "8507073792918790152", + "0x88e07B18F4934DeDA4E01Ff3678F290F34Fd8Fdc": "220273886678847489", + "0x88e1196969798Bd5126D30b1EB81bF59E692df7d": "13063840715585408584", + "0x891D4F0d6f5232Dec42af5266Bc4f9BeCBEAD690": "54831983120150333901", + "0x891F1D4DD7d4B3Bf1Be6a3AFCB5bBAADbea6320D": "65935345077020702007", + "0x893469Ff12E4576dEF87A6918e34fAC2eD497a72": "413405043361702930", + "0x8934F9f163Cf8D955bd9316f108a2f11Ab9DF6F2": "25395658143443619713", + "0x8955CD4ba95dfaF0E759ca0B573b42013Ea0e697": "13141729101572083530", + "0x8989759B3e23511214ac89be112F4EB52cb6db3c": "38214869847978209599", + "0x8991E0067e002a40B1576F1C9826D2AE20FaB6F5": "7168974359523347635", + "0x89EDe81dB6D94F06CE0110003f6E05A207B38b2d": "200197037994936993", + "0x89FEFA96ed47A1Ec332c9AC89A67d0e0bd42a8Db": "20861766700596877983", + "0x89f32D0e5D5aCcc085A519879ea987bFE1F4E435": "353557707135163801", + "0x8A043E2bA1e23ff9E74282CAc0c5E36839d56E13": "13352406797333338133", + "0x8A496F14Ad5E2135bF173f0eB410fbf765662C7C": "7035432483805987006", + "0x8A93d3871ec740a365D67802523F2e3c5dB37b98": "1995164217847833457071", + "0x8A95E67ba082fc397447663c7C4C0bF8d92f6398": "15698205866047221281", + "0x8AABFFFcb2798EBD0d305cbccce4b36B9205C3c2": "39940715391646382238", + "0x8AE145E82Dd70B05683B4716D6234E43B2C1a91d": "9317768733054257555", + "0x8Ab5E2018a28C4daE4f33DF10073E8f25394C604": "1037357821545221765", + "0x8B026927A8b78097Cf8c8ad36e1e1FB59DeF87D6": "430915224620790874", + "0x8B17A65EF8b603af26c3A80401d997f5720Fe3E1": "6971929354729786196", + "0x8B5454f2cFc20ab3f9D0F4A01f4BcF53Fa3cEF73": "1737952557963500136360", + "0x8B7B8556E3e682e3612992ABc21A36Bc0f2049ec": "6194249497020071718", + "0x8BBd5A7bbe651B56D61eB15d0BAc40182F4bb8CD": "18442235111012301353", + "0x8BBf56B50D3A38D419F51aE31e9297D1FAe1FCf8": "12868460659721297621", + "0x8BC4eC82aE041636f4201027FEb08F250b5DddFC": "24614614242408256716", + "0x8BbDd1E13Fd103D6511CffB2CDb63463f37a1d74": "147365850876059249231", + "0x8C42874173b51674a9e4C18998Fa6B86070Ea2da": "6210214127074888033", + "0x8C5165EB43590Adfd2b530F12ed02c5C5Dd268c2": "5345904453501265375", + "0x8C5A441b92C2060998039901ecec125C952CF4E8": "12453015633021823637", + "0x8Cf076b61855910A1d21D4f0fC42E9Db13f3178F": "25652289273235652118", + "0x8D0084c1452E8C66D0b49836E24422F370432adB": "14822945001695540158", + "0x8D2AA20D3A7CE62430Df1eF34D0D61f6F5f87DB8": "7176680795217636409", + "0x8D524a5d69649EfC83c8Ce7Fe07D600158cf36D5": "5029904629247305973", + "0x8D66Db28f145A579434EF7A5fac32e0AcEc4238a": "8291996761359711565", + "0x8D97d6dCAFB3fEFf78505bb368C790CcA4926b3F": "694738031765290893", + "0x8DEF2d5feB416Fc8Dd5EBA79f03184cE5A576e47": "18574518402712857476", + "0x8DF33A75e5Cc9D71DB97fB1248CC8BDac316FE09": "652390618113038738691", + "0x8Db0E7f8ccB0f1e1447c8af874AfC338F94C2B82": "26618154373195421914", + "0x8Db89388FA485c6b85074140B865C946Dc23f652": "8485954621921454383", + "0x8E3f1Af22FCe63DD30F434F2AdA85BB20d3c3379": "27540269809776896463", + "0x8E5dD9d1A6FeE2f422D2FeECC99310B8D0b211AF": "5290486380106756283", + "0x8E7B1bD6032C27417bC0E212091cc17D677A1F6b": "970116161055671715484", + "0x8E97feFC425cd271e232967f0e5BEDd0cD0B00E8": "31198682075234227482", + "0x8EC6E73A2fA9959BE35975178eEeaa20B5B71a94": "432852992568220367340", + "0x8EeBff196d8A9126eebB4F84655FaA2eaBDae66c": "15350867691221556897", + "0x8F14e827dACF43CE47F4E3Ea2bE7e391dB30187f": "12246044462929692572", + "0x8F17B638A1dAC1D683BEA5C6aA267143cf593925": "187661237899489364507", + "0x8F2E18Ed89B0F2aF9B3BC5D07212868ECf6AAfF6": "15060904383743689627", + "0x8F305F9e6209250Ea732b02d3B2df0b522a88636": "6653351615811705042", + "0x8F68b09B195E8258Da73Eb90269c9653D5633e6e": "13266002206072571224", + "0x8F9E06B8A60FC2962Ee201a928db8aa95364F193": "20256546157014017969", + "0x8FB7873652dC1Ca2D9b29bdDb7F5A1Cfe47cAABB": "8651806363190164664", + "0x8FC32f2ab3de2a24544D6C3b7A9D6C6Ef6e6561C": "38703658328848401110", + "0x8a2DC42dE052c149B990201Bce266aCd81e804D0": "2810868367178495291", + "0x8a600d441cA50613DC4bb66bf6D8283740AFcF71": "28879933370571104472", + "0x8a83716acd66D9e1fb18c9b79540B72E04f80aC0": "11365187250336629293200", + "0x8a9de03473c24594591c73E8b34Ac123C42695f9": "23516659385829600560", + "0x8aFd8c12e16311ba456582c2B511D9c401bEe735": "5584091035295301789", + "0x8b3468eB2388d9510fb41918E6c9CBE0B57Ab75d": "20042930798712409480", + "0x8b8d7ee7c3382EAf752f0Fbe1c226F3bdD06610a": "10121759813158852193", + "0x8be615d0E060b4539929D3e3F01E498Ba55AE6d6": "4063757822609906787", + "0x8c3d5c9538256DAB8Eb4B197370574340fe3254F": "7982915200544535378", + "0x8c52eC35e1084A317deC470A940E57355d8a04aa": "39137692336994061604", + "0x8c5B20FEDea198c5529998e3293F2a50CCb0C9e1": "45494897152135683170", + "0x8c5D453032bE19Ea372e9beFD0EC01A02E9E2ec2": "12954220910148113445", + "0x8c74899F1f017e87b33bFa43e59C8fc9ab83163F": "37936175162723798154", + "0x8c799dD8b4e1D95692e1aCde37d67F0212f5E8D8": "12065250669810349110", + "0x8cA24021E3Ee3B5c241BBfcee0712554D7Dc38a1": "18060751434256758190297481", + "0x8cBC87012165530bd58E5a4520686E8c33F44558": "5662980408027257102", + "0x8cb414df6a05C39Adf36F82c162212295Caf8382": "1319219495467469588", + "0x8d1eeC2D37100CC93B5F2F8D202Bd7C6470f38F6": "88122193500485715113", + "0x8d2a534422F1036D8aAde3199C01B31EEFb273e5": "25328742496317842864", + "0x8d3cf8BB514fDC366183C39448824BF120736114": "4621707010044155244", + "0x8d45E42Ef15f78D679a35f10D1Bd0C19ab2EC916": "28193939731955381355", + "0x8d595D9C85E2c9Cb9a8485555fcc139744835f0D": "2541147914579696622", + "0x8d9004e297950CAC958729153fD7Bb707d691338": "11118235351048866164298", + "0x8ddC0c8b264Bb482774d2066fD645156FeAc770F": "19071321773261302944", + "0x8e00c03b61042385585E762472e5dd61D5f29bbd": "5933201250551175564", + "0x8e12F90fc0593459B5c115Ef6aeEdF91607130F3": "15007216531145973148", + "0x8e3eEAa5c95273c43bAD8ff95569Bd0732296aCD": "325610898418087211", + "0x8e6Cf162C2D7B94D648Ad629C3407cc702Ded9f0": "10198065481231972407", + "0x8e89688ef63ff22c37B79993Bc515939e9A86389": "15394466345483106187", + "0x8e927B630e81ffeB8469001e6DabEdDd05C13E32": "23599610155854481249", + "0x8eCee8d6DcA1960B23f7e829c40dfe8BE8B5d312": "4580185979393830299728", + "0x8eE3C2B58D209318791517EF6E63E34D7408f8Cb": "6805143511210248871", + "0x8f03a743e9048FF0Ede090d4564421D2967d3545": "17364133697398045451", + "0x8f03b3cC0C8A27E357a3afD77D9D9E262E449380": "20976805234927871691", + "0x8f109EFeD59Ae8a3916E0368ef282811E2Ed6621": "22103462820388916249", + "0x8f4991E099B50B18d782783DA7b2fc6008047629": "703901851125253696", + "0x8f5761E2917D825Afb47D69fB7ed3cBd6FFF21FE": "5985105360177549092", + "0x8f576f2B1A3E10DD7689AA05Fbb41B32B5276c67": "812865539339544249", + "0x901186cda55D40aF20b2DD9C94dCFE1175650F8f": "18069277744848275274", + "0x9017a6b46c4272FCFF49a0664f4C30E6F5842e21": "24207758164055532087", + "0x902930fb40A339fdC2f12E1a209d5e2Fa206FC11": "49614609622566167634", + "0x902B5924759BdCCA3ff85099c2A11c4a79f4BEd0": "7567391939093480933", + "0x9031537E04e25f02dccFD0988214AC320611Ed6F": "14565354967414581063", + "0x903D83573F6E2e193B9f94Aeda9c3e5d10398830": "7512820833637860250", + "0x9061A702Ce509DE1D549Ab3e720aF56a88EA2Bd2": "95960844656664198253", + "0x9062A96B9E947b2b57283e705c97B871f5eB6561": "27280169950250954110", + "0x907438a78302035E0fd11fB88204a9E1B57cCC68": "3012958744803817276216", + "0x90F009E8b389ecb8458eeaDE88120fe24757Db2E": "1082625986551296175", + "0x9109358674F1C9a1a945a1d9880fb7EF1DDC43a3": "34211543678379973392", + "0x910aB884af85b29bD526E653e2Be3E2721Bc650E": "6506667164559612649", + "0x912d85c7c08cAD46Cc88366c29853686707514bC": "6085439725255504812", + "0x913c90A739ADcC402a6bD43b07F59dF1FEA0bec9": "3498399302985939125", + "0x9141D4C8ADCaA06e7C11Baf94e87F9DECDe9F4B8": "30262395751827395148", + "0x91468C1bac920d7276E84749E45d3C08585F15b8": "6774261061960928174", + "0x9188bB6BaD974d2f6e11C0fd4D35D35220fB260e": "10527636234994679973", + "0x919167f712645ff2eD96c4F4783eb9fFD59f6126": "26617678094546368693", + "0x919ABf33249A558FC1A03fF994122D9cf9A409E1": "41063643312100090870", + "0x91EbADd4C59853BE000Db60Adb1142dde50d497F": "307670702397483537", + "0x91FeEFbaafCF5c491e042203653BE92190383eD5": "10409197155294879074", + "0x91f9a169BBe260C49e436007a6C8197091eE4C92": "2200367492265301068", + "0x920C0aB1dCeF3C5A22d7Fa4B3099B922e93Efe9e": "3185580929086080398", + "0x9211B04Ef06FCc79D38e49C4D1476b4a5773958d": "72270885119587296256", + "0x9214442171055696A44301871B3dD207A84a2878": "13372717652063205030", + "0x921D58c0cc78AaF04652ff28e68F66D15aC7b73e": "41141572011094347721", + "0x923aEDA60597bFb085Ddb415c8894e1266cad4c0": "55315156977468819", + "0x924713631f33b42Ce555E569d245DFeC2aCc161d": "24923308789216826691", + "0x926725E27ae755f6e1e8d267Af10d806B9C8F453": "25034365501619784988", + "0x9295ee94Fd7Efe448488BF3F2cA553B9a4FbCc0c": "5887988837676233", + "0x92D7F2B1bA8fE7DCE2a209235E9348aF00712028": "7544223158055702637", + "0x92ff0590565877407B99BA1d7c8F48d2c9213157": "54193746577980012341", + "0x930A6c71c9B0974c02e9Db0688617Ef3491Df7a3": "6443715623708832708", + "0x930B01abb91D5776AaBc750b46E5c34CFac92CD2": "94621130931626013221386", + "0x930B16C7778540d1CB3F98C737892041B906Ae8a": "24835349268888756946", + "0x931b3671cA6BDA171CD7ED7F9D2bCdA72731E56B": "23922820941309681685", + "0x932080245BE75317324bFfc39Bc39fd23f602ffF": "20753463095605824416", + "0x932e269E4CBb515e30159DFB1205Af192a3E3ee9": "32503261871082726051", + "0x933161B8cEeD9E50A84E612A2a2137666d80F4a2": "7988792413131276096", + "0x933b742A8dC8d25dD42071E1835cCe0558cEEf86": "5123721918968301171", + "0x9343ca5F3289a23d9503BF0cD2Fb0cd558200E98": "12868461317373807370", + "0x9373F139cA60988E93c1791F021Df2fbA8D07eba": "7486748818047765798", + "0x937D36cAd73587447221FAD6Ebc940e90C7ef981": "24904531849993102237", + "0x937b742a057EEE2E5fE3cAd18026149a08b9F7a3": "695870812578054867", + "0x9387FdD19F66865d5265b41cF3DB95db243E8888": "952887180239416235", + "0x9389E143DfF86096766Cd9fF82198857745A8d7b": "7337808211894160892779", + "0x93906861B866a69E92F9047E69Af7e71C27c2d20": "42322675917834716949", + "0x939657b81eFF480402a46aB8262d5F1B21Ca0573": "21501026914740240601", + "0x93AADD50577b86afD4F147297cc894399582CD81": "38276375924755912848", + "0x93B753ee0B5302F91918C8251Bcc091ca32F69aB": "38190522532778184989216", + "0x93Ba8a5E42a6b31177ac5E55dc36C604933c10fd": "23446357147445370884", + "0x93F0930d837fF1a57256C73D92AD4E95d1e52743": "19676871690120427767", + "0x93FEd89ED97E56D25c5c5bb74a555a7Ecf706DaA": "3447550256301061391", + "0x93b5C773D059ab62d68f8CdEE0C9F072488d6827": "2516747440029477276", + "0x941363B2499C378976CBF9D19a9C9a9fEe9d8F53": "63419534465413187900", + "0x94141Ffd2Af58dd11F5c390815bBC390E30282fB": "13659149906508818011", + "0x943704942Dce9D98f3BDc19B740FB08c59B15E78": "40650186184318058521", + "0x945294C67752BD0A453975c04e3078c487a858df": "5112414723018119031", + "0x94599741aAda66A4687c4a533f4B91C208B5Db4b": "22306050431844180450", + "0x949c2BC0036789ee3ED4CA3473400b310eb79764": "7443916547169661056", + "0x94B0c6945A34487fB096756C9AE259D8f4e265F0": "9137105369439999686", + "0x94D652eFa49b76F3f131a22eC44a651c6cf3Ce81": "1481541076460342888750", + "0x94FE65681527c14FE6eB153a4e64052B6c3d814a": "32778456937185578116529", + "0x94b82bEF9D6e0B5bB98E7d2e1540ecf0d4eF4C0d": "2827545426192585520", + "0x94e2fcC3D3C1a2Cd539AB92D8ffc1B7d52cE5b24": "251634019010849858", + "0x94eEa584aaDE4603EdC4805cc68a2E51090DBEAF": "67325231905779635334", + "0x9500b4D8F8036Ad69b2C19A414cF52E79c8Eb174": "13128366078475928111", + "0x95151fa406Ba9A5cC9f463Cc211F135cB01124f8": "9423028718262264734", + "0x951acfb0682641c4aD269493B697620325432660": "236108657812244793", + "0x952fdA200cDC6e37f642166D98d2cb4c9216B013": "12213456230288349719", + "0x95388a9C868c8a68fe81DEE7c2a9B556eC6fA5A8": "2391761389852735346", + "0x95483596047BbEfb0D05B89536800557606A01be": "7603697506908581192", + "0x954ED72A1c6617bfcd1e66EE6fc7E5d1afF4E99E": "8341747615046008875", + "0x956BE972E8D16709D321b8C57Bce7E5f021fBE9E": "4693533924013864464", + "0x958569D856e9AFfBC379615339CAB25D42229393": "9001802482719158074", + "0x958Ac238F9F8BbEEF943dBb94672650ee149C86c": "44452761287491128882", + "0x959b1eb198aC9b70Fed87e550C8E57ae875A7A91": "3458541195717130286", + "0x95A1aC7F29a608c31838CA937ac12e5A7A4287f5": "5086062213007825385", + "0x95E301C5AA86F1c9c5c8a04fCcFF916de7cb6Ea3": "186066135209843609", + "0x95a0717bEA69f9FD9E9a2Ff725E5fe05693e8E9A": "3683339052689882717", + "0x95c83911F29D14693B1b4D226b5bD4853B496D96": "8055884885385747002", + "0x9607B90189c2c22441023AceA04Fcb3c056028B8": "50401134067293124409", + "0x9615D99969Dd8cb62B8Cc226EBfcFBb80b18941D": "5473557923330207689", + "0x96479Da95a9d1F921d4478e33b5ccDb7811c898A": "5952651106137842216", + "0x965e9e830919DD70985a225E4d408632DbEC2fA4": "33994497424468762070", + "0x968cF7d8bbE57E3Cde24aC1e2F2A52dC8eBf25E6": "40308038107868565971", + "0x96A6505172a24E54A56147CF884Bd4C2f315F741": "49719987830664407162795", + "0x96Affd75859Ce03949810fb30b910B20d51ad40d": "17701869253780657748", + "0x96E5d521D1606bD6110AA3942a8aEfE83Bd68058": "1521792514184957381", + "0x96F5469CB72F1353ad1Be12Ea83DFfdED8f26876": "1089206248530895259", + "0x96c41b3d5e2b3F26F46B21022a17d72Dbb3FA760": "961582114659102027", + "0x96cB2f6cDF6f301E59724092D03aD119782c093d": "62316207586022905960931", + "0x971D3490E4667ED13325B39142105454d737dcea": "540461604785793630336", + "0x97283C716f72b6F716D6a1bf6Bd7C3FcD840027A": "4543119714753367655401", + "0x972E41ba9d457b83249a8a261f8352A2Fa966d83": "15057225254079046499", + "0x973b7D6c1CA992aD9cC552d2fDe526e9c19C5763": "40637267893418567955", + "0x9741FB22Ee867fc24c189BA5DbEb879899cE6deF": "8384002717701162937", + "0x9746BEa532c6C5741a9562E767CF7186dbb58e98": "14926262425147065573", + "0x9748F138F9Df06d22b5445B11B342e63a4EC9831": "22969008673266527124", + "0x976e30e907Fede1e1C9cf512ad8e2b15f4Fa542f": "4287028195825984937", + "0x977486Be3dfD895D4d522D4C5f9c0453eC78Df1C": "14539199195462198092", + "0x978042Eba3dDB9453a529D052774f4064f8D2f70": "244444947392996004", + "0x9780bEdcC437782846d60D6C074D18Ed24765bBf": "5989350482386073030", + "0x978A00921bd0B3A92A1F78250b1a4c12ED2D6C91": "25733596638547145580", + "0x979400020fAC5E5dECdB628660F04Bf69F119F54": "16732181664798484197", + "0x97D8979f9C8F4EF851Cc33A6B38CCAC6D69510bA": "3314600461994561", + "0x97F6B9d7B870226A7A51e9F2D5637C51e4d00537": "20875453607105688089", + "0x97F7EcB04EEcc6Af3EE226185221d982E5e1BC52": "31667698065548194757", + "0x97F83bCC6F9a153bc9AFF10145FD70F53F1d7611": "297877207476461918", + "0x97e57c2C1120e4559083964C69674177b0878FD8": "11744162356364461859", + "0x98071fc469cF2fDCE21C4A9d06DB0BcA1A22a07A": "4459232732324807815", + "0x980D2B992F8480830A53aA96E3927cf05160C581": "2567018026191069128", + "0x9822FC96b71fA01A86Fc0284Bc90620b8E50c6C3": "2125732015243714981800", + "0x986Ec699d388E54096DB3024EE7516F48a751eF3": "5782761738099801633", + "0x98780411E33E19F5a5c0D8cEA44d1A1E9a2f949F": "128466579833393744", + "0x988CB216fd4F4E1C2d6FeDe05e2dc6cF5eCC748B": "7735239634841787155", + "0x98BC80D3695298Bea353304cB2f6970628467479": "19954592333034887002", + "0x98BfaB28679a5f3C516c3C4a504eD23313A54cEB": "9553146131205615325", + "0x98C30C832f42222985430C5e95B240af5c2cfD36": "43559398697482188420633", + "0x98C82EB1B3AF5Cd478b6CEb21FF00201fdB280e3": "28847282712238658618", + "0x98D5f53B6eE21b4d711C4F6feb5995D700cd9f43": "56224373590028152028", + "0x98D7b027A2242fF602D17E8E5Cd73e9C05c1b88d": "16416462708363599595", + "0x98aD0678e4489ee453104d38b6bD626557c0bB9C": "15984478932501926639", + "0x98bfc3CC5f558ab75eb86E88Cdd56b96f5b9b8eE": "35558897327799973", + "0x98c79130a4225685Ac9082fA92349802d30F2F9d": "25913060055040412296", + "0x98fB3aAE1C51f90E0228392d508F584760FAb7b3": "6164273783412197451", + "0x9905212B4869E52166D2024bc8d7Be74802eDB6e": "1489590169941280306956", + "0x991f16182637F46334e0EbE8fCA00FeE9C0FDe50": "9032275288661971472", + "0x992eF9Cbd7d43e1b4Bd333902A6C6BBA0acaEBc9": "39403874354368314605", + "0x9934a872EAAc95605167EDC824A0ce906E42f5D5": "28747891280658421758", + "0x993a7ca217Af47d981Cab5dfF3b0210a997a9C83": "7907930702048593538", + "0x99484628E6Ea78f563677d909f43fcF1f14b1649": "12484380779117995294", + "0x994EfE065DB3957D1C920aA336D813FbE1f942b8": "277351913152486700", + "0x995C06B04fc53211110d02bDbA73301c4990ebf0": "2040181495891331094705", + "0x996FfE406BA138F3f471544303Fb8217E248E9a5": "3518801697973272452775", + "0x997AA3a651b90878EcCEFcb6f4d85af0237428dA": "2199184462974366224", + "0x9984c415db8d58D002F3Aee09155CAFE1B18D4fF": "15909925044629463188", + "0x99D20c1C36c8f93032F0Ae800a8674664E38508a": "24040927783215573467", + "0x99F4176EE457afedFfCB1839c7aB7A030a5e4A92": "22616128429960783947660931", + "0x99d34f242FB62eC03BC7ee781839Fafa1BfCF2c5": "6348841924784077340", + "0x99fFFE5bf897505e56561dB2Ee134e7E7a3FD656": "28185556686285616915", + "0x9A6FB777e7a11576dC960A8217ece08D0bF71C35": "24309748588587553531", + "0x9A79a5747B0958A1508dE8AF7E9C7436aBa7CC9D": "7346347208808559652", + "0x9A871a138904305cFe03593bc1c627bc76D008cb": "13233363631397400070", + "0x9A9919253b8884dDdD8b9BFbeB17715d63e6c4dB": "1433860205092642708731", + "0x9A9Dbd76B0Dda93334a11AE2327C7dc95D2cdd74": "1567847567122845372", + "0x9B13d54BC81C3f2923e255178E3d54fD97339981": "4609568108213959161", + "0x9B24167b681812dC00ea0F228C6E747B6909eD1a": "11763843221333648578", + "0x9B5138A4044DEC23659d95273c3821ADD1fdeF51": "55840634725596355", + "0x9B63e13C202e203F5032d5e70bd389988606E95e": "64159316040734933170", + "0x9B73b27D0f1C9CFFFe635CAba0EF3487D6C9987e": "506308642251793348", + "0x9B891F6D2Bb1a7358bd5D0d4d415F3Bf9Dd4CC1a": "1086940824239078070", + "0x9B989d3f4e660472D2c4d24b2ab296dB0A6e22Dc": "40515219909929291132", + "0x9BD89a400E9dB3b068DCae7d8d2Ef165459F7e48": "61626601877115347", + "0x9BFA0fF0E1A15966fd1840d96fB206990071bEA0": "34426778754555006334", + "0x9Be24ADA06BFCBAEB0E621858129E8e7d29188bf": "342025916321766872", + "0x9C0ABC36a2862700f429101453b0fFA1c7f7ee2E": "28107018036731485836", + "0x9C0CB93eE323e2a1960e1242121D3E33560dB0F0": "2496261920791508271", + "0x9C14966493b94ABF6e822f725420186099fEeDDe": "2385683751378121702", + "0x9C1863AD1b8122843DaBC80232fc1461C51B79E7": "1295449605455986985", + "0x9C26744b8BbE2a2F326d70A7190852163d782c50": "827797497190673143378", + "0x9C3517FbD366D6a7f9DCC7d0bAdc6946fd5e75A8": "8016910000178360209", + "0x9C37E96b408E8F6cB23DcBBEE397AE49De7369d6": "41422320861379219970", + "0x9C4CC2C3f454b9C406dE5f915702d385826EC3Dd": "11986392073988041284", + "0x9C531F93D26eb2F4b37E8c3Ab7DE8d6d5a099d91": "15682129440414847557", + "0x9C606f6Ffcb2265a824522F096Dc0Ab3E81d5F39": "28976519061222486356250", + "0x9C65e7d193E5Ea67040e6Ee14b90011651973386": "18453678025306208988", + "0x9C858345d95f2d8Eef33Cf31e9F119eB85Bc3f66": "16186692648394007754", + "0x9CC9A5746f8f31990Bc7E90e6b7ab05B26F6f283": "5138181461642805050", + "0x9CDC00B1C9FCC2450AF0562855580605909EaED1": "685200960866928434", + "0x9Ca054A9c71E1B9c4d9dd3823503ea72689cccAE": "245943922228851185124", + "0x9D02B4297DB9A1Af49D69894De7DE6A33A9228b8": "5805770387992091754", + "0x9D1dc17cCb717b899DB7296e09d732F6D618288D": "46253133223880286936", + "0x9D3a80E1d21184Ea0a65ad21dcD32dA3867ceC72": "195433258433203555", + "0x9D4e61579ec023D4a9D4acB2065D8BE9814Bf864": "17923012537620132834", + "0x9D7D6ceE64410D50649467f87A58590b5f3B14E5": "387409466353357862", + "0x9D80EF5ca1A435AC0F8337624397482f2559192A": "236960364156164135", + "0x9D825C29495290f4104b3D199f47f47A8A810642": "16845049881068832574605", + "0x9D9366eD2AC7a513f3F3e1f2b01D9877b54de1E5": "37652852408600099226", + "0x9D964881e7c65EeFb8CCFaa84faE039a4684BAd6": "282856097650348037162", + "0x9Db3B4Adc4D4e3e60C9d2761ecC913a68c8D0519": "28561824996341740982", + "0x9DcCd6c74d93a0844f8Ef6aB0dFeB4d70eD25Bc5": "9836010756527598660", + "0x9Dee3141708757650Bae4a6fAa1216a97bE3F0F4": "124898079504385253689", + "0x9Df208d44bA3E0eeE8F8131322Ae957CbeA47856": "154113635164964780", + "0x9E22473aCaafC54e582a0D067f96E668c6babFF4": "15180382394389497597", + "0x9E2eB8691dBfb3B796772D861Edc9205B63c8378": "1731485866827917840", + "0x9E51BE7071F086d3A1fD5Dc0016177473619b237": "30174535819258481481", + "0x9E7c068c98d32Da9CA77f26C173b2ad93B7602A3": "5306313304508029142", + "0x9EA60DA3d1b80445f26cB708f0d37E33107b43f5": "6602868004939788627", + "0x9EB3912D96FC148d4e5D7bd79c1Ed8F618170d37": "64485572235426622767", + "0x9Eb1D6FaF62d1F771522dEBAC387448E38f1Db15": "18149194673541586585", + "0x9F14f8df08bC1267cc72d055982db542FE7B4b28": "20350792041118584994", + "0x9FC1b7FcC3959c0078957225eD8A44bCb4b07228": "30295983162939954588", + "0x9Ff8A3d737f8fce7C4C1eaDD4abbBC4dB310fea8": "34555204705308855447", + "0x9a30a59674C4a2106c5CEF011be4cf7502763130": "179959945987966634353", + "0x9a56D755b9a5529f741657795F3c080647127ee5": "6197575998379237740", + "0x9a58a4E170D6E884Fe29834F3b3cfC4982bb108c": "43913514352302541634", + "0x9a71E722600f846B0BD2D8cDba1625183E3f44C2": "32062149604802045853", + "0x9a85342Bb436C23f645394004a4a43c33FB43fdf": "48853098404098732236", + "0x9aE9B4eadB0f02ac778Ad3861A1a0190dc82F0A5": "2254870752203960812", + "0x9aa4CEe1b2fE68d0bE90A315E5c8968CF13cc39D": "8825501922787717865", + "0x9b0025F4d5c4C3fD3E32B24767Deaa9b96f728d0": "8629514703143242743", + "0x9b013C14EA99930f3Cfdf9bd5404d503F952c71A": "24885570018177445931", + "0x9b06452f04858B8B0660671b174106448CD2090e": "15043076071089040024", + "0x9b253856C94801F74954AE3EC0303e76645384dA": "6723157950053045866", + "0x9b39Ae9496FF47Ac7D08abdcCb286292fe4697CE": "2917238182024744980", + "0x9b83FBCB3c56E74e323543913c4cDEACd9422aE5": "36667391404088373589", + "0x9b8687EAa26781Eb5C0Df7A2B04E8ADe7F95609f": "7425057855143311952", + "0x9bA91Ce6a54750AA7f13c98a2384c03227817f04": "15698249730149144963", + "0x9c04Ea7a49fcc158827A6ABA56e31e0615b8A05F": "20079476896579749762", + "0x9c2D9ef68D6680f96F4a435f28568A4954cd2A6C": "61487862329062784", + "0x9c5083dd4838E120Dbeac44C052179692Aa5dAC5": "129733056315009583340296", + "0x9c79d034f54600845b2450ff40D32078F9F7c175": "21644516156889365800", + "0x9cA10fe0cCc43d8464e91938E56411e6eCFb8e2d": "46340461480001030891", + "0x9cB40716D392D8Ab5faB4F29EC60FE53090C65ad": "278725221645218443373101", + "0x9cDA4188918896c41dD7277Fe3D969B7a79285dA": "727391009636279943", + "0x9cF6FC4c935728CB984B5893A8F4233105964349": "14321793420556954944", + "0x9cadFa9E044575E6ef484b8708e19E1794AFf8B3": "183557312095091593819", + "0x9d0f0C725Ad925BE7b6210106E28F8aCa028B704": "10133535338280493024", + "0x9d15fBB58aFca6a726f8A52D7371DF286E0eca5F": "6232839980516637452", + "0x9d17Bb55b57b31329CF01aa7017948e398B277bc": "243469384260494546", + "0x9d31F4D67785a9E60f65006E7f2d8f2180dCc933": "123424245907330940", + "0x9d35cf85846b6cE926645acE83F327C168371b5b": "30797446623603297947", + "0x9d819695056Bb1a372f9E715aF5ec4C79595b67C": "23189953403580979", + "0x9dE48300FA79ddba469654901Fd523a1f9d07A72": "18571001723130186008", + "0x9daAaD3989D9D3149a8620a8Ef8Ca5db2CddFC38": "285636963309671942", + "0x9e590b88b8a7E975D2De53d8DE6059D0feA83098": "12250304210303675408", + "0x9e596a18308096A9eCC4da5F9d0d34F6f3BDebfA": "6085912748495673258", + "0x9ecF9f21d9Be9fe93ED3dB116eb4b8A1582db5c1": "27281724867501628925", + "0x9f025f642bbcEd20c2d4BaA781A65d14FebcBE21": "10116388727670186147", + "0x9f13712ebD2B119D08BbC12E32A9191a9Db4cB5a": "17994874289994373624", + "0x9f1d8301Ac5A406CbFA763fFABd4962f9f67ee57": "9229044634451303484", + "0x9f33dF55F869499AfaF1367B2fec301FF73e8AFF": "7495775872537812541", + "0x9f47506EF343D7dA629D8d096Bcd64568E1101F9": "324471373266677012", + "0x9f4A1032861cC85eed4275d02B4d93EAd5f18FEA": "8147182982538608463", + "0x9f507F52e36dE37c053F9A4689e9412c6b6F6167": "11873937267803100358", + "0x9f52a6451877e6F78A2024AF7b4843d9B250730e": "37934726420932651993", + "0x9faADc241104fF6b59841114d2054584d044700B": "5535645775268614112", + "0x9fb6a5e668766Cea3D37F79533a0Fd7bF190FC19": "37639769538400075988", + "0x9fc1ca176d6DDeA94C4b9bFE8af6d28f5795b305": "267358229855706789198", + "0x9feB97EE42E7CD035D10f7c3bb8de63fEe289560": "9309781074591111085", + "0xA0001Fa906Fc32e14b8D717B3228c36A21eB802B": "27199724597267882441", + "0xA0658dCB4c9170a7bC18b1feCdE7F5c0caC409F7": "27228530183546951322", + "0xA0810Dcb52E9810629A189aC3e33ba6E2c19CCC3": "50257608399956088", + "0xA09aD090d13d8dA0fa6b6CB0f3293B0D5Af91106": "25112689669213021692", + "0xA0E038a854e80CE1b57956DF91E4504eB69A3207": "3270347223576154128", + "0xA0F3B1821362787BA20b0aad47b4e30c28A7Eefd": "25750376959399237000", + "0xA0fAF650b0e39397633fEEEdd42576e75a30266b": "28016524133623782864", + "0xA10140C60dB1ed67a5d70252B6b9B4C9904458B8": "172088250631226434467", + "0xA1194B1edB051aD5Fb38fa908B28042454ca85B3": "25264847676404344353542", + "0xA16457e52C8DB210816Dd8D5a5A997b7dE11f8f3": "112195899665509", + "0xA16E206AeC04423257E51006368DE94876Ce6879": "12218091362842009538", + "0xA1CB4468F529f51296180d148f4764ADDE8563A3": "17487335729332090078", + "0xA1a47b61cD6884C0d9EAc79592C90cd6c55F8498": "14794399502972625584", + "0xA1bF63DbEf51d466BD48Bd119B092A9ba4EB1e0d": "6629048612847395981", + "0xA2489D15e95260897d87f4414259F90566dCEF4A": "1886757606821599946452", + "0xA2852A920A71BBc836f1c66520ed4abbf7F3E55d": "166128184562778321443", + "0xA2925Df9aa60DBede46dE1Fa9071D533307004ad": "9998268874035092577", + "0xA293c49232C5f181944Abf5dB3222BD55116967a": "1412023767015440402184", + "0xA2b15ce187165bC1723Df411d9887d738FabE5f7": "17349703238874158978", + "0xA2e3475D13776C6E42ff37B47286827d959B2195": "69868251468385173428164", + "0xA2f7CF0d29fBCBaC8270ee44D6ad0A71108cFb38": "6177532537779043723", + "0xA3222E0a6493fe85AE60BF94F595810a99DaC814": "27206583826144161929378", + "0xA34D96931b16178A784594c66cd7C130f53cc8D4": "220758095929324722940", + "0xA35cc0A5A18a85DC60F9DA8A98a95B87c6f77f44": "19654750183710967766", + "0xA375B9A3D0245495C8e72CEbE7FCa27300952132": "203342435850303", + "0xA38Ac926017ecE610ad563b29F212165e0d69a56": "14672617868241148025", + "0xA3993207fd58AC0f0102116D6Ab96950EFB19105": "33448402246437275051", + "0xA3f3db23880c40f1a058cC821a7838Fe97b4d29f": "6571515984344705545", + "0xA4016FEd663159ef1163DfBAeBE89B8DA378F821": "7375344812351050533", + "0xA46141280380E9b358FA4B174C87994402303C43": "626977092710187418", + "0xA46b38c35EEd2e6892639BdD9086288f96326934": "28294329118125225348", + "0xA476373118B6A0002b35Ef44267e1C5dF241B01c": "6259542638094893764", + "0xA47f6360747316b84b93cdb65AF09Cc097FdD80F": "104043150454162698704", + "0xA48c87e506073b0D76E2055Ca4B2e418535e94E7": "12747703517958767773", + "0xA4949F9709ed6c404288a45e2C22c2995cbB47ed": "17610962233575579252", + "0xA4Cc3fB0c8F0E1dbDFfFEcdf61103777bd219089": "20829841471408885821", + "0xA4aB22ff4B2c82a250Ae4358c57355BA541b94A8": "15443015503205655037", + "0xA509ce524095e54233074b485825ebB9641D00e2": "27916826949531736977", + "0xA5892259A594BA9361F7FdF4d116aA3857815B1D": "37062732385227446717", + "0xA618da65BF623B34d12A42542426daCD007d03F1": "11464194140608321858", + "0xA624Dbe2010c0A0395f7e42C36A9920272D1ab86": "15266226083383321064", + "0xA64c1AFE585e435709fe83c3B1c1a100d3A9Ea0c": "13726227326547136047523", + "0xA64f8dDC4f9DE2e39a2e4911606bD366b435Fb9a": "22760551935180494169", + "0xA6586F56aDfa72A2047EB1b1E7941008F8c713D9": "7792583124788593", + "0xA65889f8D94861038CCFA3e6c36EaB6671af3e6F": "12888495737242580370", + "0xA6614A640FA0a0a95ef65DCDe0649615888F2ED6": "8899094650061007710", + "0xA6B49397ce21bb62200e914F41BF371E5940Bb41": "28607652330264571788", + "0xA6C0e15B098aD676303b7921D5cda7Ac2D435B02": "14152207614582263249", + "0xA704497be2938a35baf2BcBF68e64344dC243aBF": "15986105936444585480", + "0xA723E96c191D24c15C5ec9cDFa54AdFA84CE7814": "605954835471847374", + "0xA739d838855E7253e41d5A6EEBD6e874c479aac5": "17728006042007450702", + "0xA73cf65163D3A456Ba8D99E24192Ca120876394D": "70537261714247135817", + "0xA76f1D929C97C2A0F468296aEeAf5e27Db7E98a4": "1497978347208093500487", + "0xA7A0d931b20374bF41E2236bDE35897a5C48D03e": "837300536916588749", + "0xA7A9e6137D2582fC8bDDAD6A6dAEb8fB985396F2": "367499937708016453", + "0xA7BBf723C13d69b2BA1912e198647953c3BA3779": "36164113969157851021", + "0xA7D6722f11D32C24554fe80f88B5818c635Ffe92": "23990726307956835009", + "0xA7ECfe2Ab383C82DD4059F609105dD35c0Da6D1b": "27810059910517201901", + "0xA7fde321289A23e310c8804D41eF3128Fa07fC23": "48161376004708053913757", + "0xA808A6124f865f1815F1FfC95b216e7AC84b3719": "10952502158760056678", + "0xA8097C13DD8ad383d264FBEf6E36B8923889fBcD": "14428221213638009191802", + "0xA80D0a4eFf092baef47873f8ccb334D92f3c3366": "5074034987611303579", + "0xA80cd5dfA6D8465Af18e3BA2B2478678F0DD5cc5": "6321042181863459993", + "0xA81B2a6B0F891FAc6512D5F52e8bE2FB83D9bB07": "35537262033971868963", + "0xA8361b2EB9f951C60Bb4029e332EC7F2f54BEB43": "72249708196032923855", + "0xA83FBAe55302E56F98EBAcea660E35F2DDcebd74": "28267264425778850004", + "0xA878863774FA134254d9e1Fd69Af3B6FE82eDa6a": "12580181447687895125", + "0xA87e7535e6Aa294C69B4DdB85AD5D0d743ab0aFD": "56382076929352701092", + "0xA8811E18a7e675c2c8730C35543643b662dcE9C1": "215492368223356019337", + "0xA8A2E121cb8BA42C71a77475A1c7Cfff1971Ca5c": "14376251272067623830", + "0xA8a10a0c3cFB14Ec84BA430ff5d3DBd4e1D8ba37": "92272970840843552", + "0xA8c602638e910a5eeE8bcf190AcF3e2D4C022338": "63148904284002414040757", + "0xA90601C4c3650D07Df4578D86756c00fFC1a14b0": "12054638152392804309", + "0xA909be1aC709Bc08Bd8Cd69604CEe197360b3e33": "10420984954489880867", + "0xA9168F5B2174c0DfC0e8cee4f1caDcD9Cfb10fe5": "19386902826475190347", + "0xA9197426B655130b2e03CBA7A523D4C06431eFba": "362718672407951946", + "0xA996D391f64158fB17fb71d6A4Fad67dF7410895": "32463513836544316430761", + "0xA9A50Bee762Be2811a89188374a76087934fcCE8": "20738804241914100966", + "0xA9Ec08edd196B91Bc9177420137804bE1D6EfDa0": "250791635918203161", + "0xA9FBBD4a2A411238B7D0f45805D9005f746E39DA": "11145543210624723600", + "0xA9f00C00Ea5Fd167dA64917267e60f9d9430b321": "46443788313575390129344", + "0xA9fD0aeb5fd3475110431058de201eb34271aa1F": "21717179639496635177", + "0xAA490E13aE4811fBa48996c48F1693e63Bd0f0F4": "1930327255514537218", + "0xAAA2FF4D37405388bc737990D6Ad4B2E329d329a": "9581668565395653489", + "0xAAF4c7E07E6482b261d477b4295938C835Df6726": "9178601892207078256", + "0xAB4704566Ed8961B33b765b12Cf8c1e3a52eC75f": "15599184869851892209", + "0xAB48456170ED1feae62803A4ff9b7f059AeE0ffd": "38208394905071597676", + "0xAB61719309Bf30Cda379B45ac33326B24261F956": "17983343476028307748", + "0xABe647F4C0b91e726CAf6C655b8c14Aca8a69418": "16018575601450462583", + "0xAC77bA736dC98a4b912E6cb2A3AeE9b7e0F85114": "37939035055325639253", + "0xAC95712Ccf7fd178f198C7B6fd2d5f6f7a202929": "22901527252190273162", + "0xAC9B83CE5EA61F32A79208C9D412033564E68Ca8": "5526201203252821528", + "0xAD036873d6fe9C032eD206A9a69847fB94A4aEAE": "961494245987718956", + "0xAD4038D1dFE3Fb525E78cab6c23A40d5E2e6889a": "25077637216764600730", + "0xAD5697f14D75536614F570ce1a31e2f7a7c1b267": "40400408838362157093", + "0xADAae0CF49B422fB24cB988d669e77F4E015608c": "4981974579282198836", + "0xADe6f18bb6FA9644274f2d789323F96Bcfd06cf3": "73110097808976870140", + "0xAE5D5aCe10C600f7671268bcb4bFbD1918C2cE2d": "1121606380579659640448", + "0xAF29371fb46c112293FA792A60d07CC3B8e2ECe2": "104641329571564449762", + "0xAFDF018DAf38F2D72eFf6532e35bBfe1478cE8C3": "45745683597938808210", + "0xAFF0bCcd972B8E28f37Ee1473Eb007976B6235bb": "15507014380268798614", + "0xAa2a56080258c23869a00a773EB3D74a19201131": "3842654432842471762", + "0xAa66E02100e092274838026CDb832a132bB52714": "14620856700384700906", + "0xAa8221674B87e71521fF7B56ED0d09dd97585eee": "12553252042102786174", + "0xAac105f0bAf0b2C3C828f05Eea66368de2D75B91": "142114756041682357", + "0xAb1b288f9F1C9424143c40Ff2fdbB6484389eB62": "15463915134584451894", + "0xAbaf2fa5196fBddEF2E960CB6caFAe48E0BeA7f3": "33066264986840678384", + "0xAbe648928A8d5B1D943d5d237De71BB2A0C2794c": "439766411291258279", + "0xAbfe67fa205B84aEfcF2Da8916e6247675D729b3": "28372343468167711714", + "0xAcd0d20177942eD0E01A03483520370C023eC8D6": "6393751544162803930", + "0xAd21aA7e846796E5559fE715fDef27f4DbE0f4cd": "9616496142376428610", + "0xAd5553945d7906aC295bEF282338419d72e44E79": "43721605490397995694", + "0xAd8c540a8b291529A12BddE08BF352cDCfc76Bc4": "422408881690386276", + "0xAdA7673B48D656a87cad01bCbAfe6B1eE6d621ed": "953420744683397698", + "0xAe5a1F310dD053B752DD967800122983849a174D": "170051915951268057", + "0xAeA14896B33913Afb74E686d6ED7BaC53C0d43b8": "39282905895806257246", + "0xAeB958c2014e743E84F7f09F7507fbeec88D72ea": "51085631569451901931", + "0xAf272A79Bf76E0f31e3952D6eB917CEb81c211E7": "505019183252309593", + "0xAff724DCC6Cf6Fce20262Ffa9B42607e2740457D": "7632747391985658261", + "0xB008e1e0006804F7860217116A5A37B5b28Eea93": "22060416047356760590", + "0xB0399dAC8f4D4100b49b2a7B3873481114229D18": "19506412406421074964944", + "0xB07319a8554b00226E9b788F791D38DcCd728b03": "2461066966785852870433", + "0xB086CDb7c8682DFf4BA9FAe904b81dcA6c713AAC": "16132772268578151433", + "0xB08dd71c47Cb8c00E2155C1f12877F0e7d17B449": "31635945736853457874488", + "0xB09cD60ad551cE7fF6bc97458B483A8D50489Ee7": "52575841569186452994", + "0xB18FE18b6BEa40DB0440a833855bd09570E7A45c": "2854327649050174549", + "0xB1Dbda5d40dc8D3fF2F631bD13f9eD4216b3823F": "5001536469172222418", + "0xB1F6A4e5aA12f82513aCB17DA3e87891c6E8b905": "34750098933346731944", + "0xB1bD944671f52699Af38E758791f520A60020B11": "137628757173109003925", + "0xB222752FfE62812ee77AA06F8F7d3aFA768101E7": "423083745049729067", + "0xB25D25f9837566080a00F20F8aFdcECdBFAa9ad9": "14447303336740769244", + "0xB26661ffF3B98472bEAea166D20Fc0454403C86b": "17579471101131935986", + "0xB284929c0C79C24AdfC607DE921f49187Bc2B0be": "13354109563770417969", + "0xB2c8bb4BF53b34Fdb55795Ba5DAC0598Dea37819": "4247087962519965074", + "0xB342d3e3eb7154221a8Ec260A9880E8D946D9Ec7": "11245481491586135053", + "0xB3736621b184073386643B7549F8247262D042A7": "7932978240270137750", + "0xB3A129f99b1ED9e8da5cc5676569ee3C119E3ca4": "40246950379674768794", + "0xB400B115138F6fA4f06704c5A37e4bc812C3430d": "1295212824656558578", + "0xB40d992A98eC35ea27C2A93624778db647971bfb": "227461394667653380", + "0xB437e80Fdb64cc8aD51F30EF46034eC6bf52daF2": "80111398061562758139", + "0xB440d88070182f550D07B0671fEad241e6AE0C4f": "22894142934161527144", + "0xB44396Df285f4f3B834F79Cc2Fd01c89d762e210": "7381855026302540552", + "0xB47D8F87c0113827d44Ad0Bc32D53823C477a89d": "15108159334381036832419", + "0xB4a04180211dc65694Fcf2543C9E7E786E52A5a2": "119504848219779537311", + "0xB4a91ac1D081573a0a3EbE9C2c06827D6D7037e3": "30575770507589645268", + "0xB4a9eb0acbBaB501690cB4266162C6DBAEd465c0": "22639945364642226804", + "0xB5198D354DA53E72660ab5120742ca26cf9103B8": "5076572886169384001", + "0xB51DdB59795Bf6Ef95ff9Acc5Be0458B556D2b0e": "37335165882448561019", + "0xB52B2d32D4830F3Cd50543B54E584F2d1fcB4D2c": "20999779749360088124", + "0xB5383501116a91C43664E18fe935B7C8957cd125": "5094411852000765603", + "0xB54628Ed104d8507ae7b3C9FB296D9CF9C9A1F78": "1714899940835692155", + "0xB57f7C23Df3e195f9Ee0cA8B0a18b4815c4c07DE": "17495345113657838128", + "0xB5B568a70716142FBeBaD2b98584520a55109FC9": "14754582925765298664", + "0xB5c2209cb0E99F07C4794f1226dF2453da89EA73": "23620031404203873217", + "0xB6081d13A6AF1445493Ae7d66e4c6B0904361b24": "5088401994177962495", + "0xB67D92DC830F1a24E4BFfd1a6794fCf8f497c7de": "834977769848587643", + "0xB681C13A7c49b1AF7793F43208526F19356Ead77": "10837235804666832426", + "0xB6B71D583dAD947a9c8C48E8382aD15f342EE283": "7788495214216253947", + "0xB6Db94A7AE64F26e2c607FCec2E0CE275b2F1092": "9520503961591644105", + "0xB728Ba57Df508Ee7c7CAB9572268b879e72595CD": "8503542502994164111", + "0xB79e973231C0b6c233F0A8374886a4C1136c70a9": "23765176523405595276", + "0xB7F3E485a21B6c2CBeb5e22eF104860Ac1c74cBB": "46077108073594987247", + "0xB8162Cbe10b9CD36fEA7b8B80d56Ab8D8B8a12E4": "13525277707951391321", + "0xB876c875B463683B47fb3dbe938399950D7d8E75": "69793541654677637006", + "0xB8Fd065f0409E7C17B176Be6c75469c6532F169b": "36916128023352028625", + "0xB90e72ea21e47fa38c8F7Eb6331eC8A653579cC8": "27239920205803303466", + "0xB920ED166C6bcB27D9b20bb31b5Fc201e8DC119d": "73350788051691052739", + "0xB93fF73e50F8A3683E4A659350b9fB1Bc3c5b208": "23535022690518757623", + "0xB96Dc6749Fb274dEf23a56016E426c03a32C1214": "8343294402119410247", + "0xB9765e617Af563CC3d9037dF784f3944EaB737EE": "1779164473947791463", + "0xB97909139373b2232D83E31b8E1420A9a3F7c5b9": "28804874869514869486", + "0xB9897302aBe95e0cdA6D03fb0219c20D72587901": "23894937187215493744", + "0xB9C70Eb2aD91DFc3C4D392769b01D7CA90768212": "2379483872561457298", + "0xB9E5F5ACDb4aF82ABbdD4456227860A2e2353198": "46472258834671147441", + "0xB9b7D582A3D046654B835337034299fB1cea257f": "34623512164218095784", + "0xB9b8EF61b7851276B0239757A039d54a23804CBb": "1338968275409696116779", + "0xB9eF45b82CDa385d95d7ae08C85588c1EC11d4f9": "11630404572971406332", + "0xBA052c4Af4b397c230fe9cB00A501786c5902F69": "11844996308959555273", + "0xBA1d94513e1599083E190558e698a8B55eF3E674": "15083402935957089250", + "0xBA5F711785C53B0de97333Aa7bb87Bbb57E549BA": "12357896633004339000", + "0xBA6717364B92842a60ad058736EeF155C09d1833": "71216268256105205218", + "0xBA7a3000e2F0a35F59D08cf73639D0e8B62f42f2": "68212735638065825649", + "0xBAcb58a5BD0e2dF0B3d3e82A1c75aD565A417Cd6": "7073931038302883552", + "0xBAd7136d3527cC5Bc18A81c8815956729cB72a72": "17824903208089505436", + "0xBB104430143bee19cDEf9801c87D316E9a5e6C00": "78924039058426995968", + "0xBB1EDB8c64D7BaA322FADfD13d4A5Db96d02A2E1": "293715698917244923", + "0xBB3388A497c450Dd53ED145CD88a1c9e6b98e0B0": "191423480004987416", + "0xBB6646651c21C02Ba7f181A43764785f0ff851e9": "452417047735611038", + "0xBC086463232a6599f62cC11Ed2Ba668E796260b6": "7494456795352232325", + "0xBC26D0f4177eb0909d8F742b5eC057c498E44E99": "4989185867023195869", + "0xBC3E21F6984a5635cF2bf93B5Eb290254Fa670A1": "18250511566193424089", + "0xBC9cD41205A7e719519e46B38fe3F1687752c83e": "1872386853757739334380", + "0xBCe03405638247f5CA3eA767b2367B1af307Ea81": "10222745838324038458", + "0xBD0cfCc93B1cD170e5dBBa819EF2128Ee35c9A59": "9766989285075506375", + "0xBD251F2d6E8132d44d076f12e0520F2Bc74b0013": "41561146977232982", + "0xBD371c56e844c5106CFF260C6240cED9C37BD281": "12646420884070059510", + "0xBD412A420004840FaF5593aC0f0a1208068a66f8": "21026530271275345863", + "0xBD468E820546F9d31d2AEd31553e59a9e4B189F3": "7755794894370864220", + "0xBD8bC5E5488f5eAFdBaF6e85a58B6F7e5D0be3Fa": "29784543767186988671", + "0xBDA2Ad4c34F8ebbC425b7B02D986C734eA7d7E1a": "240737050842576507", + "0xBDe69C75Daf5d89c806439ea53cC00ae880E8314": "9284139487229951131", + "0xBDf1c450C29B9fF318d6244Db655c67b7ee268Fe": "21224873539191999715", + "0xBE1D9C65020Beb05E44b238af5fc868C8168cc44": "4668817355694305", + "0xBE3b3565E70348B2b420ac9F0bD1e35994Fc8140": "5702561846202143703", + "0xBE4DCD46289633b4190fe51699b5A83Bc750cE36": "12811734159298854395", + "0xBE9f09b668946829A37bcE3aD7C4866119DfCee6": "13549875811750533802", + "0xBEFa5641D7681950213b490596cc0e7c3d9f2eAa": "17448304650605183485", + "0xBEe33aC5520a2245CBF8288e768A5cC26927cddF": "3986475485771823927591", + "0xBF39c33BbEc985C25C645949fB6eeb7E8879FceB": "12607378481736900493", + "0xBFA8528238183a6F515BEE13114e0896bc3fD027": "6853766865728460749", + "0xBaBF3551082bE7DA2EF559423B9202Bab5E3a63D": "6539010378687544868", + "0xBaFDFB61284f2AE0846D878e5461D63e4463Daf4": "14215267512520312135", + "0xBafe6CCbb7C648cDdceFF304Ab413A9326D6b490": "6445593898205206090", + "0xBb241C4e89ea8b2dF0c2e6C840182aF3B51edd5f": "247900363567771887560", + "0xBb2DA79345eEc1B64B5A26736F693A9874E1c409": "14127674467512512055", + "0xBb6f397d9d8bf128dDa607005397F539B43CD710": "13127220635414424283", + "0xBb7df40824885DfcDC3cF02ce824148f364c0c90": "52929163456013200105", + "0xBb904c42C65fA587DE53126893b1fBEd5692E8aE": "398333731754680134", + "0xBbcFa939071D2A0BF64D8E15a715C0BE73735503": "94737104467861897", + "0xBc280beCab2bf6DDC0C126e9179d27BB0eBe52A3": "151006255360922408610984", + "0xBc4A173d7a98B01076512c3D9D921c0C6d0b84CC": "10964839752532080418", + "0xBc55436b8D683151C1bc3009aA48f3b67750B71d": "1404029299110097407", + "0xBc7f8f9d0b9201cb1295733E571dD3633E468EC0": "27305193827854008786", + "0xBc8B81Ad72918c8ef017C8a0c3c0A7378fE2B564": "4503200324664928029", + "0xBd178fe085a12505473A96a57D6F2ce0BBF3a490": "31287370885150027835", + "0xBd48dd506E9179a757AE229d04745476ce6C2aad": "203848139657097042809287", + "0xBd5d74021F32BA9ffc66f4581a3D370BBbeD6Aa3": "39146960834301622", + "0xBd749721271a370487A2D0296d9F5f1c6e432717": "18266659074814980299", + "0xBd83eD02fcAD34c0C8BEAE2E16eA27fCAcA8431d": "4901794234582494301", + "0xBdCbEDb96a6e0640E3999ddE9FB8Ec44d5160d1a": "9627587230484374412", + "0xBdc38ef9a1Cb3B2F9AB0e56D6e4fD985fD86980D": "22058680174408964856", + "0xBe7B4be04c95f6a50AdfA6614E567462a4e87325": "764449927585912327549", + "0xBfa65DCF9CD2F44d193F5A07782CD905570f13B3": "36614486117568239050", + "0xBfe1EFa782028779A9559E9Ef6Af483822b0FeD4": "14274325799700491123", + "0xC005411905F3f8b0Ae56bE6Fa18B3d0A4135ab43": "7500166252026955727", + "0xC00fAaed03A511723E9a1C1b5D5A1F6B6E30F3cb": "36975077942099175420", + "0xC01C9030051e5BF21Cc240369555Bf3275F8b67A": "35693952727351867795", + "0xC02bFC8c96477d82Ae78d3212b802C4bfC820F90": "10502742035141797391", + "0xC058E7dCf8154F541eFFa338524663B785788D60": "103398461723541911061", + "0xC06486d3dd5BdB44ceF965E75055daA6465E93e8": "13761160973021337", + "0xC0682d80Cb3c6BC921f3f4672f814B6B4d476A70": "1535954745044970040", + "0xC08B98065111238ABc8Ca3E61E639f8a9A45305e": "27420050843605104333", + "0xC0e157c96C90E98B01f2B5c4bb191E28796C6638": "25401394708544325150", + "0xC1679F0D489013158628CdDA10C49c9687f0Cfb3": "23580481333510805040", + "0xC16a59634666E4aCF898B5a52c7E25b4A1e7d926": "5239479464112648547", + "0xC16d7303e4eAF0a1Fe83976B6aFDFC077836E684": "12376122859601071906", + "0xC1770E090A1d649147432Bbe6902F77Ca7BFb55b": "10991555218541973374", + "0xC17EC9D8e72aB957Ac73596846Ac87b8C7f80Be2": "3414548037045683966", + "0xC1B84c838857a8baDfeA601bf4bE629Cf12Efa6c": "3371473219194402123", + "0xC1C7FC2bDAA148a63f9cd36ECD5509f541E3Be84": "496251099209511166200", + "0xC1a182E9dDB242a1bb748652d58AB1b45bE9AE2a": "2941987148450101858", + "0xC266b7026ce3d5590e8Fea4D4e9bB49Db5dd08C1": "425511244011729673", + "0xC26cF823AE06c9EB2b1752121ac6FeC6eeBD1043": "15754975166595022730", + "0xC280e969F69c62e7c4D148669221bEdeE449532C": "20464091532173880233", + "0xC28EEC31Cfaea878d7F35b5298CB7f85d560a9fe": "562752150840644418600", + "0xC2Dc097E7AFBB9CAE16B88723E8043f16aa393c8": "63779200204429077965", + "0xC2F4Be5b7A81c3b890a8Ce8fb158e3720c30c652": "13414545882850851066", + "0xC2d86B88AA5a27Eb1E71E4f634016C9Bc3D5cCd5": "9169141196211679500", + "0xC2e2fB061Ad567AEDa281b95ebE821D3A67148c7": "16061170680928273444", + "0xC2f394890de4c061E044202D0bf07712089a4fc0": "25497896562154486943", + "0xC32b7438b3dF7844c9eE799930a2224Fe6E26426": "34463674944303653", + "0xC33ED9cEd28850add236d475812b21BACFBB8812": "388309723516999809873831", + "0xC34a7c65aa08Cb36744bdA8eEEC7b8e9891e147C": "896066210587316153055516", + "0xC34aE1A39662415a4720d4A3e7C2Be0E202568C2": "1256367957992280138", + "0xC357236Ed6f97F3810127A345E084ba1f06aBAAf": "7742210558715328", + "0xC36720a0De1fFFA063B332a57235Be5B20213558": "43770890341220795449", + "0xC37cD5E34Ef273F6AEfE6900fc9D75563cdCfe03": "14719757769771080039", + "0xC3DcD20a93de03246eb2614A2ACd153bA4FCd6Fe": "10559850052217228632", + "0xC3Ee800543b6A445b69d46ddB50D2496F93d19A3": "8258177902004740887", + "0xC3d6Fd74dE23fbe9e8344D8659975d5d36F9b320": "11403144093176499801", + "0xC3db09cd17f9C442AFdD164c11608650362b21C4": "5612540860485370620", + "0xC3f3815B6b3990914257C2872F3Cee1368645c84": "62498462763526271449", + "0xC3fFB7960924D85F07D1860096Bf2ffc99F367Fa": "26300268256339718081", + "0xC40D92274004F749fB73e9b206687d88a1AD8B2e": "26633975011383009637", + "0xC41bffFF37e5aE4Efa42091e84e2F7DA1e14A0B3": "14116762507542979575", + "0xC42c23C8287050c6D0cDa3146B89EFBb8ab7c748": "19525867640802029372161", + "0xC44D65f66eF9988637F9Ad31e73026Db99938F60": "11085708463198072325", + "0xC457749236328D6E27FC7441cC32f273D6AD05aD": "39920828763902574228", + "0xC45Fc13F506014655Bb53d60ddC0a4C56DFD2DAc": "10178192830640909452", + "0xC4D3935bd6eCf7E7BbBCee9c1b86f049860052ad": "35185101054056915756", + "0xC4D9722Ab4101Aa8DA86720C404f9631Caee5044": "39889583491900579576", + "0xC4e59b0111b7A10c4a655aEe09215Db6f118c447": "13606969038069113317", + "0xC507ad80e55d6601F8baE8B3456a71979171Fc0F": "12098034186334621887", + "0xC51878A472090846317E3fBB6eDBcB5e9F7aC66E": "81378455386696300028", + "0xC55c7d2816C3a1BCD452493aA99EF11213b0cD3a": "8275095975658422192", + "0xC5607ce161cf2D634d374Ee02FCa357Aba87eB63": "552785242746153058", + "0xC5617C273d64C879e655Fb348bf425A6b54eF43e": "12909387109256322033", + "0xC56cA8D0351b606863D3C04F7e84170f09D6c980": "5225446668333378822", + "0xC580c2b3B0F527492eD858e3EF8a157bBcb8979b": "6508138360106155220", + "0xC587Cf689eeB909e7Ceb1A676ab37919ae048170": "8790908326643155148", + "0xC596a5F5b01f913d4C6584D5Ff838578797BFa46": "13485112028816203726", + "0xC59EDfCC2DcAb450862ad62E8E1aBc45d0c0DbdA": "6422395617554691241", + "0xC5B686bF8c6A070da19753919fE68af892830769": "14478999208248055", + "0xC5c512537e0B394592006b8cd1d8571d293BA7E4": "19913253511135419116", + "0xC632AC08E00bA53027D62297bEb2cE6C2c4EC4c3": "13347394720608017428", + "0xC68Db0E9918De8a8E9e8F895b6Fbd831b7feC7dC": "67703162932481323681", + "0xC68c10C524eC53A284FB76a91b2e97F15Fe79634": "185792980726309640789", + "0xC69aE428f6049e78D445F053D2c1df879C59b34C": "2402120287710376573", + "0xC6C9D802bC16d8746AAfCAc4781F9a8d442D585D": "384320923953737985", + "0xC6F0F6cD41CF2c96A9823068F5A2E7678D4974f0": "13062314422526140026", + "0xC6F203B30cf69Aa4e863b83Ad975236aAcC1F4dc": "16857562491485054235", + "0xC6c5cC79dc47E3a74168d110EED98f94582dcB92": "286484190334292557449", + "0xC6c71a2C93546e4fbaF9a733d3b61464f0B877C9": "406151063473157819", + "0xC773b2953dab2395Da252AfB1226880aE148Aa3f": "4123789963885839580", + "0xC77ad9bFDC6A35069D26Ff14e1E384FBeF9dDC0e": "11289552824792645827", + "0xC78f3DA585259F32a1e426294FDac90D085C6EC9": "344608381416385925", + "0xC7A0cd107cD3F3c8CE9c016E895AC1E3076f0D1B": "114878515080959192", + "0xC81f9ac9669C100Bb553cE0230Ec156ae05f820f": "7012782447331027521", + "0xC82D1Cb5269568AFfb60E5aAB1BEbF4d7a0E70dE": "63351532597094801304", + "0xC873B2F1Ee1a8F9A08590553e36f92ab67b32297": "220077920865208386", + "0xC877D91a16a5fb483dD96a4a00Ede9B240374a25": "12359404840309860970", + "0xC89410790eAfa77C997B479F7765550b5392849b": "101704654281229453464", + "0xC89dE050ec8b97d5B80B3c0f42a97d860bf76e72": "42597741802835860069", + "0xC8c6C74CFfBa0DB57fAAFaa511d85d386DE02765": "3192230303025645458561", + "0xC8d447C3232646Eea465E766d7e85902b1038e5b": "10162872481746967071", + "0xC912f332B817E6F62D4991610dED7DF4cdE212F0": "8370864431018664728685", + "0xC923dD451dFb1fC6A4608982C6c077414Da06a4d": "11788811478047350828", + "0xC9C070d4b472FBf9E652c052beEfF16b79E3B7ab": "747753376398694734", + "0xC9DedFC04350e1Dc191F59aFdF3580ffE16c658E": "24765061348780081619", + "0xC9E3FF1da87F942A54e91e83Cef6Dbe97af98A38": "44037829032458577089", + "0xC9a737b5389F157aA1251953D77fb16e9c2Cf0c6": "20358405688339566565", + "0xC9c01bc57186A5f0981c4e6F4884BeaEB562E532": "13489093338545647770", + "0xC9c8a08587f1cde97E317F25715908325497c6a2": "10666026425408002294", + "0xC9ebCC2330C68Ae1Cb74A11641832c74EB86FBFC": "22033780953962858235", + "0xCA4378612074dc26e6daec2c5835971dd8394C17": "25094187058926719654", + "0xCA72fb5737DE4E5EC8890839BaBBefaCC5CE4d77": "11138396314244563563832", + "0xCAc3bFE014Ee049d2EeEc30c7A396A29b1FE1349": "24629788511223195575", + "0xCB16F82E5949975f9Cf229C91c3A6D43e3B32a9E": "916686319411843755074", + "0xCB3593C7c0dFe13129Ff2B6add9bA402f76c797e": "2620421399841618346144", + "0xCC13D589fBD57Fd974C8973013CFF62416Aa5efA": "22593207672706198536", + "0xCC470E0AA62BD06520C336DA4073BfaB226573BF": "30136911813143375174", + "0xCC8AED3fBA699DDa548f64b7ffeb58381Ff5325E": "5743218276146833670", + "0xCC917Ab28544c80E2f0e8efFbd22551A3cB096bE": "2781878748996898320", + "0xCCb13dF7c6bd48f6EC3bc26937D9d5414D4DFdd1": "49249473241859588942", + "0xCD8b358F02cccbc8bc2478D7B0f792eBEB2019f3": "6250550616049887103", + "0xCD91bE88d75Bee27A2E3213747Dcb68A1976968C": "5247679817162883799", + "0xCD980B28732be9DdfaAF2b12b292Bb07ebc86889": "18047036308647489218", + "0xCDa53E2D0f0693430b239eceB3968C46c5119Dd4": "710085249069291059", + "0xCE5671E1Dfc2F844bb7F3D8e7e406470DD7a0069": "192218748039095830", + "0xCE936B7E11C81f30E3E100fb7F143f33D2e94872": "76664831282722499", + "0xCE948D7e6B4065a9C80d83d3FC1B8212fDa491Cb": "68956473509526473", + "0xCEade4a1A74f074085451A7Df2bc4BA46cabb314": "17062654483965521746", + "0xCF9631eC83ca364AC4B21276258aE0D3520E64D9": "318859838790344878", + "0xCF9C49B7C81242a81858200E4c49841ab0145087": "8366342544811616160", + "0xCa11d10CEb098f597a0CAb28117fC3465991a63c": "15463933123732287168", + "0xCa3bA77951542f12854ef408cd53b0b5EA54A122": "28043126824344318020", + "0xCa7b390267802dF0AfFdd9609135a2F0f28e5E31": "5784037471753048726", + "0xCa86D57519dbFE34A25EEf0923b259ab07986B71": "5472299442301063681744", + "0xCa9c5be3A85886cB3D0955FE27BB5Fa264098e6e": "6554930025531632359", + "0xCaB3edA57132cB149D26E87358FC4dcAD3E88f38": "133475552461738700995", + "0xCaBcf18822276D7dE1D22b300d177AA3ebA5e0d9": "6575290450729554267", + "0xCaC32A30630fbA9Daa85ab39738E04F6aB5683AE": "13236251276341863054", + "0xCaEf12af4EFb38Ffb54fc8a86E72f9a28Ee5e57c": "19556062086853124565", + "0xCaF5b90131fC9D799fba1712Bb655D1FD257cEca": "22449693021498809065", + "0xCb536bEb750f561D05E94A3997C4a743c583E975": "5399675928714367452", + "0xCbF8d51cB30Df1A5c4E8C94e10370f43Bb43CE15": "12522476870967594597", + "0xCbd57031B45351B8838d30c44A211162b5aC6973": "1733203800367743963454", + "0xCbf5b0aDF0F58cD1E24249d15CEB31e8624D1a94": "48706929099436179163", + "0xCc35fe348399645bb10C4a2bCf20b9d0a208a597": "21840702575175688529", + "0xCc54010FA56d52b48Af98Ad175e2DC68375Dd694": "1449886838240371536524", + "0xCcB767e1C9d2ee1d0243572675312B9856e0d855": "17638877382850495740", + "0xCcB87159DF7e22F44C512989E3A2069eA1784a69": "35664378636356591949", + "0xCd69FDe370CfFBb05a9B8d582C069787EC6C688D": "12720202530429691390", + "0xCdb62044cd1Fb9140f3748C06488FAbb83DF658f": "13483311049600550618", + "0xCe1ABfad3bbB750471F8042ccBaa8405c7f4a588": "14968712227783873159", + "0xCe6114ec69124715CC9E6B6D0af06dBB77E69f23": "29550344909096587440", + "0xCe9332f4d44e9Efccc64f88C9bD23E288c0ae5a2": "16513936304439344103", + "0xCeeD474D02362DA11951A17e352b15379132c077": "49476956227840163082777", + "0xCf09ce5ecE6da26704Ff051A4CcbfA220386B1A3": "4222903284300112885", + "0xCf4228A8c37C277c91930260adc3799409C7c1D1": "322811700468370405", + "0xCf7760E00327f608543c88526427b35049b58984": "30750037018032137904", + "0xCfa48E8A3f4c84e90C3ea15a52D02Ad63EC612C2": "35035006309891020939", + "0xD014C44FF0874f6186400A80D6068C5038F9D8eE": "26898739902578829088", + "0xD01721f1CccF35dFc8Ba16A12fAa95922e3115e6": "18890676433079231112", + "0xD02c0d1274BF11b13Ace390609Fc3C970808e29C": "5638837102666052958", + "0xD065a2159388eC1D28d3968a82021376E19494AD": "21139589606961843986", + "0xD0B1C353082b66050E6Fd70d05caE54C4252B809": "12507342042133401417", + "0xD0FcBB0Bc15BF07c2fB717823B0dA0732A663631": "89914298148963911351", + "0xD0ac140731da11047893134514D887B321eaD239": "14371156702728852341", + "0xD10793f30c96D1A01e6f2c2AEd44c70fE33a8f42": "7199086852762207365", + "0xD1113da109f7973499D652b0a34D3B5d3b6b6EFC": "13192571739431856766", + "0xD11538812F51384f483dFC3563Ab7f2dFD644a6c": "1459911966327195165", + "0xD1675C2F004f92C26355938457fd7d8CA884CF06": "1966783991290913914065", + "0xD17Ed06751Af04ef730e1D0d819e275d83a6a827": "23744090703376053156", + "0xD17e9c1119F254Add7bED14B795d3e1355D1AB4f": "138085818558446729", + "0xD19a168422EC7E41D920f7De714360b65ae41a8b": "10956258980034120177", + "0xD1B55B8caC08c5f34F3a963725A615Af31b95D14": "36454495388913306785", + "0xD1D7536e77c382a46C2FAf1c39E556Fa3E484E5a": "8295863343572400453", + "0xD1c03D3ecEdEC71C6fDFB89d66383e4F15F65B3c": "21171997420500763891", + "0xD1c9aB6166dEad15B03B57b3224C5647272f0F82": "20140508280811975648", + "0xD2050719eA37325BdB6c18a85F6c442221811FAC": "9203378641517211857", + "0xD274fec6A6B15C4c02290C5389bBB4f056e62f58": "17819877571060551181", + "0xD2895514656731170b8a63338C9Bf74c0d5Dcd4D": "5433778483197712825", + "0xD2a1677153b5b9fC39632B7C2E74032690E9FAF5": "24463083014547894457", + "0xD2e50f49d9999bb2d467B15fEc27FfAace56BC83": "13108703852383637436", + "0xD2eE347a9055cA63ba207CE5701bB513f769A988": "36562083805161396253", + "0xD304D2E6bB7D8e22d5aC26c20387d10b9A963150": "60323345884720919165", + "0xD3123ba0e9e07A9C7dc266844461259C164f928c": "6959468841611967029", + "0xD374DCd3206a8f76EED1672EB1e795D317080Bb1": "20384663087082478841", + "0xD3761e84F595669f33aBC37310C4E5aeD26CB377": "86195316285899980", + "0xD37844F4495Ff575E77D3E0D97f9f85EAc8C6bBc": "15784738382638626252", + "0xD39ec0556B27beA894718C981470A15724278585": "35594462366095255", + "0xD3E3C9a9fba6Ca42CBcc404627e18655a92a8C3B": "12579368961562721838", + "0xD3F0325F9aE1790dD83E76A3Bf4379fB6760DdF3": "48087492315073648026097", + "0xD3b29a1397b2d695aD8899487968eD385b422bdB": "6872246399594093558", + "0xD3f396Cb85f76083f4FDe8a90B1a243957100A59": "12482540473489328820", + "0xD406596a45ffC08094434A4f5436CAa15C80Ee2c": "39523025215145100", + "0xD43466e7e4BaAE2cE6997DFBf3ce3b949d5a0017": "674398754252800489", + "0xD45f0F121ae012F2A9Fc22624Dba0586eD00df04": "10035144030823943391", + "0xD492036F9250dc8914FfFdDAebA7bCA6d2A3526C": "10353986517018838729", + "0xD4B23B54314F2E038D089D6Fa6e7614415927DBC": "31079299075615526727", + "0xD4CA789F73d87aAF87d31b558ec7F1E159849Ed6": "20070644650960367006", + "0xD558fCc93d241f03246Df916455B36a451bF1ce0": "163092869982860351436", + "0xD55a339509B514EF4499BBe416c94a00Bbe87FcC": "19472346781765226506", + "0xD59F93442C4760332F2ADaC218Be97cdC8c7B633": "2434657238619534985", + "0xD5C1c0eC96a0c32E9662CaBc4B2360f876c1caF0": "51002418177296417540", + "0xD5EE25663dF644B53970925E26a78eE75A4F51eB": "112060083453867935492", + "0xD5f58F8c3a22DcB55cA66583b8234D489983ACC8": "90332204709032685", + "0xD5f833d0324488Dc499c69046A94a39e0ED2E162": "15823496740444303124", + "0xD6182936c141b6EAb8331f86570d1c08271a6a2c": "29809667884015937916", + "0xD635519Df9a25cDFdaEe3ffFFB4E11EfA759f702": "6995608700959785499", + "0xD649a8669fE9417f64d347a01F3208FB81F33a74": "1971257254414209348", + "0xD69a9068ebc98cA6f27ac92f45fFDce464719942": "4758055569187572038401", + "0xD6Df28ed923237CEf5217C88f228C160bA3B0f03": "250168418061263811717", + "0xD6aA7c9a05c14B9AB4A3C5395156e8B216C53336": "47141622974519867069", + "0xD6d19c6BB460CAD4BEAf9EDAa1D1EDf83A16a38B": "22613831277225003507", + "0xD717962A97A47c2ED1f9F0d20dB85FF2a4b751a9": "21065626592846941326", + "0xD743a0Ea71b3edefF4164C92356958b44fE003aA": "30845464966147356034", + "0xD7544d3b08c3A7b67b0D0eFe0Ffec88dada49C12": "1655663438266905693", + "0xD7933BF668cb19B8303e4a908Bb6ACF0A63DC01d": "128433978365275108", + "0xD79f4dFC3931dF74A73F6E7Cd99BF52a0d086156": "245148921507849193024", + "0xD7BE533B0F3cf5a1Dd8E938CAF10E101B4f2fA67": "245641286825927806", + "0xD7E99957fea2B2F06A4576417f6A088fA7e89A8c": "5396188684754681758", + "0xD7F05Db7680660726269E7304e479345b57C3802": "1867533622397234301814", + "0xD7b597eBD4Cc3CE53FC2B9F0d774a1455B89F96C": "115328275150977021966", + "0xD7ba735959AbB3403cDC388876cF18A6f71ABc7A": "13745599544939131946", + "0xD7dD985e8bC3410F8Bd7933779865F4396a7f3b3": "36699644344028308881", + "0xD7e7e1680C6dCC7E6fB7E83e91BbcC9aeb0ff0a2": "432838749042458682545", + "0xD815f4254dcDCd16Ca19D436E03BfD664730817d": "28846340678927078292", + "0xD827209fAD1Ab70E08fdCb74AdEe479A26206Ac3": "1139156872137045104", + "0xD84624c8C2E2ed488918EA16D06E766676f27599": "28157907132876588686", + "0xD850bBe19c5AD049E25d27012e94Fab11c850057": "24334256574517247049", + "0xD855c9a5Aa5d2E2dD01ACe86d0695651C2568197": "8933202139166508482", + "0xD8568C41Df66b54A60C617B98816c38C26fB56ca": "508392783363202798312", + "0xD8993c98d2Dd225f0448429B793Ee9E7d624f14f": "13322707068165688313", + "0xD89dCd226f1f902D060B4F5897EDc130D8a7b312": "63360547818153469", + "0xD8D7af304B62c7100aF258bb6Ff66f2D56D20738": "358915903381872126145", + "0xD8aFdB4Dd24B70A776e868f02246F413d5A6b08c": "8036502475453883226", + "0xD93A6E6Ff448087711ab5Cff74f27cDE3680eE92": "8824506365986230455", + "0xD9C61c6a41CB78ee8124111bE112D352A7CF13C1": "19391425450251696859", + "0xD9E8751084e61513669B799DbEC613b21f05c807": "42285897767874212200", + "0xD9EEa293C6f32043753E75B91861C358d9813Ae7": "16372531355845799183", + "0xD9b20Fe633b609B01081aD0428e81f8Dd604F5C5": "3710997791633619687", + "0xDA0fA4E0255B573A2f5c3c0f28A88EDD68820738": "9436466591735762730", + "0xDA2a26efaF78256144831F309Eae6F566726F463": "639316687565314395", + "0xDA6EC3fcE4eAa2D2B75af9f29080665c8b3A9D0F": "12485500186250089444", + "0xDA6c2d0f44352D9f4B8Ebb00606657310eA4e26B": "390014981187269708", + "0xDA76eB73F18DCE71750CA3a9d918B2BEb7751e9D": "5526434494264016083", + "0xDA7729c17865cB39A912660769F1b401eb2C6e8b": "12044821587834054384", + "0xDA7cE7fF117fe1019a9Bf32427d469359250D0Eb": "210042139431281612703", + "0xDA8004D6AB073B9D5549b7D5599D51FF1191C747": "17897985568169957427", + "0xDB2cba16f3c5b06e547C87fFF4f6CA6D06953C17": "13792414036465588950", + "0xDB3716E578359Bee725d86738A7FE45c041Fb945": "22266894133571563341", + "0xDBACf22dfF9E5842a15cFB31151B8ceb0263c6f9": "58984532927634695153", + "0xDBD47caC7732aB0B73706978d57DF80375097261": "18399238426652177755", + "0xDBf30e82f6b2cD0EdAd1c203fF4aC5CD6b15E94f": "46986100790511388652", + "0xDCD9Ba2a51f713a5BC31800C260F364b275BceC9": "32031064086217181056", + "0xDD4Eb4398789e930484DE1Aec2c5bC210f5A657B": "20143185478713390232", + "0xDDD3CC26FD62A637E7b9c61D17CE7C61f149d9d7": "7447565616742834695", + "0xDDF626Aa818a590B6b18bcF4876F22EA6D8B0Ad9": "14352012872448343646", + "0xDDe7a13Eff42834b842653dF4c72d8317E407208": "19053828669370022236", + "0xDE2f2aeD377E8e9A015A2A91954545AAC38FD83a": "31992475772983153797", + "0xDE32d745cbb3CE446DdE65Cd3fa428e61055c338": "46090236813919470365", + "0xDE50bd8Fd4E7B8E9fC048938d450120C51fd6DA5": "11385165647619503291", + "0xDE5A83FDcD07800E5F165486C34edb1525D40e44": "450585007571753572", + "0xDE5CB490f13cB765d2518A366aD394D8751ebE50": "85525966343336314678", + "0xDE6967619e2fb047083F614b8534AE0556c9e6D1": "5578963642831952048", + "0xDEb6aa85bcD0e0869FDE8cC72Ab355C6Bcd79e58": "8220688341453402083", + "0xDF009220394F7e2915aa8235B5c5C6E7B552652d": "15748348414529719949", + "0xDF909099216db4C15725dA92E069B5b72a1FFF9B": "4237575845659761437", + "0xDa10A56352182b141662631CBb640E6C2140f851": "24299724594966470962", + "0xDa25A109c7D383D73bF70623A87581840Ecb7429": "9075053359898869009", + "0xDa46D014eE69d0faF02A3811b06877d47556aA8A": "5298029404145158702", + "0xDa6CaeFCb34eCe4860F52C30552605e6BF86694f": "4111727086745035733", + "0xDac98eE357BEBbbD1FDce00979A8C867875E6A40": "32672170981133209231", + "0xDaf3ec850aB6165334E31Db660Fb59569F796B3a": "549258826992949501", + "0xDb59638d7dE596a83234a0f39d7514Aac0Bc55E9": "1583162006228147367", + "0xDbF3b03852767017854824D3C7474CBc74F1425b": "30046737230321929297", + "0xDc3DCaC0F2c9f8D35A47FE7406F1054a03A70883": "6309453649417938077", + "0xDc51DB13FC0c4546965ac28fADd062A23092F32C": "18808484501850157047", + "0xDc82cf5b6cF274F040ec0A530d046ca7018F6e6c": "145148930314656832534", + "0xDd0aA164291f5780522D7eFe334B2aB342096555": "13824872044053775", + "0xDd4C59d3289E09A7FD74623E6A6C4af7AfA67032": "14568065470685027791", + "0xDd90d2262fA94Fd9f9868fE6e82065D2C1D94Dc5": "29556906959106670226", + "0xDdA3Ebf6CCb2632CCA998300bebb68529bad4351": "29843168159953985895", + "0xDe16DaDAF0A896b9f55A8756c6aE5a9eCe0C0399": "9892241055402049194", + "0xDe8443EE81f036602a030A28b10bb349a703DC43": "34024808465813098458", + "0xDf7623ddef55974dE7DF8E3E9cFc8CABe61182D3": "1381273464269696629", + "0xDfc0484FC9ADF64A21A86825178ecAeFDe32D0F7": "116196270541507328243", + "0xE0208A835529e496Af01bc0054876C29cD56Af00": "23620015200103270599", + "0xE042b805d483185594E28b74e1559AeDa5465738": "757549842206143624", + "0xE06e57F86b053271991791175414Da05856D865F": "17097205577960993698", + "0xE09302DA47D3c9ebD4739c8cf3C5FEd50b19956e": "5351218967236093192", + "0xE0B5bb77744b04A0aA3c6b69eD1cd62793439384": "20109816256127353700", + "0xE0EFE6Bb91d4d58c01D5021c8d77e9e4d2cC672b": "11802381318657876771", + "0xE113E7B1E8Ecd07973EA40978aED520241d17f27": "1165393796197428543191", + "0xE14BEF68353829DDc5f7A771F77B9652d180aAC1": "13168419185947108379", + "0xE173cC94d4755b72eB9196Cf50DbcD2Cba54e348": "4474543429366791259", + "0xE19170A2492AfeE0bB88892f450177501Bf4620D": "21336166878498364485", + "0xE1E297478cd25fbb7B8A78e0B2cc779764888CFC": "10554850896546930781", + "0xE218EC4a7964AD433222FaD1c8Ce0aAcF72c1053": "18880077512298556564", + "0xE21E476a09271EB1725DFae086Bf74Fd1866D569": "5754799276260051384", + "0xE23c2adcac4BEe353472da406403b59b86A49086": "28308939703423348642", + "0xE250a43baCaE719B48355aaB16167BBca534B7A1": "6276345680452802977", + "0xE28970C7c73b4C2ef8BC15238b8b44AD40CEbF3D": "3810679472864018667", + "0xE29d4624133744EE7B20aCC64730803261Aa4B46": "1279310815300023446", + "0xE2bc4851ce8Fdb504a9Bbf7173a8fF18D1409819": "40506312119842791195", + "0xE301ED8F5f507f2518E63bE8ECaCCFd2198B1f5B": "24608713036613918278", + "0xE333490B640aBB7aBE34BC0A99Fa5bf3eea1ff62": "5014030490472493938", + "0xE3822Ed091bcca25ee2E09a5A0Df752bb1bC03ab": "21164696136350209626", + "0xE38C5fA37006B4Cc9Ff0f7054d902922307488D3": "1043431723039449992", + "0xE38c784b00892d70d8513cE432C6aE59AA2A8D6B": "29446844183842439930", + "0xE3A804528409fa859B106347f6d4d39478Ad6DeF": "32392873065277654649", + "0xE3c39f565B9aC45Ec2B11c64a91daA92eF1439d4": "3663699507888242986", + "0xE440A74c9ed1C41cEf2A4d96B31B3b87F1A39035": "10739627079281544773", + "0xE4A13025d04F8960e1a23394144291DF68a7aEDf": "7354113546487013469", + "0xE4AcdC9EE4A572c25A14e88d49f08BB625aF34c3": "5285398208572635767", + "0xE4eBb84bF300F841F4CEedC31E82Ca80E15aE824": "32680557321799676056", + "0xE50aB4B13D2790f2489987F46b8470dD0041b5dB": "53916877475065970654", + "0xE50cF97a9Fe3100D731a2B17C767DD09CB17295F": "5695772995617964653", + "0xE51b39397af5E5732bF92c39dA902DDC359CBABF": "19639115637052324512", + "0xE536ECA92b17C3886EB8aEe0dF348eFE9F040dE7": "5419495989893204800", + "0xE57b8b54444e78a08871FC93aD7C5649EC27c34f": "41964815433027490832", + "0xE58ABB0D65237A3D49fEe3CCCD76f851A2fbD51D": "7868684723321423260", + "0xE59104682a0015342fe51299cb83Ec04172aC604": "130185029806901237793", + "0xE5C938639a6782C1B6e0eAA0B99f74174ae7ce3d": "24306109808424415216", + "0xE5E77278c271456306a6f8C72577d5869D134B16": "19861419295417686428", + "0xE5cF03902907E204bf028f473Cdc17d29904e91c": "19412141736275988559", + "0xE603C11017EBCEfFaa32084f9BCAD508cbB0D133": "8607215353705085451", + "0xE6068D04C96ea3a52051152b2B8b979049a2609b": "25255045674652243867", + "0xE609B49B4c275a472BffE0E4706B9cc42c00078c": "22534095721633896378", + "0xE679aA5d930327F423ed5AD074BA81A33299c2a3": "29240208695938138285", + "0xE69F609C75f8640fA034166c63929f2875C01343": "32959613671416886720", + "0xE6D2b1B778687b6Eb70c8F77eb50c8D420057B6E": "8758959285907303469", + "0xE6a2Ff49B934A26F9C4A4e4296920f0512Dd11c0": "7791560063723060076", + "0xE6ec77A3AEC925Cf4d6FC1d4eff02E2E65CfA302": "17744830118945818638", + "0xE729E82C62bA98Ee226DbF680803CFB4189DBE30": "51736368150563855790", + "0xE75307D019616eEc7173974E9d6536e09A7Ce87b": "7385457399653729452713", + "0xE754b9be1f5997F530f889cea3Fc7744cdF4D86b": "244085551803362685", + "0xE761C43314A16FEd02519F79481C06022879Ef72": "9103392187788491417", + "0xE778bEd61406143CB17a32257F442C95130e8Ee5": "20177269296756342800", + "0xE78cceF7B73647Bc298B3360a4B7Ee7f19943862": "16669093120890336879", + "0xE7917E1Dd57F5a5434356d9e43ECF56870012823": "355661600189174370599", + "0xE7EEb25f30d85CB45c3312D6b1165e6Fe4406A29": "5266691404051282439", + "0xE7b1F0cab55Af4e110FEf36A730E9aDa8e200E74": "12152584521869275843", + "0xE8349f1DB09778a47fda6A89598a8dd24615Bb4b": "16448339350495268235", + "0xE8575E8D45bd7942392bD151f1C22971a34eEe37": "14831293266299563219", + "0xE894134d4a0AcE17309ED60ce932F1Bb4739D00E": "54827546673789612260", + "0xE8A2be76351cB17831bA9FdBe66a3dEfDB0245BA": "6231518505800100211", + "0xE8AC1370005ED8708a003c5D978692A7198818a6": "5236584767626809136", + "0xE8EaAc6d05EA1A601b9c8229aA7e8Ce4Ee2fc187": "131414584061654352764", + "0xE8b2D43Eb45074B1dfaC494641E15791B32d27A6": "9066189201082271657", + "0xE8c75B55020341149692e1a15f3d68f176909f57": "6797577340375551079", + "0xE8e5C8f71518a86aBD022Aa29c005BE68ED873fC": "11064591791081599177", + "0xE90Cfa7B5f42F3AA2d7d264Fde10903BaA0D5122": "23525271569344077641324", + "0xE93D910C5fc44D31fBF64c61aDa8dD7C603f1048": "5966934163606332713", + "0xE94A2B1655f0051977676ACFc6866383EAFE56e3": "6674342835424581134", + "0xEA1FC0de0c8E7Fe1B6c7cff8cC18c846952e5e94": "49464128053458188137", + "0xEA4234BFa7C11ddd56B70C8F4cBC9fc7816d03ac": "38475565158194415497", + "0xEA5c99799B2d2846ab64CB9C0064Fe1AD083009B": "566849803876095655", + "0xEA842D7656240142B8b0F361BD7039C6e774cCcA": "115265636007029134259", + "0xEACBFAeD8774A60B0390b95aAf4F56f272537c37": "42592663086585678673", + "0xEAdA0B1F19cBD692f48EFab5209217EE727A0525": "413114921369871315", + "0xEB2314e603a812B6dae3175ECCC9820F02C04BAc": "14228399942088156863", + "0xEB549C3BE42Ce5940a18CFE0b1669f0f4976d5b7": "1713295812786311779", + "0xEBACa7919Cc1cc332738F011424E50A5D0b27Aea": "13672958312723074836", + "0xEC203509d41F9bA96Ef26Ce326E52D4C17E6D40b": "23802155114069574080", + "0xEC419329594A34d4938DF80808B0438641C18C82": "25650316095761613195", + "0xEC4BAE718F06fF142e146D48fcf044b5d8Fe7C52": "28418442347891602790", + "0xEC56bb4BF3F84e50DC61A33F1A135c1182e15c22": "8494406756512698656", + "0xECA52fAa10342EC1f03aDf8762985a07e7237775": "17810925310908875052", + "0xECD2d8a907ceF9F1006C2987979D67A7623a4C35": "60188739902277918", + "0xECb989588BE2E2D839F8030FD0CFbcFf6430A922": "17719384715170018118", + "0xED01121a076a0154B12E3A50d7Af9dB421844398": "31302441277768488969", + "0xED4969C7f324240C62cE97AFd92243a9Ce6746A0": "100858067931552503461", + "0xED66081dF3f42a5e3Ce388F93815Eff87462F1CE": "739738983918220623", + "0xED80B758F8788CfD8af5D9d64C76911A68Ec111D": "12197234891956037448", + "0xED80f39CC520f4258813cB4aaae6563661e19b12": "379895971306433575", + "0xED813fDDa01bfE8afe6830223408b28d20181Cbf": "6499487448432246130", + "0xEE0922A6b0768e32FA66a8AA51E8C0f085A2Ed4c": "31457424505308919560601", + "0xEE85e35C9c4Cf4023Ae09Ad3eaeB489319B1491C": "25244722688815969669", + "0xEE87f1c9E31e16657edFD3c83a63A45ec150AD69": "38924169771669855766", + "0xEECc2f53B467E964c18b1583786a74a8bC5Ae335": "75738668549779622941657", + "0xEEa1C9C0Ef11F74a120CC12544b96E35274CF30F": "7314367935113700392", + "0xEF08c3d5b02cF6240Cf71908D5dBD497e361584f": "6961866697457659730", + "0xEF868D7eDCf872a964FF4C59bDeD37F906085695": "12082251317328023237", + "0xEFB4170241bdC2F264978509C500553E04785828": "6041312987375357450", + "0xEa075c1D004D56b5e7643E1b2a4656EF72AF1Af1": "5079802167934804130", + "0xEa24F605fF7a7fAfF0ec68859E9D28B21228aEA7": "13397367829037140274", + "0xEa7F097368B777Ea552706fe261d8d5eE14aF28c": "5539162276743361211", + "0xEa9c95aedf973657b19E1A112BF47cBAa1eAfaf5": "146655907532058257", + "0xEaF6455cCaB678B625C063A58BA6b9F267Ae6f66": "1892647835439986433530", + "0xEb417bE70529D525485A9C71cE428166be86E8D2": "666210697760469496", + "0xEb87C921B6ad33892e832382D955c0025C71eaCe": "3334365534848641503", + "0xEbC7c317127b1595452165cF500fdf7eFB79Ab74": "9131501786652277285", + "0xEbe11c86FBB0e93841A99f400824eBc1e070c22C": "4698995340520990267", + "0xEc30507E1af634869Bfd78AdEf8Dc428B5524478": "12046176381116487372", + "0xEc7b2AaE4B2467D3B06E258f9988bDE34C15e786": "64901733990620165685", + "0xEcB7f4b32e86c77fB990f99f6d084443dF819416": "8317913432058312303", + "0xEd2Cc8aACDc01ef2Dbf76da28EB4d9207D900533": "27822715221561709428", + "0xEd3C3BFfCF147850406d0E58Ce4f4Ebd2b5Cd96C": "18507252472431501448", + "0xEd4Bc14d4269E5FC8AD29b6ccAb8d77Fb217b45d": "20906010623884457476", + "0xEdeA7950d9BE5bDD630b3af6df016bc68CEfCe0B": "3573701154213097235054", + "0xEe119Ab8CA22f2b9b3E7F508739f3AE68c838A94": "34461000996897240", + "0xEe2E4c46be875A1FD3810D8762c74D215F398f1a": "49895371001529627368", + "0xEe45BA369a8a93214861B2BAD0dcE7D9a7d0eE9D": "44830758182961363988", + "0xEe78dddBd43161b3e0aF4BA8d980709cd69E515E": "13816408307701639435", + "0xEe82394b49374f10A2844A9f59353F84D5342ca0": "34652440673337435620431", + "0xEe92B0AaE576C44065AA8573cB4c6acC52A9B67E": "55716070038932873130", + "0xEf4DF93CC54eD3896bdc60771d9020777D481F10": "8612645727016170415", + "0xEfD387fC2c15BA81AD6D7038AE914eEcc0F01582": "22703492571652877", + "0xEfbD41626F23A45eeE3B59106ff534a734cb8e0a": "1725713044114593330583", + "0xF0002E31cC9BfD3f34270a86524922321446B171": "20412205972304210746", + "0xF01bDdD7eb31FD4b405A4F21F702a68B9E797732": "11181296819953137537", + "0xF063718bC448EFC9399Aa7D7D256f3B3b4b8680a": "22736839394100435087", + "0xF06F09C65635ea3dB2F6255cABeFcc11d28f2ef2": "169571730950986830", + "0xF0b679EB3CfeF573ac4702a6F5043A7F1cF8Ba2b": "17802453952751077110", + "0xF0b83Cd46D3A2C08083813CE4a0004A050f7576D": "11486911562935799258", + "0xF1163812C3382f4E388438139109ACEC9bf8360e": "9453048884239262936", + "0xF128f48AA68012e2010a1731C068c9aF933F6832": "790100916258523207", + "0xF132ea4610d4F278D611E1a177aca5280F89fB99": "2249726300000284475", + "0xF14FC29A5A686c112dF2780427fb25c1E44ED84a": "10528755054843687377", + "0xF1B5eA78A9C9F60917c16dd50151C206dB8bd699": "36445819175101613571", + "0xF1D9aA21A6B827aa5A78B7c7688D1Ad1367D425B": "10008449989756652903", + "0xF1E25B3486B90B46Cf0a828Ea1C068A951C2c930": "322621297487298112", + "0xF2582c7d760F6a634926433aCe8e5Dd700A4A987": "37588467707584064941", + "0xF259a29046B17C0f3bf04dD9CAF9d8Da91acf96B": "101301279239473274", + "0xF261F1d45346B363d5B5341DECf58Cd9a351c05F": "20481804230398416203", + "0xF266DdF858284F2Fb07C7916C36CBb9D3bfDaEc3": "12914000484499245935", + "0xF26B1A94350C1D3732Be5BC2838271D51bBE6b64": "821798331691704112", + "0xF2ac4Ce626453F52Aa44ad341d7cE8ce0Af50b61": "35695423362524000428", + "0xF2b7C8F1Cf94B9d8F08664137827f27F2eD00dc9": "35461180719174458486", + "0xF3037030313F1cFd75083db1b7E410E5Ee30eFF6": "11040055838907942251", + "0xF304b6D5DD29a7e684669D4f5F7Ca0bd8424cB47": "345074277738320553", + "0xF37A4385a389576c3e375d4180253283ec74161d": "18579421875569651065", + "0xF37Bd2d295a0fCe14c3716Bf0f02dB7462D79F4B": "6885342207159011866", + "0xF3C9C9B1bAe1d8463dCfB439A70C63bb7252C788": "33658609197565138607", + "0xF3D581a91E77D261dF957e1CA8fE2137beF4046C": "5329793208420647367228", + "0xF3DccE0102462587DD36FC7d695609D7A20fC825": "3647949607950132636", + "0xF3E6bA583B960f7a8B395212FDce8A92a0DF912c": "53216533040953645486", + "0xF3Fa515Db4Eb5060D0d19fB979F56358960beBa4": "16095026203548540590041", + "0xF4019A11BBac3DdbB4E2394Fb8d2d4A008C7C85c": "34865983518941990801", + "0xF410B38C47F5dD369438484dECdeADcd90eCf568": "12868461646200074848", + "0xF447B405fC7b41DDfeF3CF66EC790EaBd6b26A47": "241251129148247898", + "0xF47d88D72759864476466E5aeD71A4Ca2A80E136": "5866258468976012770", + "0xF4A78dd2A5A590266E34D2905a4B822Be3475D19": "18834298192327186445411", + "0xF4Aa1f9a106Ba32e9A697D75f9Da2c9889222a1c": "14192841070907732145", + "0xF4C2949edC28B09fbab45f4f6B15634F4A27df3c": "6589974214140958468", + "0xF4D9C40289daEb85F0f5A3F774D2775b4f6D52ac": "28788991952386310", + "0xF4c549028f6947669A8bc71719415AB056CE81c8": "8810153592887580323", + "0xF508c2be6C8b5f10a6ea4637332EC9E3270A6fD0": "38646149274712759408", + "0xF520603dB20427ca905fDf834C7fff5c3dab122a": "45671272100151857402", + "0xF523592a9493f4Fb1F447E1D6994cF2B3aaB5600": "3397927149356800124", + "0xF525dBbA0cd525170bfb703f705F7B6065C6b640": "50945951612065212613", + "0xF54f93B9e2DEC0b3351CF19de83480ab7BB8BD45": "8390367628967319201", + "0xF55F8884203632EB007F239758D1B25cd173458B": "169571730950986830", + "0xF593645787CE06586740Cec9e815AC986D39DbE2": "10353379900138792021", + "0xF5BEDB8358A75F8B261C83A347e967DdB08c1c0C": "431078348183363631", + "0xF5c05dB4e4445e45cb268456c387b6847EBB6408": "1205662650416664341065", + "0xF6206807331c59223390E261e4C3ff96f6b9C981": "4733863371049245652", + "0xF6269288e33a457ca8f2f3592f926CcfafBb89ea": "1324378532185763135723", + "0xF632B0a44F03dEC2D7c05057B49CD9e551740E27": "12550949847646563826", + "0xF635af1aE15D537EA3FAa882f15b25CB925a7E91": "264788450628975359166", + "0xF67bC9b00954780420afCEb2BdeB1BCB47EDfe2E": "1833271413220175990", + "0xF67d88E61a35E07267d95CA89F22A7bAAC8edbc3": "5696007815454059862", + "0xF6D3eeDaA7F76db38EB0F1583AeE963E124CAf5B": "803262766289245586", + "0xF6fe0BaC923CaC19a534C7C47d59D5487f26f8c8": "40118302416538937705", + "0xF7338926Db3f67E717403D70d816b3A29d724136": "12222142776069518838", + "0xF77343801bB6FdC43e7879c3CaF16e7C9387f9ac": "16168956064371077293", + "0xF7B18e107eb36797f4cE36dE756630B9C30969ad": "584647889969985685771", + "0xF7E83FD6b9bA1d01AB3122C870053a0e6BBfE771": "9562690742168773001", + "0xF7be2943dB9570AC2FBCABd11E9A0EbBE7b007c9": "6585245828146800804", + "0xF858942F64dA6bC7A92DB94f6d8ca83c0C614355": "1915528226300957133057", + "0xF86113550aDb658FEAd4C94686829A2a7Afbdef0": "17998532275075972024", + "0xF87F1d49FeAf5470EBa422F20550Db5B75B76447": "72108437549732532647", + "0xF89694c646D448C19319d1394996A43a9bEa5ccC": "15854699501139253931", + "0xF8DA8EcEE025444ad8Dcf065AE09CffcD55c6116": "5278054769724655557", + "0xF8c534e04d1c8990eE81877bBb9fE39132107d47": "247207356183757644682833", + "0xF8e95aa8434B7f16113f3d5119A4464DdD2E8d81": "3635131724785461473", + "0xF8eF2f73DE4D254cAB7d37e4e3f63D9919A85Cc5": "30443736662062831305643", + "0xF90A01Af91468F5418cDA5Ed6b19C51550eB5352": "20233108229403770079", + "0xF90fdD6bfD90aa47651D02B16f49097B3fee3f1f": "19767165898814688604", + "0xF91e0e9C0Dc2224ebeDE66Cb60Be5a8250d1f0Aa": "1613858001352224517", + "0xF9298Ab3358DfCf4eD2bAeAeCb577E145c263887": "38713096201887482572", + "0xF9A6A6f9fF1f0Ac3a854418CAc59Cb81a11e827b": "93992317096347728256", + "0xFA419b8b0663bae1B0085c4977315bE201b23D75": "5161859345853102608", + "0xFA6C97f0efFaB1Ce8D7CD80EB96DDF2ac6bf0e38": "30724718683675707064", + "0xFAee289c8a5fe008c0CE4f9dad3FAF7aF014Bb93": "20588286928981942", + "0xFCCd32C6D69efe031441c17922D6CCc62Fd4a463": "24153222809042602765", + "0xFD965991f8290405C6B4C4c5767eB0A550571d95": "1872024056545950", + "0xFD9f6cecDf70588525D3270Aa9D2e6F6AE5d8Ff8": "8085379705265273114977", + "0xFE2fb6Fc91BC3962ddb9848094d4A4ee3f309d52": "5457774693210016049", + "0xFEB7f2AdB9d4C3757b90F65e37A3D7824b6F0753": "4649581707781092386", + "0xFEC321ea5242D9ea0C34F3B88B52E89772c9770A": "16560710064861395732", + "0xFEc3AF6358f81F1201Fddfc2E554b8e2e8524b10": "6184778933966942550", + "0xFF1173c2b45A116960876634f97AD32f5Cf0f3cD": "18762076822412278570", + "0xFF2F381c79a7a63de39c8Dc77A5869a1Ab2fCef1": "13444038612632794538", + "0xFF4446f3dBba242e2F6f86e38295f596e0c24B01": "7580327214353192613", + "0xFFD2F3d186b773060724dC301662218767472c5f": "1378623545749381737", + "0xFa7e21087Ed202778C4f9082194f6a01F94042a0": "24893472988645540690", + "0xFaA8B09543748cd3d0824462D2b7E3440AC435ba": "8218705179890035073", + "0xFaf878dCD715ae2eeffC33183B36a54D48061A16": "5980900795169481616", + "0xFafA987C525B7aaceF0a0d09a2403baac954432C": "33699177701047550277", + "0xFb0A7D3d04F2Fa0fFE1127D67AB9a30a0Be1dB3D": "282616030632416663", + "0xFb7B8EE6F84e695404C3501FCf33657ce232D6f7": "335282453366556068", + "0xFbCFE4AB8922B7Caf23D3E28634c4AC05475502b": "8448352494802509007", + "0xFc0c476530D9742Cb116027c04559D0dc26bbD12": "1021158371251572165", + "0xFe5677f2CB42aD421ee1144F59cD7D9CBe7833Aa": "12031558296399604445", + "0xFe9873652dF7216F580110651776578978Bf1853": "444761503418550980741", + "0xFf036376634bD0F766E57d7A010e966755979cBe": "55569525542893315039", + "0xFf04B87474Dd0E56133f6Da3837aa318212D0711": "21832240741552657152", + "0xFf9ca76a18179147c987fC1790be5Eb95d9686ff": "60951379865887480363", + "0xFfE106C04bAf486baFd37303f847184de6fbA839": "43825977804528479882", + "0xa06FC4bB730039B6970aCb7aEbd444Dd217428b4": "34169003259834491813", + "0xa07D96491CA322Ef3Ce419cF0FB05085e610Ea74": "35471143058753351770", + "0xa08677F81D757bBB5Ee957d2AE69a660313A6248": "11337018810012442695", + "0xa0bfbCF7DEa77994ffA6e07002f32DacE21C0fD7": "229298923344712508809", + "0xa13819dd954B91fACa68CBb5c3b4187d09c4515D": "15034119914529996160", + "0xa13F3516c4027d4D22781631eA43f97C2881020F": "121410214517260908798", + "0xa15b5D913A8e1D490589B0103C809C8d868A9298": "19335244267957341068", + "0xa180266EaB142d648E249812ff5905eFeAaf5638": "7634061843738032428", + "0xa1E7C1fb944771B602e47Efa81cBC19824247Bdb": "15872028008481065167", + "0xa1dD6d013C55Cc982F5ABb067Af9201Edc1F5348": "2293480174380320892", + "0xa20Bcd0D8bF5757f2737e7074d7A2Ce318e22F38": "48059597291713375442", + "0xa2482119f77F7dDf47345cc084551de2e5BC3807": "3389593131098500727", + "0xa289364347bfC1912ab672425Abe593ec01Ca56E": "13915548887457397692", + "0xa2C62a66F6660166838B95DB60f234dFB59e765e": "7169380560811731801", + "0xa2D9b53B24d210CbcB50D9142E15E8c8a6E7C13c": "7870765936504530681", + "0xa2EC09f3927d0955b31227baA3F86b089Fe611D0": "981586512537451558837", + "0xa2b31A9E5d89026Abe81cfa6751bBe42be2bfe3f": "477062646643784875", + "0xa2e1F22095fDEDc073004B67e2D69e1a4c3Eee77": "25004274772749264731", + "0xa36183FA72bd9547B0dEeEA69B4784024B8CDeca": "8986136505076502742", + "0xa39d4767F6d57ABceDD4e1be85e5599bb81093e7": "25224632330015092084", + "0xa3C43D3AaF39C4f30dAaF7341EDE4a53480d164C": "9730764682397323252", + "0xa3a3C6df9fE3e22e9EF4Df63Bb1151EF47E2Cf54": "46940989493090851650", + "0xa3df903505de4C4F26Ab815E2d117C3146277432": "69504609095566204271", + "0xa4158962C2b83bBd34c52f6bd4121C1B29ceE88a": "48032729361801909967", + "0xa41778C9b64937af21579074d54008FBd221C7D6": "1486934853349229376213018", + "0xa44038533F10bF668207c7916Ad341400A75A70C": "86861554397323057036", + "0xa5378D4577EC91900aE80c994BEDBcD2ac8F613E": "23227687981200066360", + "0xa5505e143707E1DCd5Cb605ACCcE7DC64AdAaBd0": "13701769436468743834", + "0xa5671B19c91EAeF4d7aC98E0c78Ce67530c05feA": "16775496983181323465", + "0xa5758de121079D2FA868C64b02Ef35C909635f16": "3003811810704031502329", + "0xa591d6d5B852d81e2Ee803e7E93bE2A373179EBc": "10465824569662584936", + "0xa59dF8bD601Ae9D7A397E446D7f6a1D2F4d4397d": "31446442110422753907", + "0xa5C8B10AD359e1dE5bB2ed69798F4C233138C41E": "35572081514920772672", + "0xa5CaA452eC7abfB62143552117fc160EC4fd3b07": "13549427032845758418", + "0xa633b31C2Be65095FEA1C02246b0624997C69c17": "19665373606040780360", + "0xa654f55F8Dab1A7634703576f090D9E6A98e7A25": "8133922598794213692", + "0xa6EcF48A713f12b2AaBFB3EDa739a81aFc988766": "34050667026636009065", + "0xa6aF91FEd63c02D2e0015F43cCfA2Aa18Dd268fa": "13134742363683647433", + "0xa6c985f395101E18301e7528818337D8701ddeB5": "10431557997400556444", + "0xa6f993827a2213A3D61cb0123C9318331275e8b7": "11990643531189048811", + "0xa6fF4f7e57cD34925Ec3352c3a1975B874dB29b0": "162328494786945139235", + "0xa6fa214a3628beeA799d8c67Bb16a0a79fC57cB4": "28993848988814563414", + "0xa702AFC4451D9f62aB004F966907478E9996b21a": "40708978638675053333", + "0xa76fF952a3DDd42cc4701393eFb94F59780D95e6": "5296553525669533299", + "0xa77CE92A601D504a6D64af843EB5a3994616969c": "1982735241642688898", + "0xa7Aed907939F1dfF849666118052B459bc3865b2": "8573928760040324101", + "0xa7C00aF4BCCb8EaB442EDB440FE12A2F7F644D69": "5592795194039717474", + "0xa7F4e43E5693451589ceCbb5e769Efb0a26B6497": "14581159871476702440", + "0xa7eb41dCFBb5C99131B15395F427Ad59bFeCaB48": "2257015380465731004", + "0xa8180E17db4487Fc72717c44916362842Cc1AdaD": "1010194253945769778", + "0xa83293E1dD3Cd51787CD44a57B1682707f6C9772": "94427901470905499452", + "0xa85160a81da205AE57F6d55F16C9C43d773c7438": "197795033205859508", + "0xa880Fc0b85eC6292cdfAE3fC3E1a36507c212756": "27332166324252026449", + "0xa8DD3191E55cbc76a99d38F97581881c1E0AFc17": "145582149245950043", + "0xa8bd6A9e4070BFf5F0F229A5C863B9DE864309E9": "14600607018333300726", + "0xa90fef6Df22f844f875B4344BDCb4A3AEca526EC": "6487866806823738006", + "0xa96E5EF5440A0C6703CAF50899186be73EF514B0": "27026849453327330623", + "0xa96a1603F03AD2B35E390BA242d7f1958ea01397": "40840641752041055117", + "0xa9782643B047DE459d37a4951a1cd7cA46AA1932": "21145788287698035290", + "0xa97aaf7A996BcfeC0fB02E9645A0458b83870D2f": "695098852623205498", + "0xa981A75B7d268213478EdfF0a9fa9EEC35280284": "10842105592392979322", + "0xa9B25eA4bBC67de8C34ddB3C3109cE389F06da22": "1439112113080845042", + "0xa9C61372bf34765DcC8964270D71a58Fd23A191f": "19200743286508736494", + "0xa9F123572fC3786314f66f95F59c1ad3Aacefd54": "6898572734367523398", + "0xa9e550dD2B5b1CC2AFcF4c4d218be9393794378A": "21994336083983165444", + "0xaAA857971C17c8D30c880104E6Ea71D7Ea39a1B3": "385159706626500476", + "0xaAB05b5677A4b5065ace8b4b07fd67121D5cC4e8": "1474017378311142749", + "0xaB4F21AE6cACFBa0eEca1521A24cCAdF4EA6f349": "4639213013067127439", + "0xaB9424c3507BE50d8D9b185e58E1bfF47F1db642": "38129243727820685465", + "0xaBcefb63bD47102A7d7b3b71E938ec9B2bE5ADC1": "124910214623763130304", + "0xaC09DC5215197c5B93Ba76c5ee2A28a4c6695Bfb": "497231279723057791", + "0xaC0f76A8c30E23bc197D26465e7bE319713c5224": "73681535380310517266", + "0xaCE49a1e906A7668993AE8B793cC9D6C22375e26": "10686096117212059670586", + "0xaCf4FF01867EF7D8114f1Bb17f492e69Eb8Ee139": "1435167609775452629", + "0xaD05c8c724d9dB41CDBcAD961644FF23b17cFFBD": "7706787533744689155", + "0xaD24A38132B26144404272cb124fD38c34A53ff7": "1755675417986384391", + "0xaD3Ce5274F8E2953Bb87b838df3f01C1C224d346": "91127670511317684572", + "0xaD3D44c00f43553A5244938D5D354a7d73B7D644": "5337599381730173398402", + "0xaD5b009026Ca4a0A2604A4023CaC6c5B5DdAAB59": "8609747297286126888", + "0xaD6DEB5C47EEE094aE108c5Ea4c458Af7d35214e": "6859156445580272055", + "0xaDaE0Cdb5b7fdbCDb6094b80aF96869Abf8aD394": "14304438879439729759", + "0xaE1d0D128Afe36eD5baBfD3098f4b74bF92bF19f": "512785902067771291318", + "0xaE220428c4094e7106dFA8b5d7aEBB0b8b136d9D": "12508307152302979552", + "0xaE23636ec2e26F83156F7e512A98A1b688aFf209": "6125264691532198716", + "0xaE2A56A8fB9aE546E4738EbE30214bBA5Fdf711C": "4337047689486434466", + "0xaE707bEf7D1f5A6A0b056C2fbB435fc8E60F6738": "8325487216106879552", + "0xaE74D4Af5310170f8B2c0227B0C8CA70c8E2C78F": "16573919920230109645", + "0xaED2e9DEFA50bD004470Ed100c9F487dd4756D77": "18433857967010336994", + "0xaF659C78ebB6E4B09169b0aD687fba3888407e9D": "28061499651326464327", + "0xaFA8387D7083c58b95BA99D06dB9cDCA9D8098e4": "26789756176670888", + "0xaa2542f8335B90e65Ece2E827Ebb0a86Ce9a2234": "18014714333450134743", + "0xaaE1d38fd89432F1462B753c5752eE1Bb66D5659": "596246200787897284533", + "0xaab39920083AB6955501C97EC0892753e39f352f": "5637842629434986369", + "0xab284DEa32A842c24239D8DA6683335d6D5596e5": "816857475303376106", + "0xab62265D80c6B88A01FFe8a7Edd58C2a1a7B0db6": "7555900518251564932", + "0xab6Cc3eA65c05df16D67Cf83e0c20774fba1cED2": "351268758289911610", + "0xab95007a9c95adA50c857A8EfFD0dC7Ae4Bad433": "105866162664432114803", + "0xabE8b36B5cd7Bf06921eE9afdeA5453A10a8EA1C": "7266085738225207766", + "0xaba39DAc6a36b2E2721f7157Bc66Ce36E0FF37F8": "145281099355672753", + "0xacAD95570031453BE812b88Da058A074C26E3535": "16142235412129418296", + "0xadf3e1d1d65dB9E5d1197d42F9fDF048cd3DDEEB": "23476940356042624102", + "0xae53aaACd10bCA0b5F3cb01b27973C977936cB58": "45229230759315507832", + "0xaecC4F1Fdb31cE3097f7672baA1C6d3408C07856": "10174130263530498286", + "0xaf07490C0d1C22298dd47523FE88724D1B0E01Ac": "24276516593516022526", + "0xaf1B49f0FAb42Ac6c7F63Edf97022fF363AfBD6A": "9268342310798709166", + "0xaf5CB8F55C73189a4d02C294bFEE9382ceE194eC": "7704512852471837866", + "0xb004E79eC742Ed2Af7038e257AF9183F50448d50": "7020737731386315923", + "0xb01F6c7c4e78a6C5f3F9Ec3e35D1B849d079425C": "5983065986131582434", + "0xb02A39899FECBa727ce14E85FBca5416E130a432": "710638122353179204", + "0xb037974b4eE2D400A6AC3b27CfAA220Aeb7C3bcb": "42735036523495881638", + "0xb03c9DcE492DFee66417151248683780D5337cBB": "51836796277113269415", + "0xb059179Da679a44feBb5dEb65a6c4912Dd7a570C": "14223371833812521933", + "0xb08416FBe026735088C4974D5d13dA52098Ed134": "38958025385256503442", + "0xb0848a5322F7d5D29416ac07B2dF6E0CdB6C50D2": "12839144195963720052", + "0xb0D4AdbF22598e558a9A68267e82aB4F823d4B78": "23678800652783033034", + "0xb0E4B69A018B35102dc648F81542efB88744B5EF": "9382834995541506918", + "0xb0a2724f3CC5a86c726e35dD8332D6E43e276687": "6445594236330615657", + "0xb0df240f2ac0C34c5dB588975877280aCAA6012e": "66879149341711044485", + "0xb13988E0800373E1a947431C0D8D89f83f04f8F9": "14318406851223568878", + "0xb15675D4020AE1e1781FF10a32BC1208Fea8dddd": "2054011630953909962901", + "0xb15d6DD3fBe986219c1ac57F85E85827F2E7Eed8": "7519275645468799954", + "0xb16A518DC83FBcaB7555577EAb0d9b7B696F26D9": "3451704179973114953", + "0xb19F2950997DdcB9694Ba9a9D2A0249B2f95A370": "31784262629844161146", + "0xb1E972fCA1aE5dFb2Ac78779c63575F8dc67F513": "80635584626658350328", + "0xb1EE5a9720f253Af746CC4a88e061d0244B9cC5a": "12340449585432753246", + "0xb1e37558b08E241a1CbA34736490e549c30b74e1": "7441572034670508553", + "0xb21436c5b508a354479D7d995a962268a30a6d01": "10729077023985560140", + "0xb224349C32924f75fcb3e340F66fB7bADD27ac38": "9243326921736313196", + "0xb241b6998154a05F9fDE8E7cf0d3383577623f71": "12176638544141578470", + "0xb27490EeD00716858Df4225f0B139839C8A84c6B": "2973128533368659", + "0xb2e8eF27BA481653BF5f60c92e5f26698c796Dc5": "13641705774883149782", + "0xb30C0f39339Cf6DFD5Db1369fF941c571ed63D62": "5051919934564348977", + "0xb31afc1d4405020991Dc0CcdcB767936B0cbc793": "465121074317448415", + "0xb334077a5559b0E4ceC427A463657875f9a5383F": "1384367349875052511162", + "0xb34899e2508785990dfF28EFe02B6Bf455009068": "32967605611646463338", + "0xb3801fB591b238d88eEB6f387D24d723b4ab4EF3": "691117541879921066", + "0xb3C8a63ec9d3618f1c968541Bb7DCe3a8D1775Ca": "671207423265922838370", + "0xb3cEAb515B502D69670f3e65E7D5894D8777f184": "5188593539721609454", + "0xb3dF7A4Cb46BFBE2B3314DE7c8bfd81B890871EB": "41626740868284350823", + "0xb3f5c094162573d29eCd070234Eacf8D13F2883A": "16280711513158189844", + "0xb4088A2ADEb13C9F8F6C7db831fecf64b937706a": "67040136206085637565", + "0xb40a3A12130Ec879b0186F596399AbF602BdC6f1": "29461881853565677500", + "0xb434fB291Bc398B3BB5890b7C448578d0a1Ba371": "39129805853879353517", + "0xb44eA00C7A0A5153fBdA67731576f0211239E900": "16568325684711291341", + "0xb452111A71C9D8E01bE7246Db51E9F25f2430471": "4823000434539481224", + "0xb45F09aE71e07C0eE54027ddE4A6Ea49c1877ddd": "10068764024742888856", + "0xb4A0cf48D469C081cDCF1D78Fc9e619A6f0A8a13": "7870109697015536330819", + "0xb4CFE52e503De37f9b7Ad1E49F57baf9e70C0F9D": "19038722070800800770", + "0xb4D3513E9C9af13326C1e967Dafadd29103a2111": "28994462973054852680", + "0xb4b8030dc0Fa10e4cCcEB16d9729DbDD0f28d45A": "27910313819019479778", + "0xb4e92Af3aA348110D872737Bc869489128645803": "566222947833223934", + "0xb52E7103CBaC4F5100f6Fc94473b172469e86ee3": "12349947543022512856", + "0xb53487a93B1beAD7089D9af1068dEBD85565F753": "6401101721601057358", + "0xb55373D9b64573BDd95B82e443b514B4467dC687": "30032028265226307441", + "0xb556be4f615836a5A332167Aff42297f7f964e5a": "100145340143557607061", + "0xb55cf9b1C55c8850CA7cAFd74ccdAEA89137C11F": "16378200013276868192", + "0xb5Ad3407e44702D8DCc803859E267eE7C9e280bf": "16347151476488556231", + "0xb5aBaB1f9fa9226806669C954277cA1F7604e5AE": "407350999552981481", + "0xb5baB9CfC8C264d9280A99cB51A2C1633658d5ef": "42640864963800238270", + "0xb614F0e24BE21044fB0Ee630E3dFBaE20b0B0c95": "27948439703851373111", + "0xb61642CDeF7F494c603ACdb94E2617fbF8A1c5F3": "7624002827727361546", + "0xb6340c64C605726dd3975504DBF99eEf79b44b67": "8244907610751646027", + "0xb6766425A0b6D72F864040650Cec0e0A5447cf0e": "13394576296791298619", + "0xb678310f326b562DCb7bB8De0C28Fa60D384CbE8": "7611898712532923849", + "0xb6Ac469D01A4b0784E079Adc69E383862BF948F0": "11421268484685661199", + "0xb6C23Dc07C5600438Ff13727c088a88156cDAD34": "11555507806139972797", + "0xb6a34Bd460f02241e80e031023ec20ce6FC310AE": "6484878674820108846", + "0xb6dEfB85A3C1f8139F170C9996aFB16B5Df0cd15": "24053506986955634997", + "0xb707bbb632d01a6901Fc8FB66d076b9453570Bdf": "46928624992266385463", + "0xb78eaa3A75aF3A50484Bed830cEE1480c0E75ff0": "38395630579030127060", + "0xb795861d48A5f45cd379CA01c327Cd5db02EaBC3": "21024023377869592679", + "0xb7A2C773c37f06380fE1Bfc8a080631d533FbAC3": "722879698027687126", + "0xb7bd92e604f3731F9a1F748542B5f43565AB304a": "1966230345990644521", + "0xb7c54BA0294Db529D8E6A6A8EDCA5EE1A69d76b0": "11911933051990908128", + "0xb7c743631eCCEbf1EdC38d02e61AA1a3d905ac89": "187906150462876268", + "0xb8597222a88ccdC6d99DBCe6fc2338A713C08EC8": "17766491238951386651", + "0xb86DC35Fee7413B7B34F0ADe17aEb2cFD9A4c89d": "23771210312657929036", + "0xb86c3E3Af11D08643e4523467549817161d744a7": "6175779164789090977", + "0xb87Caf642638D31C38c0f86b23773868b286874c": "16957559241997732283", + "0xb88E3c784257F62284C0c1D2C49af4e3Ad2B02ad": "25168908619714355542", + "0xb8Adf784e7641A3118543EcF57049038E27eC1d4": "17661731120104301191", + "0xb8e8C39c27A490A39023833b4Bb784F35Fd9C7De": "317616520776015044", + "0xb95Da3357c330631211B083122A070f764918E42": "55293307242099890118", + "0xb974884Fb4065791ca8fcEC4b1Df73Df8C981B6d": "24074036367715779232", + "0xb9897d5BaF19427402d419B3258e89f28b5EC38A": "1073379710897200980665", + "0xb995E2622D62DeFB49Bc0DE6Daf2Ba42Fe1d1b81": "7003613024659037566", + "0xb9B3fAACD8C27BB215F879F652Ed36B7180C77f6": "42490894876014728487", + "0xb9CF55c48Bb6266aCB2190E5C01f67555CDc524c": "379924324765733503", + "0xb9F795D0B98Ad3830c48C9D56cE844E593C99503": "51643588948768328019", + "0xbB6a3A7ea2bC5cf840016843FA01D799Be975320": "10834901217224784071", + "0xbC48D49fcCF805a83f4aCd161119ee060Ca633a8": "5920661183549152018", + "0xbC62D3508A7B138ED8E6Ecc67AA1B21b79953666": "35762483729461492641", + "0xbCc4c180beB3A89CD85ED18E0432BC635bec8Ff5": "253590565657398063993", + "0xbD88F0Cf8B734Fc9Bc38860B6bd4C866920328BC": "12868461975026350729", + "0xbDfA4f4492dD7b7Cf211209C4791AF8d52BF5c50": "32548018701495016987587", + "0xbE5D8cf3a99A5eD6bBe252004d4e01fb1E3Ebe9b": "35073806592388726130", + "0xbE93d14C5dEFb8F41aF8FB092F58e3C71C712b85": "1395303222776570582", + "0xbFCdD5e786745F45bF20d80C426223f24d0e0aa9": "692678531816632628", + "0xba315b41c8A7075d15940B8fAf85c0ae39a96B85": "29706880051766584", + "0xba5122105ac0Ee4C8Fd7CCd440Eb288BbBb73224": "25115833600593834057", + "0xba740c9035fF3c24A69e0df231149c9cd12BAe07": "10871463334940766669", + "0xbb93ff1AE8cB4d0127Ad815c5311511F1014a4b6": "303480444592633773696", + "0xbb9B5FF2913d176b75421B1d8945561B2b23AD0e": "4869624998904397791", + "0xbb9Fd65B5fE4f99291246E1B4b642e25c85d46B2": "18340741469086287280108", + "0xbbB11e96D7037D67a3ea12Bf51Ee48cc72847E40": "49578430156833722018", + "0xbbBeD66Bab4A426f42E9359Ec32F2D47276139df": "6661089761455333575", + "0xbc245a119FFf882e684249088f5C0F62627A2af1": "19226867978701181584", + "0xbc824DA71e8Be9AFb1CBEE1bC3b20E263CC359Cd": "1224030613840649461", + "0xbcF7AC0dca97Aca3Ab0BE3382BbB3b51574FF9b9": "11466377127147955392", + "0xbd6E675253ee2610f310dC5B7Cc29195ef78a932": "7788204122759496807", + "0xbd8BEc69b095cD26AcFa77E52254629dc096D82a": "548093656294647668178", + "0xbdfFa93a34f4952B2A50FF7A9ce45bD03d0f619E": "4520079053048372168", + "0xbe10614E8ee8d62Df48856190A4b05C72E47E17f": "35354071713254748745", + "0xbeF468aB81Cc27ef22A63BEFa6565acB442f9f6c": "11596307374729961448", + "0xbf0175c5658bF6DE1CeeBb72Ad2EE0554E95114A": "24726264381184466212", + "0xbf03738655E58a95033Ac31F97F048E0afdD36E2": "22360325927266718274", + "0xbfCE1907360c0B74542aaDFA5a2D919E029D4266": "40952331899955593668262", + "0xbfDd960844765b1BAC0BF1F01A84Fb1F5aAFe9bC": "15224535838436647881", + "0xbff3BdC458D94C9Ca36230bE24838e778305A954": "17832999385498812228", + "0xc00308DE7D3766D452FD60dF1788c5aEDDfDe745": "5157923869465990943", + "0xc00667d8B00f35B3565A5c4458Dff1Cd718E3527": "8022982168408976700", + "0xc019E26b8C3bCC89c060110e079B463cf105dCa9": "602572864446061977", + "0xc02427f0B937F9905C47dDCC661374E0A49C8F03": "1037237283143812507043", + "0xc030b98151Ec1f0B8FAc6efe1070169fA171f60D": "224254535917564707993", + "0xc06098b1eF14C9b1024986f6F3199C5E6AAfc88F": "106867578308189928919", + "0xc062E303Fc6cBb3682c3D43bb91f3060e25d98E7": "5673420204862379264", + "0xc062Eeca3891539F75054b1060997aa3459b7390": "339143461901973659", + "0xc0661B2590634c571a313B33ad78063fb46c47AA": "13070074257368225266", + "0xc0A980A6d0C11bc665aB0FD206051172E04841D6": "2929019198222386516", + "0xc0C9b9aF89b0898c52569Ca30c60d0F0a815Ca71": "6939339449752418990", + "0xc0Cb4360e99b501a40926A8524041343d792322C": "39474856857023731512", + "0xc0c0aF327Ffd024C36e16fe5A376ac37aB1AFF2B": "541567255599085346585", + "0xc0ee0CF2Ed2A0A7842C4b40331E78BBF3A02C46F": "3149568415880472404", + "0xc119Ea8D0641c1043f03376eDE8F7a0B0F6aFB63": "304819508404998332003", + "0xc1216bC402bdE0b63Ba5da9c38431FcccE27F036": "12948724135730234566", + "0xc128CcB0fe1d49638274E263e9F2B24F75457a63": "12618342298802387998", + "0xc135cfF7619C8b1577b446B15a59ddc1A440a917": "5426194341699322490", + "0xc15025E98Ba033F9475785083e31B7811b0Fd0A4": "11344172802936924490", + "0xc16Cccee3A4dda48F9e2F19949043bdd22349bBf": "15798871002477091975", + "0xc1b52456b341f567dFC0Ee51Cae40d35F507129E": "18942091270239845565", + "0xc1b5364f1743cf7F54683951F15d07A68cE8f92e": "23483774590847516466", + "0xc1c0cBD21A22F5B169739c9F3b1F908aCb7c4eB3": "126027974307126742323", + "0xc2031dD3Ca486B35b11B232644776F0b0937C987": "34214701143997870004", + "0xc296ffa5a99C664b060bC0bA81631c1399548d2d": "49521328721838030187", + "0xc2B48915d2056350C023Ca9bcA4a6605b2C53807": "8205827998837013368", + "0xc2DC1D2205cf499376E74A6cBF838BcC91b261Ed": "9172797597415070075", + "0xc2aB083fE2C66DD95a94f739dcA0124AaC294EBf": "8936159687050644437", + "0xc2d5904602e2d76D3D04EC28A5A1c52E136C4475": "12917698918648925566", + "0xc2fAdfc3dA92bF5c3f14a6c7Bf670fd9791DdcFD": "16567551998983457345", + "0xc30562eB24039fAc689EE79c16C5f51C42A0E4c9": "7411771125996931004", + "0xc348866CDE4A15b4868dDC932CF474f283395036": "419272482355612435", + "0xc3615d15468BC4da4EaF260A8cF13c936C3d2A67": "48721128717298741611", + "0xc3670c533f9aEcDc09dA3068dA744a4ce46bb837": "23847260707972906630", + "0xc3A028a650B899162FF0140A44e5dFD5A8F12280": "18577495755866738902", + "0xc3F2DA769eA93987B477E5Df2AC6a950418E60b1": "94349296794977108", + "0xc3fa8CA4ABdDbEbb9f2005C685C41eAA48B8BB99": "9121800358517959031", + "0xc418C7C44FC5c0019227C0b4572Bc2C75d1F6612": "37861137326782131753", + "0xc41c908a75cB3De282Beb01c213eeB680Fd98D96": "34907232304032840864", + "0xc43db5045d77A5eFB80b08Fd3733d40C622ABfa0": "51132186500373199134", + "0xc45AacA1bA883B5459F242A3290aCc2586A4BbE8": "18671685583829598830", + "0xc45C963E269A4893B6D23D82ccF058bb4f0A037C": "1119144416030197594", + "0xc4676e5E99b823E54B3e6c32c8143BB441633eEA": "234076432056278185", + "0xc47cf593AC49bB7552DD39B1A1c5d36354C622FA": "23568758065175833642", + "0xc4910e78d53BAd295E0BA54A9618DFF8a0E4B7C5": "7991253028257239856", + "0xc52f4D9E968abb5960ffB951adc730fE1f29ABA1": "921087607607897962464", + "0xc53875b9EC91752b941F2adFA3E5f928b79e258C": "88843761254526547902", + "0xc54634e853b77E8b9c34B818B39fE93d07DF9a60": "5555557549903369730", + "0xc57c5E070d10A0D64e97637a76bE7FdD28a7aF9a": "267849646698254447588", + "0xc5FA2B61db4891941d054043B7Ec6ACA84eF648c": "16182983780340266554", + "0xc5a31228eab2A61701a3216778357d90200Cd017": "6633647872524933445", + "0xc5f1Ce2BC7bc25E5ed6655a10f08dBA808E7E48b": "6743489046337658910", + "0xc6AcC7bc0f27c273119A96f4DAf5D0406e1c8b77": "100823220047233052617", + "0xc6AeEcb1A26C0611E575352d22b2E86b0126c444": "15302176949219393528", + "0xc70fdCE789D59D3edba8c3Efb5DA283Ff2f54eAf": "458542355057132763", + "0xc73F58ee1553A7cbf828BBEa48e65e1f55128E24": "38382025452803018499", + "0xc74A9Bb4bD32118066A73536766ce5E59EB5a0c6": "21763020434115441351", + "0xc78E077069FEE6D2C5F5A5C66E04e2EC9B56C3cE": "46339187896398568599", + "0xc829c2b03936e05b405d0Ec467dceA4Fa491a68a": "8576711181457152453", + "0xc8528151C23F38D544D606015134b1F1C4D87593": "17419427529800023529", + "0xc8710ebBAb369b18f531F18eA7aAb28385CC9239": "15611276272069816292", + "0xc877fcC358Da9Eb76f53aEebfBBDB6eEfA0b313D": "675326943302029439774", + "0xc88c1E1Dd93D546BE2b8bd296bBc21a3B6E8c83d": "4960299512681767524", + "0xc892Eb27936E867a25F1bd7585156f69EA34adAE": "837066049609994516", + "0xc897F9B0b27CB4254E75E6763881F7ef70476032": "19906618510285693705", + "0xc8BEb8D120c7518891cfD26F95A689FEeb7433E9": "14791057506414561117", + "0xc91F9A086d6A8B1eBcD84F9b4E3796AB86CF3f4a": "11543535407921799935", + "0xc93a55997b4e1b703242de0888d8951E41bDB401": "19325277657658055942", + "0xc9761FE4499Edaa8e5eEB71d1455F068Cb94e246": "13093410743960150567", + "0xc976E7045A3813F9cc6762553EBA8750c2733323": "6206395575065182403", + "0xcA413C13eaCAcd2F4314E5D8B84aAb87929d26F8": "1353774462484386071", + "0xcADa18dF1c305897FbD027487Eb703B58aC8eeD8": "265101356238100461", + "0xcAe8f2c71cA263721A46a7f62048dC6642aF1077": "5109492236116998933", + "0xcBC4506032fe2842450b2b9BcCe215b21A70527d": "10978627140957485172", + "0xcBf878c15A011411C7CcAbF68Cc0Fb19318b81d3": "1922716145229404632", + "0xcC0C22979087CCB4B9B5852B5A92065B8706d61A": "12941838654954231530", + "0xcC1f43b8E4F66e4cD8e505C37838d48B28f166f9": "5602531029403176606", + "0xcC32aDc98cdEa4885B9F81A62075576CdA2D0A05": "6340626451597175543", + "0xcD94D3Aa70986658D876ed6497636167014b1d1e": "45477351417174231941", + "0xcDa01a4f507e4Bd1Bc5b41f88b017362E0f1968D": "10337709597996022536", + "0xcDf05738124E101A40Ab81BF8fA057993701b97F": "45641878392038277691", + "0xcDf12d38468D2f297827f7f19F6905632C1739FB": "396252114277343236", + "0xcE082eeca0249fA8c6CcF86C5182C7571Ad55D6f": "12220848007008784484", + "0xcE266E6123B682f7A7388097e2155b5379D9AC78": "9044255979529829442", + "0xcE5a971c782E7052592A73953977ce0968f53651": "15064694130171285172", + "0xcF0dF4DaeE6fD2770BE52A6bF4cb3593e53DCc51": "29364860708295483310", + "0xca0b43613E6639cEd88c5e55780Ec422cB5EC8Bb": "9033037059809054820", + "0xca53d6DC27cfD227029B8187625f2bAd5D1aCfd4": "19269506425974544374", + "0xca9cCf039d811e8499B0325ec8729830f1d78376": "5302107347248125294", + "0xcae1776fc92207ad387d9922b72a3679a6bF24E2": "8797393182877308227", + "0xcb21aBb18fBdf5AE6E4Db8f2f7B390577d04BDf4": "14613900967552514415", + "0xcb2335b96Ec80fD82269885F2B00dA4DFC6cE748": "995784023087481009318", + "0xcb3Df0eaaDB4c9C5bA0F1d90f8dbD3B70Ff335F2": "15892001023497065278524", + "0xcb57c082893450408D432B5d0BC38def93b26040": "5511143504062814444", + "0xcb68110C43C97b6051FEd5e2Bacc2814aDaD1688": "4869952055443701563992983", + "0xcc59315ccE746e890A3954A7E80C45E8D5B4613A": "13049467625770675655", + "0xcc72ffa1f471360DC6964fe6B9E2907d7CA55c28": "20548614011449743", + "0xcc8641b38a0Efb8eaCe7DDbf6B5aBd5c2cf9360E": "15745711681072963289", + "0xccC2a5A7911E26bE3861A806F7426475DD23e9E8": "904628701367925331996405", + "0xccE524f0A33731Ee49e4BC7c33ADDDA9862d9DcE": "7635874988819043294", + "0xcd917BF1dbaE5dd0De7DaAE63926Ec81B42Faf77": "31957437506945042086403", + "0xcd97CE6F43fa7af94C93837Ca3d7eD391B657353": "10527353600557173931", + "0xcdB1d02bC1dA07e8D166241D339E645D1466579c": "89756470749563299", + "0xcdE2933c2017944B46B466AB9A0dfDfA36e4c35b": "35464596911229503350", + "0xcdc2AC769e3f28C0762f3e1878FB8d5365c9521d": "6433181894109838160", + "0xcdc4757Ff570DcD6933F8D384293789907Db6791": "9997855716827488314", + "0xce11e75Cd3e1781202F73C641729bBB65BFe0226": "8587158467611889830", + "0xce70e5994E3c2cB89693309fbAC4bfCBe5043307": "4771808384239360438", + "0xceb05Da6b9803143B9a44d4cdCEbbea73eb52614": "470731561750276126", + "0xcf4C74527F26dEE24CF9cFee6FAC9549136CE05A": "23944062687361786", + "0xcf4ba7E158DFb76BA274B74DB4ccCbe7365B487C": "22453363707547270495", + "0xcf88FA6eE6D111b04bE9b06ef6fAD6bD6691B88c": "16112192333074168307", + "0xcfA16F7289c6BAfF31b537666374B7B82E5fE128": "22218160746447756400", + "0xcfCfd6024a9011a0B34c32A3912b5755e1579AE5": "20092497651370348952", + "0xcff4f11Db36d27E8896e52Cc771eEAE8CCCB65B7": "12719026472784244838", + "0xd00a65958A16ad5a9252C02cCc2A7816247E3923": "61318551653674666", + "0xd0788c420418a1E5fEBBb6c210715F36Ca885C1B": "7021563740401149210", + "0xd08354642e13E09355f038d6B8bc577093e1008D": "17521109941478171311", + "0xd09612A55c2cDc8d49b444739EEE6BA7795E9110": "25139243387195681680568", + "0xd10380F79415Ea4f3aA6e481A3846ccE36251F13": "622954598457392049", + "0xd10b63c518B9132f19E28d0423172c36447fca46": "14599054506087414765", + "0xd10c4b3785de606391Ae8c4e9BACaD4B0D15FFC9": "47832197964884100894", + "0xd11c00EA655E272ed0c3513Ee02CE4780b71E126": "172541198643742622229", + "0xd16f0c300353c07AE0723b322164C1E6e74a121D": "11030716630085861189", + "0xd17ea09521230a8D120FfD39fa9064621597C13f": "36492672219135625259", + "0xd1804165BF8162a4807BA4dFA731d511A438CF17": "10875006040622485037", + "0xd19762943d1028B19626116C6D11482a79B65374": "44561890725596612633", + "0xd1A40e1a3cb383178191C1142473E497cCa0808D": "441249794376652589", + "0xd1Fc03b1aF35CEA12f6Af68a08d1CA731985DEe5": "26210874863689355239", + "0xd2288578249ce14468EaDb10f20a7ac025684E8f": "41050550704225280444", + "0xd26938af7C678E288Ad457B2Df624A1EbDd8137b": "1018370063638829096", + "0xd28a0C9346715133e90BA550299cc01C51d41168": "19722935566490447343", + "0xd294B8DF756952Eb43E3B0da4F8EfAc4a785666D": "19210199878638433616", + "0xd2DA573Dc5656b731Ec79e05B41691517D04e42d": "13831753736445363270", + "0xd2bB666DCbb819601A5d51DCD189cC9cEd268aDE": "109410383723219309971", + "0xd32815DCF55554d48aeD070a6Fd538060B3DAFb1": "987278560329576156", + "0xd35669532cB2D34312CeF21e98A6E50FEdA2e0A2": "7090536784436493555", + "0xd35eae784EDEb429083995b0beD9C2B5C56E318C": "7521814146427956838", + "0xd3E183C31E504B5C5464a12C619D1c5B0da01df4": "22217017853591696326", + "0xd3ad72AF19DF2633e25F1370036a501b21232Ed7": "62282283165787253", + "0xd45088A03D3DFf5a937f60D3792d542243200B92": "25981941970298688263", + "0xd4A21bD7Abe99510D6AB80d4BcEc1f492dB9A168": "11967038721931590763", + "0xd4B811598d6a08F65D10146674c5465308713a5D": "7741864113324212317", + "0xd4Ba9937B9Ec40f457BFD3111Aa048AA65473A9d": "20516210604813740100", + "0xd4FA2185bC32F28Ae27215b4b769f387DBA53F59": "65341822720751896", + "0xd4e688205158Ad377237B38daf59c61a532ABE8B": "14170847315751360684", + "0xd4e7cE7B238B9cE539C14532387e83Aa9aAa3076": "12730826006076936917", + "0xd520E3662f2aF962DD6B42AD5b26d6FfCA561296": "294519056665420433259209", + "0xd521123E6bA7A8392286E7a134f24014D803D491": "30848133068853747472", + "0xd5221cbE781e6f0094A4ab1599b7FC45B07759e3": "51885165470428761753", + "0xd54b2DA204fA3A09f3af55e135BA5fd814b66602": "154379710400409853", + "0xd550e166C1Eb28433142482e95e6B0b5EC32D7dC": "1551280307385241948", + "0xd554689eC85AEE8d17970699abACd60397E94bcc": "19646716622307569042", + "0xd55feF3597F4226Ba00eA8342cBB5c5f0247bB10": "10398511870674281458", + "0xd5814db45197Bc53d0873b7b0787914166Af6054": "16847391198460333114", + "0xd5B2Da856140810c34834be5CEB366Dd7857500e": "126326599679733023642", + "0xd5B8B6fF155De04B1E476CBFD4AbADa818ce3142": "18539160502253775050", + "0xd5Bb23D16BA5A13A91d60dD5f3925164b6eF9255": "6679946394061742181", + "0xd5E3D3488B671184d98e8d91312EDd6188D29fe2": "12872116190800875485", + "0xd6019050Da16435EfEdBfDc6aCab54738B4E64Fe": "853259680192599409", + "0xd61368083721E017d977ebD191dbDE39d6B4870E": "6842626831700563796", + "0xd64483cF4D99fa45a10e26bB8B9F680b806690af": "18258022330076086345", + "0xd64813E230B945E501aA1969D21Fb2072cB95930": "1877522312044921706561224", + "0xd64C6beAf337D532096197986DB88dD1b0dE4fc1": "25295163125417522874", + "0xd64ae5f046449e59E2EFB43e25D4F744e558144C": "7648101220752826503", + "0xd666f8000CfB88604dEDee49d62a5d2621DF22a8": "72991446891542848924", + "0xd66c45574061194C2432cc3916F75AA3946513Ac": "7249914610614822295", + "0xd673924b7c3b613966fb5ab53E32E641813d6de5": "12719011944367573280", + "0xd6756d55ee43b61D3362C0678fBba85d755E659c": "32198821911025702261", + "0xd6e371526cdaeE04cd8AF225D42e37Bc14688D9E": "193580325273369618001", + "0xd74F9d743275c7ce2196a0AFc32188cB26E162B1": "43671184903336198125", + "0xd7768689A895202D7c53BdF4EA8Be07d943DEbd3": "9872415480002019627", + "0xd7ABc714B5AE014de858EcC15e2a7586DbBB21E1": "18194578747299635602", + "0xd81Ce5c8f096030F8E2Eca893AF3374606505c07": "5612943590178443072", + "0xd83ad877E1bF304C53593cF8474352C2302080a4": "1248636808177753186", + "0xd874387eBb001a6B0BEa98072f8dE05f8965E51E": "5493574218984180536", + "0xd8C0aAB4AaE1e5A90e679fb104E1DF5eA9ABD88f": "51157235007688494588", + "0xd8DbAFaB8Abce36b8CF987e1800FBdEB07145216": "2426907348903853349", + "0xd8b15862fF4fE45FA17d41898FB9Ca7D82cD28bD": "230092801788895608", + "0xd90fCBB15a140981fB20BBE725f0648bfA78F0a4": "15529567212870620348", + "0xd94A9C87491E950DBc84152eCc8eb38b6d84377D": "301721020941275327", + "0xd95929b3d82F7f76Afaf23ae716C691e489a43b1": "35721806538152841184", + "0xd96034C2D021744C396F32Ef90c85Be669CC91Bc": "449807803024442055", + "0xd9c8045A46ADFa1FDc608938daEa2C65A91FeC9F": "68155784824244673328", + "0xdA0c040a0A71bC45529c016B34f4C62234390952": "24025270352144473365", + "0xdA2492f0918B3e3F0B791649A3c76831a869E7ED": "6350674984606785838", + "0xdA2995B82344944ca1d4e0bbE60FC5Bb4363A028": "34379778740674449726", + "0xdACaa3F1f9F9CFC211F987D8F7E9E53691A4880a": "36071722274460753066", + "0xdB69194B706b2508462d1bd8867ecDDBd4A574c3": "364345963700854469806", + "0xdB6C510cb07c08E973e77A615Af08a7fFbe04f7E": "39435467215272658297", + "0xdB72B06F9922B08507B4ad760cE50b9FF8c48C8d": "588114339144231574", + "0xdB835B395B7763C112Fb2D5a96E65866cB2b0e31": "32969844101485515412", + "0xdBab0B75921E3008Fd0bB621A8248D969d2d2F0d": "41451144741996759508", + "0xdC0773a69D61a2D10aD4AbA7f3d8cfb250156744": "905675390427219508", + "0xdC09eb652D4568c3E22D176BCe8F5eFb12aF7716": "423929327377467074", + "0xdC3f5020e59d66188D499570361a606C7efcAC8C": "407627808021812933", + "0xdC4068AA6Daad8eDF52b3076Eb36185F3EDf3b7F": "11752833804557739282", + "0xdC93c94A9D9049e9AC7191654714B42526e80Fb8": "10300503673027530269", + "0xdCc051e7e381E7a9812079732c1e0B5dD8f803b0": "173929794614542326021", + "0xdDD24050b3972ca0816d7Af80278fF99eee155AA": "3233052707558595231", + "0xdDF28E4bFEb500e665b4087e3Fc2a38cC6279F9C": "18734810498474403486", + "0xdDab08bd1c9bfCaC36e9B4345fcF854042cC81FF": "7051954197896102054", + "0xdE05aF3bEa134C57edc9682be9AC5874BAeF056a": "17040339581664972478", + "0xdE263470fB52bf15Aa816D27A9eCFb1cd2c42997": "18405289111171430040", + "0xdE288bC0fCFe25D30Bad8401E70c3183A63F1893": "33450516059651763378", + "0xdE42327893f784A6F06F4D5A0A4E5161CbB358CF": "22700875245761892565", + "0xdE9B093D406bD8586A9B36B66eDAfe216E5B0a74": "32138129428381656505", + "0xdEc17E6B76d91162E8Bab175f60A8808e57E716F": "14058187064091554633", + "0xdF09aB821506DC7E160d78315D0f6e4a4d10cda8": "88389562593381434971", + "0xdF3439c9E67378bc0F8b941C3407dd4Da12FB379": "6133276927380154706", + "0xdF78f32d05cB0DEF0798d7f74C0B021F3049055B": "8265473902284318478", + "0xdFa60Cbb1354373095b7b9AE55f2566153B794a8": "10604043963383485586", + "0xdFc1FF29EA2392f7fdab753Bc7e9D3440aCe13F6": "9141222394508819057", + "0xda39076F0B633AB68A6edB911120fDB629Bd4841": "5153435404850679663", + "0xdaC71A10E91E81B159065f65febb0B17151B4461": "20409972548030250310", + "0xdaa070D909E010211606144eDe5B2ca6864C2c1c": "54462168716305099202", + "0xdb41Bf85939F75A0d40939646f34A9FF6eAfFCfe": "37678922076004348880", + "0xdb5d6716bBd2C04227d207757F00BD5e2AF9C65b": "82069323308368834042", + "0xdb81a847b3711339F9ae68697672465f013caA9f": "21635810404857901292", + "0xdb8915324a7A3B7cE8A9d576CfceDC9c2Fc4845E": "20255985777023260346", + "0xdbed7385C8A55f01b16871c7290A8a6bF5bE32c4": "1427692989369302166", + "0xdc3594961c5F49200cA76851960e57928046eCcB": "34508938412686095523", + "0xdd975A25E176E9A121e3E99AE83AB80eF056B528": "24951849474717912945", + "0xdeCe737bA8E9D72432Adac9C0e09c9cFDE20fd98": "595650077376379919", + "0xdeEacCD331f9Ac789cB9bdF3a42eE215c3E129f5": "2907186663851337496", + "0xdef2D9763ec357B8D953D212A0Ab5782A936218a": "17919663621266664342", + "0xdf9Da2ef3cc299f256B9D2B290364628a65c3631": "11168953878307493720", + "0xdfAF5f9D931106799c971c24E13Dbe45d698C889": "2118206424540265993", + "0xdfDbA71B23BcF884DCfb8471Afc62Cc1A422cb22": "3039013063934895862", + "0xe0045c7122041c3962499E70DF8E8D0018A501EF": "57167410383583418764", + "0xe028AD103c66247F8F9d4fEcdB82F206f4efBc90": "1052906543669999896478", + "0xe0598697796705Feb92961DeE35b439766cF53CA": "6383413018192188764", + "0xe10Be05Bf99E96E5C8d316C5eef5E90B8080c5Dd": "18090573657073457958", + "0xe11D01A21b2186DefBF86aD694b3D82598103973": "824721321586791159", + "0xe14F0F83Db016E7C23eFC78C3110cCd3Ef3cF20E": "419645626069273399587", + "0xe17F390551f925B8e31C66DF670a07FEa9D93d90": "1174723292198998779", + "0xe188082c222e869c1A80d8AbD5ED6416bbADABaD": "11295205092733618407", + "0xe193D4C06fdC1e5feE42EF1BeFF0fc9262fdfF4f": "10943535844377645586", + "0xe1E63B61CeFf7bE948Ef058F4C3652119A006C37": "242701984572199363", + "0xe1c03B2e7b3510a9714e7eDe2f33664c16C6694F": "3780981575557614593", + "0xe256A38b9fc2Fe0ed322F4fb187DF4077Ee821Eb": "1005221448866292255", + "0xe2a21E0eCA8c72438786034C34f9c21143a6B874": "27152551927655720447", + "0xe2d24F65E6bE3bb721102b66C060e208F84c3AF9": "70119472229852089932", + "0xe345849F3f9e352348c77903f9c6E68Fc0355E1b": "32386882384960527682", + "0xe34e2Df841E5a6352B0aE8Bd5A797544f11D7e89": "10215914326084504018", + "0xe362ac3ccaaD0E559747c41Bc938F306D406f5dd": "3993172521760055124441", + "0xe36957237B18282b8D08739b98922991759bC771": "15447845163652024717", + "0xe37a36c93bE349cc83b21F8cb5b0bB6F2b4C2d70": "6369501931752578629", + "0xe437E7039f8efc8E9d07ABCB1691Ad1B8b389574": "13449537714972204022", + "0xe498eee247B232c739Cd6a61e539591c37681651": "867606140239064390", + "0xe4E5909Da9Ee4333Cb339D95ca69ba8978AD7735": "785692864370028341", + "0xe4eC11B1Ee1FF796649083785C7D29c76fE5DdE6": "8499708602474565291", + "0xe53834C396Bc29CFdf4ff32aFb8590a2A85E739A": "5576769180636276202", + "0xe5617B7833417183b4d6B1202e88437cBbE6B376": "5499382275745874416", + "0xe5646dF0F507d1F547400Cc3870ef6900B627BC5": "160393685291172023454", + "0xe5Dc286ECedbFA1f3444A2AdF23E0e65ED873bA2": "472480205551501757", + "0xe60e1F715A5b90E784F15815F479cfe9a6dB185f": "16814195666284529126", + "0xe65b845D994b7eAa59456c36F590907aFD896628": "15851578474598096318", + "0xe67d3b0BDfd1D853FBcE6C0898b464e332a67B18": "151326976488635076", + "0xe69c9cD0b1653d47f0106d444923031A798ab4C7": "35594850494810259588", + "0xe6C10c597CeE524B145D1D7a78A31cf83C7393d8": "29834871817664327482", + "0xe6C207cDf316233fa9aa4b79DD98e07F1a256f7e": "38367082098767290399", + "0xe6dBc5016D981e1Ef11cc1b7038276c6a2059417": "18799966173856047332", + "0xe6e32e44ab584F085Ff03498a65A4A967eE3f40d": "11607152012149176827", + "0xe711da062E4e0BFc21d4B76B392957D7A5f92BBd": "646068309154408575995", + "0xe75F6C5D73931306a5F545928b396a29356f06B3": "1628548751822511072", + "0xe75e3ed78D7e558afb63afc9D49a1813Dbc8Dd32": "8966052376908632661", + "0xe797c7035866d62D9507cdf3b78B63CD4E9133f0": "8373310428452168953", + "0xe79F6334107a5Fca525104e11bD6ab9F160eDfd8": "267003332860410238", + "0xe7B5DF1Ee3928b44dF511A96eEEB4DaD5388621C": "23499249690778885219", + "0xe7DAdc993C6c67274c69fCf1475A05F8b628fd93": "27251264936358600917", + "0xe7a4B75f1cF09DaC63062F20c4D8E7684d954319": "12682789190748208359", + "0xe7f525dd1bc6d748AE4D7F21D31e54741e05e110": "1296884230853395200394", + "0xe8106c71fd7b47d571c3e5416cd7EE9eadDea62D": "18444406345697232962", + "0xe81E439cF1135E74f0924533fD158d2dCbF3Be72": "943331968622584031146", + "0xe85B17faD09C33a323B40d8e0A2FdB7879954e34": "398500846786461456767", + "0xe894357106C51E28AAec671370a8B00a9D469EE6": "20885174472177079645", + "0xe896d785d126D332Bd17C92071251F7Beb26Bde8": "543064462578459674679", + "0xe8f1996d542453CFfBACf61B6905f38f68c5Ed61": "15584900058941049545", + "0xe91e6Af04316849F69290e21918DFC4C19FB7381": "8926180167939253922", + "0xe92BEb9EDaAcA312A3191D4D97C53413C8F46aF8": "38665988853660766840", + "0xe92bc099698687F7A32cd68577611B1BEAE5D401": "8169636847139852", + "0xe94a2165073cAfca7fA38Cd1E37eBF603A82BC3F": "13757777113370813682", + "0xe96BC20b26Fe5FFdf6C4a66bd561434651A348C1": "12267622609721748124", + "0xeA2765E6E0d3e27f7D7ebe52b1fd3E9f6C5be8C1": "11686791163269303432", + "0xeAa73C3D36a398C5CeD729F0C0Bb8847604Ca9c0": "11054532282270431238", + "0xeB526dB1211a266b16A189f2Fc05B1a2511c4138": "5892184696803168452", + "0xeB8fe8446C9132242eCE7a09C3afF19e669380Ab": "8637617567322223386", + "0xeB910B73C587d1cb2a6e53638aFfb844f411Cc44": "27911620056029884730908", + "0xeC3B819018CB7Ba854a54E98A0D12fdFc3c4c32a": "7209150359536489237", + "0xeC9B3Ed078f74279ca3DE71e677173213714Dd1c": "45213202576242962874", + "0xeCe39f7Ac7603f450cCdf1c257d4a3eD29c4fEf3": "8682831613684490482722", + "0xeCedde7900D9f0271e894F59061B5B67a522a227": "11488193066839138", + "0xeDFE35000f89E823D9c8392413551E780411DB36": "468243457219656244", + "0xeDf2cfD0A8da2891eA0f2b187EBa298A366A100d": "730944286255071633124", + "0xeE520889959A1D9538f6a272C13e44991C2ba229": "14332669036524023167", + "0xeE726Ed36372048a6719C4F84dBF029E182286c8": "12868462303852635012", + "0xeE9cf480031c4EA66C1E9a9637585d3bAb17A877": "370598388071931098041", + "0xeF26f0a89AB03E9f58317A1934e9574938cd80D6": "19302490226839580270", + "0xea0B2E3b1CBDC62A7E90BF443444865681Da4903": "1272637761827785327", + "0xea1638b68CB0d4a691fF109dDC822a46996C7dc7": "18349009516278304698", + "0xea19fd8976141F85a66F77a224a32618c1f57cae": "396156505894901442", + "0xea579DEAF59a5966bC35519623c16b6C97D97028": "26034989409330330509", + "0xeabE68dc15E800C470b5aCdC16953F46B10e1232": "20670858773836529126", + "0xeb09af3032fEfFA26AF8D1ea7C6983899cE4d34f": "18263822254215045891", + "0xeb7058698C233a5b1160f89c4812E574a747EeC9": "7313822908017245307", + "0xec7282997c8e46F5d80a8Ec20B6CDa4c5D5Aad02": "11419121669404996147", + "0xec7Af85B1b904B375145324Cf8A66Cc873242e9E": "15339826155758577187", + "0xec9BF4f70a91b8d36621961d51Ba0741003456c1": "8925742520597487238", + "0xecaE387262017EEF35Eef1bc1549299bbE4791F9": "9105594789777065290", + "0xed02f16a57c32a08b55d923Bf4690D200722f462": "46881365257112610019", + "0xed52e7247e383b870Fa2Ee39f60f487161D6244b": "36151836431493638810", + "0xed54b39018461e3B9b3313c775b0Cf1Ee3730664": "10389071320388492581966", + "0xed5c4FD6eE8936158bB4598B91043373236FeD6F": "12303969956953592969824", + "0xed962b4cF305cebD7Dd84Edb5d23391deC5E03f0": "42030328943888849959", + "0xedFD088E17861c31A4DC6cE712a016E8056e328A": "11189202163631463206", + "0xedd983Cd14544a2EE67ccAEa588B7388D08C73CE": "53857050558859380848", + "0xee1a56359f778C2fC3608bc743136B971Dad4138": "36678214746267428209", + "0xeeBdCFe9DDD3D5b6649Ef12c7E17c3c395D4a9ce": "22267900961369728860", + "0xef0a08Bf7D55A75D6dc9FA32ea22945CB64855Df": "6875632691454638704", + "0xefD2638760E7A8fD4846256cBd92D19Ba25DCC49": "7819941595317975394", + "0xefF3779777cA3578d2a80cA2D4415A3910F4be73": "25129116611679345176", + "0xf04A6E38C6CFE0AcFbeB472888ed990787e69072": "7225653741170076974284", + "0xf05F5D4aD1b3fd5Ad57Ba5cA386D0DB2E8B317Aa": "5826604583808932219", + "0xf07A2439296e07Bc4320AF924E655a01fb69D89C": "8141863669782774582387", + "0xf0D6999725115E3EAd3D927Eb3329D63AFAEC09b": "6948519850195882969", + "0xf1111979C8D6342687c761d36F81cE857d422920": "5651137205252631754", + "0xf12d5657cDff69Cf1fB32e25C539AC3640E0ab17": "22675754192890551233", + "0xf147E390aaBaa560C34d44aa84510858c476a677": "29806592925271129891", + "0xf14aAFecCB72Bd7e1FaDa39ea91Bd95Bb5b6f58D": "11659483889294639869", + "0xf161b9977e6c757B7d113D1639b36d0d6374A5AC": "2785695720589213181", + "0xf1640DA5dC72685D63A63624C1013d8F15f87032": "10503572183246535486", + "0xf18b295BE9432CAC8CfE08db57950551Ee7dFc9f": "104370331880466133867", + "0xf1D6fBa5c239beB43eb880c79795bd13C8a4B933": "20843057543516848471", + "0xf1Ecc163903FB69Cce46D408E171C89EB7Ca1899": "16104927542135187314", + "0xf1F09834b0dA191F8C3Cc96bC55B3344c30B144b": "1560756679697880316758", + "0xf212c6074Ff2EB61FfE590943aFeBBAcC1F01520": "104821978872355801694", + "0xf2306b7547b4E7C3d2B4F0864900414A91d5571f": "1081487123781363439", + "0xf24bBc7C8311E77B318028F6748B2429739892Df": "7835776312122528102", + "0xf2911de56Feb7B88d6eede36982917610dA8B0Fd": "5607686037053097046", + "0xf2F3e73be57031114dd1f4E75c1DD87658be7F0E": "15111797541098168", + "0xf2b4409a1eE503448e52da4d44A448f398145772": "12878493809089390143", + "0xf2fAcEdcC28f115cd8214cA241E219A215c0449f": "5063324390387291217", + "0xf3583B117319F347656aA5DD5177616d5e8825B6": "92242575057707208", + "0xf3744B5d895b1ed6bDb4ae5A8a5B76bAdf54f21D": "2553213068931797202", + "0xf383c62dAA5B8Faf07cf4BCE80FcE70D78A301C0": "33396959343673378280", + "0xf388273E937382e285A4f736c49e7b29eeaa6265": "5049398790045767536", + "0xf38c89A395aA9B28DaB5Af95578E7f915D38A3E4": "23912245288266233680", + "0xf3C92ae4FC08e3A7cd74C7534575F10b563f66bC": "5361776433162434174", + "0xf3Db3e79cD7dd756d4BABAC4B7D64003fe4B33fA": "18870347630091710852", + "0xf3a2b53aB3C5F59E033e853059a1aEC9A1b03bCa": "48215518245452996635", + "0xf4245b57FCE109E7f9acB5a1739bC0Ce12A60A07": "900314595533918539", + "0xf4A9d7FF6A8dE30d5fDa91b44491E7B25e29937F": "20160623735727781222", + "0xf4B576419F36DB5cC1A40BfE4F159f6775e15dd1": "32504280449975687446", + "0xf4Bbaf63Cd4ccc9a99A02305f829f757AC8Bc270": "69274558454723376", + "0xf4a5dF4FED739353814383BCbd03AFbaB4D55830": "10887545962019619535", + "0xf4f32206f566A7Dae5E3d507292ADaB43fCEC073": "12275892408767032908", + "0xf4f7B0922067dF6a79a11FB64F42f482Bed51c17": "1242325790086346279", + "0xf5071470e2642665bd6BbF9cA58c66d5808ED8e6": "26722250744697427650", + "0xf50B542dfB7f60657a69964345901b1a6d344Aa9": "154017445317484701828", + "0xf50Fee3A8196e49bfb6501e86411936EcB03E952": "14241728731284539452", + "0xf540eA05395Bf05D4b686dDb69dA04037E01Ab73": "12045917153060527711", + "0xf59827C4D7Ae0320dF02eDF6c99Ec4A30196d423": "241731217732245078347", + "0xf5D741222834f318973B279504a38b2b377533Be": "2920088939303220", + "0xf5FF609bDbBa8B155e52185a49F3BDB6Ab5DB43A": "43305121621535765594", + "0xf5a8333435492C5829C0C6784E401D2f7d0702da": "2610857817745348867", + "0xf5b3dF78F230CeD991c9C2750bb160d9e1651E57": "45793754348841250192515", + "0xf5c35dB3cDea8143aB86a2f4C69b7adeCc12CDD1": "35044427663283518296", + "0xf5da9CD791998918f4631513a7d43d3cf66c7609": "290996927116878147", + "0xf5eBEBE29695810dbFaf48DB47aE02870405be98": "1227525745128281232", + "0xf626f45F35b9D92E515AED23F44a36d42449f4bd": "160710638306377918274", + "0xf62bf872dfaEa3eE32225140d59EDFad17bdf57c": "18955623004643823067", + "0xf66f75332a7445833D1Ad2F416D5f01D85E86568": "28358222142775257588", + "0xf6702Ec2E5036c02D55D62CaA45E1fca516078dF": "93372190472633660181", + "0xf671284D1F3f4b3bd4BEc0959A23e7c5dB4A62C3": "140987021000555348002511", + "0xf67a00EA4508D180520ADe8279011075e1c3f727": "7510449839371792372603", + "0xf6A65D5aeaC96D811cb2cad335e03C56D2cbeEa7": "25494524866721744095", + "0xf6AA90D1Cf9Cd2B405b8B775e3Fb2029e310D675": "145487283347180365", + "0xf6C194741FB1F723FF5858a18d5D4ab254c4544C": "17575930701436578627", + "0xf76bC3CF1d14f54b870F41486F9476af439485d5": "23655696047510402299", + "0xf7B527b416a14327e6FBc7Ac07C4BC48A613a95A": "16859868139638509133", + "0xf7ECaE6F035EA4927FDE97FaA679b5e224afb169": "171151870439461847187804", + "0xf7aB7C10B2aE4b4D505b037c987F8a59Ff69Ba6F": "13943586312875492320", + "0xf7adC901C921ca4EEcC0f95a26AEc81DAcf57620": "20410736205042143783", + "0xf7b88A6b1d9ad24Ce50c680f670F40dE78acDF4C": "622864673912165963814", + "0xf7ebaD5E0115Ac7AeC0413Ea715C483409396043": "9764140715630156118", + "0xf8657D4Dc7A957b13e7a60DE02CE67C684C06b1B": "7326410344407014790", + "0xf88f4a0fF0f2C322F0E2FF9c7A0E8DC05610A630": "39565464294959837680", + "0xf89c06Ea5F9C130365166bdEdB12642C524d6ff6": "20872632767603671543", + "0xf8fA731755E44481f4a1E7e9F0E51BA16Cb523DF": "40691403370038542051", + "0xf922c63E91ca4Da9f5929EdbcadFC4945cCA3727": "7570223112080064106", + "0xf93Bf25Bb95198516856c937Dc8579B275596E5c": "16972020057837094899", + "0xf952df19e1e1692bCBcD11A9248912E2A1851E7f": "24344242688243961111", + "0xf97fF5B89336009Ef2C0FFb615D4aF43230b0f7d": "189147478437252650480214", + "0xf984c14c0D7BFA8321CE634770Cf9773cbB89E92": "6260758757449907946", + "0xf9C39EFE511c16017B8DC86670dc3dCAcb3fF8aC": "403083316651226671", + "0xf9af923Ca755e37834697b9Bc1DEEa7e2Ac73CfB": "252820667396170837513", + "0xf9b560260c18A9551CB6ee138175D07145A5b15F": "248026347737737081261", + "0xfA21737d418183F5aDb5f73D5251DA75E548dB29": "28547773984503770602", + "0xfB3A0783276E72D89043e46DfCfDD9bFBF214d02": "12000392019594262564", + "0xfB7eb0427c687F706485DaE0b9F8D278684Fc7A2": "195437793035382761076", + "0xfB8b55591677E3bA780aF8fe4C3bD1cB9B372838": "128302245511441152849", + "0xfB9912997D26b34A02a2Bd8Ba8006e28AacA6948": "112809191760182954771", + "0xfC67418ff4fFb7F39769587bFD425D750B9f0663": "27151648653574513178", + "0xfCDbb57E88251388eb78129A11eb173d477418c2": "22560524361021252893", + "0xfD81B27D9796a1BA7d7171eA70010c9befB2a62a": "130293764781976397834658", + "0xfD8bF6EF279330126219b676595009d511Be83DF": "8932981978144460344", + "0xfDFf46b667Cca212488Be0c37f814Dc12592A7BF": "406821410096979831", + "0xfDd0FEaeaD0215efCda2921D0B12e926e8378346": "724843580584498665", + "0xfDea6f21d7857CE7843FBfE8ED2F8419cd4d0E5d": "2958416678512474965", + "0xfDf61F85C1e3ed0Bb15B4b93697aAD4A3ebe68C0": "24663412498863289978", + "0xfDfD896fFceA559A55cCaFA1DbF1255C27D786f5": "5568267059395080808", + "0xfE495024F5C833b3c93d895173B63842566b0b03": "10495327008929131968", + "0xfEb208629A2Ac2c96CcB36Ca7F791A5054f73A97": "24020120355316841041", + "0xfF1075a7a5A66eb5F137800BEe6e4b7Dc6a0851E": "3845330350010923648", + "0xfF4000886E266b1Be5728C0E9a68A3D3e05f2472": "17438133739492829779", + "0xfF536328697859EC41b4F6A7e3A9cc3F372b0760": "6133077793631606127", + "0xfF84Fc4410eF8f9F35F1c03DC3a53CA6A6bf067a": "21778063684780061914", + "0xfFAC7FD045303112fdb28e9dACe8E1334aD324c0": "16306033244056352599", + "0xfFB2b11710f5fDdc490d619F42B340Bb24139f86": "21707244408591376614", + "0xfFE3937772c12d54d4C4b1554E9CE2eaf7ed001c": "27960927523169259575", + "0xfa06Af50411E451D3C1F8D7F81B0c4d70f2Ae517": "1057506075499300602", + "0xfa132Cf162820271CBB35105a81A9A8759b4B4db": "125527069385119953750", + "0xfa28e2f1bd87212aFC52B4EF9Aa83A2C26003454": "62400326478533967", + "0xfaBC6Fc448f53879557192c2D7679e42c09E7022": "268929588628114474", + "0xfaCE3EC1954DDB9a7D20CE5F67921B2fa45b5066": "1524832771487964112932", + "0xfb435A8d8CD34fEF827f8394e10ac144562127e9": "44206632890728526613", + "0xfc81ec1Cd14dB5b807433094Cd78c4D5C58D6c0d": "7045714328889923002", + "0xfcD89f5189051e76F0bC40c23ae1178926894b44": "12041624179336394480", + "0xfd4ef145a9B0dc956cE0aB2d705D75a6Ea538B79": "13473492636685454763", + "0xfdC2814f4D8A76da04B4f5BeD14881eCD9e47103": "9929595903803007399", + "0xfdF6076Cc4ee2625BDa5A10830249a361714d82B": "12190014494971785736", + "0xfdc79905818Aa8e0ff637c2627C98B1E8B5A54b5": "7028639345171507", + "0xfdd5B709b246F29DF83d11C67F13dB7B29C6A965": "6075570498184011792", + "0xfe150EaE243DA6667d2d8143c7E6878f7984D112": "16472564395283309017", + "0xfe5d8128B077EeEC7FCfaB9c44cec07f726913e9": "14668887567596673960", + "0xfe7BCb3676aaBe9A6b39cB23F3a5FA41eED7Ad1b": "26337616359047369838", + "0xff85d932B0542509Bf77de2d0248456F0D51e974": "28378720418529808572", + "0xff879CA9C84D976dB7E0180436e3a689eD70E1D2": "101442675731648166", + "0xffAB3EC789612C25c6C0836F311Fb363eE626593": "10568747059367821965" + }, + "fromBlock": 14169250, + "untilBlock": 18779541 +} \ No newline at end of file diff --git a/packages/spartan-council/deployments/optimistic-mainnet/official/2023-12-18-00.json b/packages/spartan-council/deployments/optimistic-mainnet/official/2023-12-18-00.json new file mode 100644 index 0000000000..f95d5e9cdb --- /dev/null +++ b/packages/spartan-council/deployments/optimistic-mainnet/official/2023-12-18-00.json @@ -0,0 +1,90 @@ +{ + "properties": { + "completed": true, + "totalGasUsed": "5631486" + }, + "transactions": { + "0x7280675492063a086c28e7d08f6c22dcd05fcf34b220f3f7ec3e792ea4328000": { + "status": "confirmed", + "block": 113670582, + "description": "Deployment of contracts/modules/ElectionModule.sol:ElectionModule" + }, + "0x7388b7dad12a4c10338ca0664040a3b13071fe3e1a72bb082552c2680391ab51": { + "status": "confirmed", + "block": 113670590, + "description": "Deployment of contracts/Router.sol:Router" + } + }, + "contracts": { + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": { + "deployedAddress": "0xd2Bfbe0EE9D7c553F00cfb44C2460be5A18438E3", + "deployTransaction": "0x7e14abd670c83424b3045c1abee20b2a63ab1f506e6cd8d676f98af118a01816", + "isModule": true, + "deployedBytecodeHash": "0x1480c7a338366f52aa5d5edb9181e25dc7eefbdb1e7ab7447580d325fe9c7fc8", + "contractFullyQualifiedName": "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule", + "contractName": "ElectionInspectorModule", + "sourceName": "contracts/modules/ElectionInspectionModule.sol", + "deploymentBlock": 90348514, + "deploymentCommit": "04fea879760768de665ce4962aa381d67d6024b6", + "proxyAddress": "0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c" + }, + "contracts/modules/ElectionModule.sol:ElectionModule": { + "deployedAddress": "0xfde2c3Ff75aB29703A0dA554642b4Bc76d28B836", + "deployTransaction": "0x7280675492063a086c28e7d08f6c22dcd05fcf34b220f3f7ec3e792ea4328000", + "isModule": true, + "deployedBytecodeHash": "0x23f7d5ec07a95228bb2fdb862b484ee783377f724f5043a02d7efc23eb2e518d", + "contractFullyQualifiedName": "contracts/modules/ElectionModule.sol:ElectionModule", + "contractName": "ElectionModule", + "sourceName": "contracts/modules/ElectionModule.sol", + "deploymentBlock": 113670582, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67", + "proxyAddress": "0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c" + }, + "contracts/modules/OwnerModule.sol:OwnerModule": { + "deployedAddress": "0x823005379687567B5590fcc701CE4a9DeC7b4e09", + "deployTransaction": "0x1ac1544cd7532ea4ff9c147dbbfc42e889e62fa6ace72b20b97d9b76e0135622", + "isModule": true, + "deployedBytecodeHash": "0xfa5f32d34a9b72a207fe290a3bf7e6b506da8df11503cbd781d4a0e85e99fa75", + "contractFullyQualifiedName": "contracts/modules/OwnerModule.sol:OwnerModule", + "contractName": "OwnerModule", + "sourceName": "contracts/modules/OwnerModule.sol", + "deploymentBlock": 9313597, + "deploymentCommit": "8fcaeb457bd59ae4b37ce082d680f3e345d09e3b", + "proxyAddress": "0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c" + }, + "contracts/modules/UpgradeModule.sol:UpgradeModule": { + "deployedAddress": "0x27169242Fce0D089bc2114c49338C2Fa90424Ddc", + "deployTransaction": "0x58bcf0093922a28a68230c527a749f293dc5b95c0314c2fbc33116b9868cb235", + "isModule": true, + "deployedBytecodeHash": "0xb0900efdf426a3b3737cd397b332e658d9cc4155b64d64965a40b3324676d56b", + "contractFullyQualifiedName": "contracts/modules/UpgradeModule.sol:UpgradeModule", + "contractName": "UpgradeModule", + "sourceName": "contracts/modules/UpgradeModule.sol", + "deploymentBlock": 9313601, + "deploymentCommit": "8fcaeb457bd59ae4b37ce082d680f3e345d09e3b", + "proxyAddress": "0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c" + }, + "contracts/SpartanCouncil.sol:SpartanCouncil": { + "deployedAddress": "0xE832C302D1160EAe57045eb9d9Ea14daBd2E229c", + "deployTransaction": "0x63bbfba703e573d0c9b851019d8c5aff5e7e3e0c796800dbc7b062e584e198a7", + "isProxy": true, + "deployedBytecodeHash": "0x77ee4cde800a5c91cdd6ddff886ef013d9f6ad0445e6459988388422c583e927", + "contractFullyQualifiedName": "contracts/SpartanCouncil.sol:SpartanCouncil", + "contractName": "SpartanCouncil", + "sourceName": "contracts/SpartanCouncil.sol", + "deploymentBlock": 9313629, + "deploymentCommit": "8fcaeb457bd59ae4b37ce082d680f3e345d09e3b" + }, + "contracts/Router.sol:Router": { + "deployedAddress": "0x134F73fD4CB5fBc1DAF5A1Ae4873A46c948474B3", + "deployTransaction": "0x7388b7dad12a4c10338ca0664040a3b13071fe3e1a72bb082552c2680391ab51", + "isRouter": true, + "deployedBytecodeHash": "0x7a79bba78a6b7ce8458da6dc6c921dbd5c8bd2695e0ccd1f03b4dec4e9956f81", + "contractFullyQualifiedName": "contracts/Router.sol:Router", + "contractName": "Router", + "sourceName": "contracts/Router.sol", + "deploymentBlock": 113670590, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67" + } + } +} \ No newline at end of file diff --git a/packages/spartan-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json b/packages/spartan-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json new file mode 100644 index 0000000000..18f42e63d8 --- /dev/null +++ b/packages/spartan-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json @@ -0,0 +1,13443 @@ +{ + "@synthetixio/core-contracts/contracts/errors/AccessError.sol:AccessError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/AddressError.sol:AddressError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol:ArrayError": [ + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol:ChangeError": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/InitError.sol:InitError": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol:InitializableMixin": [], + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol:IERC165": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol:IERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol:IERC721Metadata": [ + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol:IERC721Receiver": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol:IOwnable": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol:IUUPSImplementation": [ + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol:Ownable": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol:OwnableMixin": [], + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol:OwnableStorage": [], + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol:AbstractProxy": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol:ProxyStorage": [], + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol:UUPSImplementation": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol:UUPSProxy": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721.sol:ERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol:ERC721Storage": [], + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol:AddressUtil": [], + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol:MathUtil": [], + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol:MerkleProof": [], + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol:SetUtil": [ + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol:StringUtil": [], + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol:IElectionInspectorModule": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol:IElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol:IOwnerModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol:ElectionStorage": [], + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol:ElectionBase": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol:ElectionCredentials": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol:ElectionSchedule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol:ElectionTally": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol:ElectionVotes": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol:CouncilToken": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "TokenIsNotTransferable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "tokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol:ICrossDomainMessenger": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "gasLimit", + "type": "uint32" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol:IDebtShare": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "periodId", + "type": "uint256" + } + ], + "name": "balanceOfOnPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol:ISynthetixElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDebtShareContractAddress", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol:DebtShareStorage": [], + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol:CrossChainDebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol:DebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "contracts/SpartanCouncil.sol:SpartanCouncil": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/Router.sol:Router": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "sel", + "type": "bytes4" + } + ], + "name": "UnknownSelector", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/packages/spartan-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json b/packages/spartan-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json new file mode 100644 index 0000000000..d04acabed5 --- /dev/null +++ b/packages/spartan-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json @@ -0,0 +1,98749 @@ +{ + "contracts/modules/ElectionInspectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionInspectorModule as BaseElectionInspectorModule} from \"@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionInspectorModule is BaseElectionInspectorModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionInspectionModule.sol", + "exportedSymbols": { + "BaseElectionInspectorModule": [ + 3005 + ], + "ElectionInspectorModule": [ + 7151 + ] + }, + "id": 7152, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7146, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:47" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "id": 7148, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7152, + "sourceUnit": 3006, + "src": "56:143:47", + "symbolAliases": [ + { + "foreign": { + "id": 7147, + "name": "ElectionInspectorModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:23:47", + "typeDescriptions": {} + }, + "local": "BaseElectionInspectorModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7149, + "name": "BaseElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3005, + "src": "282:27:47" + }, + "id": 7150, + "nodeType": "InheritanceSpecifier", + "src": "282:27:47" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7151, + "linearizedBaseContracts": [ + 7151, + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "255:23:47", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7152, + "src": "246:68:47", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:284:47" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IElectionInspectorModule.sol\";\nimport \"../submodules/election/ElectionBase.sol\";\n\ncontract ElectionInspectorModule is IElectionInspectorModule, ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function getEpochStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).startDate;\n }\n\n function getEpochEndDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).endDate;\n }\n\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).votingPeriodStartDate;\n }\n\n function wasNominated(address candidate, uint epochIndex) external view override returns (bool) {\n return _getElectionAtIndex(epochIndex).nominees.contains(candidate);\n }\n\n function getNomineesAtEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).nominees.values();\n }\n\n function getBallotVotedAtEpoch(address user, uint epochIndex) public view override returns (bytes32) {\n return _getElectionAtIndex(epochIndex).ballotIdsByAddress[user];\n }\n\n function hasVotedInEpoch(address user, uint epochIndex) external view override returns (bool) {\n return getBallotVotedAtEpoch(user, epochIndex) != bytes32(0);\n }\n\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view override returns (uint) {\n return _getBallotInEpoch(ballotId, epochIndex).votes;\n }\n\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex)\n external\n view\n override\n returns (address[] memory)\n {\n return _getBallotInEpoch(ballotId, epochIndex).candidates;\n }\n\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view override returns (uint) {\n return _getElectionAtIndex(epochIndex).candidateVotes[candidate];\n }\n\n function getElectionWinnersInEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).winners.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionInspectorModule": [ + 3005 + ], + "ElectionStorage": [ + 4331 + ], + "IElectionInspectorModule": [ + 2484 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 3006, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2793, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:29" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "file": "../interfaces/IElectionInspectorModule.sol", + "id": 2794, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 2485, + "src": "56:52:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "../submodules/election/ElectionBase.sol", + "id": 2795, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 4684, + "src": "109:49:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2796, + "name": "IElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2484, + "src": "196:24:29" + }, + "id": 2797, + "nodeType": "InheritanceSpecifier", + "src": "196:24:29" + }, + { + "baseName": { + "id": 2798, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "222:12:29" + }, + "id": 2799, + "nodeType": "InheritanceSpecifier", + "src": "222:12:29" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3005, + "linearizedBaseContracts": [ + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "169:23:29", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2803, + "libraryName": { + "id": 2800, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "247:7:29" + }, + "nodeType": "UsingForDirective", + "src": "241:37:29", + "typeName": { + "id": 2802, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2801, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "259:18:29" + }, + "referencedDeclaration": 1788, + "src": "259:18:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2380 + ], + "body": { + "id": 2816, + "nodeType": "Block", + "src": "376:62:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2812, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2805, + "src": "410:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2811, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "393:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "393:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "393:38:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2810, + "id": 2815, + "nodeType": "Return", + "src": "386:45:29" + } + ] + }, + "functionSelector": "714d8d0e", + "id": 2817, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "293:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2807, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "350:8:29" + }, + "parameters": { + "id": 2806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2805, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "324:10:29", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "319:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2804, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "319:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "318:17:29" + }, + "returnParameters": { + "id": 2810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "368:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2808, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "368:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "367:8:29" + }, + "scope": 3005, + "src": "284:154:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2388 + ], + "body": { + "id": 2830, + "nodeType": "Block", + "src": "534:60:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2826, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2819, + "src": "568:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2825, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "551:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "551:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "551:36:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2824, + "id": 2829, + "nodeType": "Return", + "src": "544:43:29" + } + ] + }, + "functionSelector": "ba9a5b25", + "id": 2831, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "453:23:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2821, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "508:8:29" + }, + "parameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2819, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "482:10:29", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "477:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2818, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "477:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "476:17:29" + }, + "returnParameters": { + "id": 2824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "526:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2822, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "526:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "525:8:29" + }, + "scope": 3005, + "src": "444:150:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2396 + ], + "body": { + "id": 2844, + "nodeType": "Block", + "src": "703:78:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2840, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2833, + "src": "737:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2839, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "720:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "720:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2842, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "720:54:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2838, + "id": 2843, + "nodeType": "Return", + "src": "713:61:29" + } + ] + }, + "functionSelector": "b749be55", + "id": 2845, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "609:36:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2835, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "677:8:29" + }, + "parameters": { + "id": 2834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2833, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "651:10:29", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "646:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "645:17:29" + }, + "returnParameters": { + "id": 2838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "695:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2836, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "695:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "694:8:29" + }, + "scope": 3005, + "src": "600:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2404 + ], + "body": { + "id": 2858, + "nodeType": "Block", + "src": "886:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2854, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "920:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2853, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "903:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "903:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "903:50:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2852, + "id": 2857, + "nodeType": "Return", + "src": "896:57:29" + } + ] + }, + "functionSelector": "82e28473", + "id": 2859, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "796:32:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "860:8:29" + }, + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2847, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "834:10:29", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "829:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2846, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "829:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "828:17:29" + }, + "returnParameters": { + "id": 2852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "878:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "878:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "877:8:29" + }, + "scope": 3005, + "src": "787:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2414 + ], + "body": { + "id": 2877, + "nodeType": "Block", + "src": "1062:84:29", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2874, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2861, + "src": "1129:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [ + { + "id": 2870, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2863, + "src": "1099:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2869, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1079:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1079:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "1079:49:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:60:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2868, + "id": 2876, + "nodeType": "Return", + "src": "1072:67:29" + } + ] + }, + "functionSelector": "205569c2", + "id": 2878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "975:12:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2865, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1038:8:29" + }, + "parameters": { + "id": 2864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2861, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "996:9:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "988:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2860, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "988:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1012:10:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1007:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1007:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "987:36:29" + }, + "returnParameters": { + "id": 2868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1056:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2866, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1056:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1055:6:29" + }, + "scope": 3005, + "src": "966:180:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2423 + ], + "body": { + "id": 2894, + "nodeType": "Block", + "src": "1247:73:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2888, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2880, + "src": "1284:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2887, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1264:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1264:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "1264:47:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 2892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:49:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2886, + "id": 2893, + "nodeType": "Return", + "src": "1257:56:29" + } + ] + }, + "functionSelector": "ca80a2ed", + "id": 2895, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1161:18:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1211:8:29" + }, + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2880, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1185:10:29", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1180:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2879, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1180:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1179:17:29" + }, + "returnParameters": { + "id": 2886, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2885, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1229:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2884, + "nodeType": "ArrayTypeName", + "src": "1229:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1228:18:29" + }, + "scope": 3005, + "src": "1152:168:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2433 + ], + "body": { + "id": 2912, + "nodeType": "Block", + "src": "1427:80:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2906, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2899, + "src": "1464:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2905, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1444:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1444:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "1444:50:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 2910, + "indexExpression": { + "id": 2909, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "1495:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1444:56:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2904, + "id": 2911, + "nodeType": "Return", + "src": "1437:63:29" + } + ] + }, + "functionSelector": "49aed35c", + "id": 2913, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1335:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2901, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1400:8:29" + }, + "parameters": { + "id": 2900, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "mutability": "mutable", + "name": "user", + "nameLocation": "1365:4:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1357:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2899, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1376:10:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1371:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2898, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1371:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1356:31:29" + }, + "returnParameters": { + "id": 2904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2903, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1418:7:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2902, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1418:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1417:9:29" + }, + "scope": 3005, + "src": "1326:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2443 + ], + "body": { + "id": 2933, + "nodeType": "Block", + "src": "1607:77:29", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2924, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2915, + "src": "1646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2925, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2917, + "src": "1652:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2923, + "name": "getBallotVotedAtEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2913, + "src": "1624:21:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) view returns (bytes32)" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1624:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:1:29", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1667:7:29", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2927, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1667:7:29", + "typeDescriptions": {} + } + }, + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1667:10:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1624:53:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2922, + "id": 2932, + "nodeType": "Return", + "src": "1617:60:29" + } + ] + }, + "functionSelector": "1209644e", + "id": 2934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1522:15:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2919, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:29" + }, + "parameters": { + "id": 2918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2915, + "mutability": "mutable", + "name": "user", + "nameLocation": "1546:4:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1538:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2914, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2917, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1557:10:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1552:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1552:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:31:29" + }, + "returnParameters": { + "id": 2922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2921, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1601:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2920, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1601:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1600:6:29" + }, + "scope": 3005, + "src": "1513:171:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2453 + ], + "body": { + "id": 2950, + "nodeType": "Block", + "src": "1794:69:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2945, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1829:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2946, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2938, + "src": "1839:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2944, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "1811:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1811:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1811:45:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2943, + "id": 2949, + "nodeType": "Return", + "src": "1804:52:29" + } + ] + }, + "functionSelector": "2c3c5ba3", + "id": 2951, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1699:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2940, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1770:8:29" + }, + "parameters": { + "id": 2939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2936, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1729:8:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1721:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2935, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1721:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2938, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1744:10:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1739:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2937, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1739:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1720:35:29" + }, + "returnParameters": { + "id": 2943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2942, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1788:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2941, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1788:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1787:6:29" + }, + "scope": 3005, + "src": "1690:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2464 + ], + "body": { + "id": 2968, + "nodeType": "Block", + "src": "2026:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2963, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2953, + "src": "2061:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2964, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2955, + "src": "2071:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2962, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "2043:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2043:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "2043:50:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 2961, + "id": 2967, + "nodeType": "Return", + "src": "2036:57:29" + } + ] + }, + "functionSelector": "0a8b471a", + "id": 2969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "1878:26:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2957, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1978:8:29" + }, + "parameters": { + "id": 2956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2953, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1913:8:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1905:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2952, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1905:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2955, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1928:10:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1923:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2954, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1923:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1904:35:29" + }, + "returnParameters": { + "id": 2961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2960, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "2004:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2958, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2004:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2959, + "nodeType": "ArrayTypeName", + "src": "2004:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2003:18:29" + }, + "scope": 3005, + "src": "1869:231:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2474 + ], + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2214:81:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2980, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2251:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2979, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2231:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2231:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "2231:46:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2984, + "indexExpression": { + "id": 2983, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "2278:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2231:57:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2978, + "id": 2985, + "nodeType": "Return", + "src": "2224:64:29" + } + ] + }, + "functionSelector": "793b9a9d", + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2115:24:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2975, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2190:8:29" + }, + "parameters": { + "id": 2974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2148:9:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2140:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2140:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2973, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2164:10:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2159:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2972, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2159:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2139:36:29" + }, + "returnParameters": { + "id": 2978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2208:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2976, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2208:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2207:6:29" + }, + "scope": 3005, + "src": "2106:189:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2483 + ], + "body": { + "id": 3003, + "nodeType": "Block", + "src": "2403:72:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2997, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2440:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2996, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2420:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2999, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2420:39:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "2420:46:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:48:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2995, + "id": 3002, + "nodeType": "Return", + "src": "2413:55:29" + } + ] + }, + "functionSelector": "cce32c52", + "id": 3004, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2310:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2991, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2367:8:29" + }, + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2341:10:29", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2336:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2988, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2336:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2335:17:29" + }, + "returnParameters": { + "id": 2995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2994, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2385:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2992, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2385:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2993, + "nodeType": "ArrayTypeName", + "src": "2385:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2384:18:29" + }, + "scope": 3005, + "src": "2301:174:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3006, + "src": "160:2317:29", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:2447:29" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n/// @dev View functions add to contract size, since they bloat the Solidity function dispatcher\ninterface IElectionInspectorModule {\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Returns the date in which the given epoch started\n function getEpochStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the given epoch ended\n function getEpochEndDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the given epoch started\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the given epoch started\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Shows if a candidate was nominated in the given epoch\n function wasNominated(address candidate, uint epochIndex) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the given epoch\n function getNomineesAtEpoch(uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the ballot id that user voted on in the given election\n function getBallotVotedAtEpoch(address user, uint epochIndex) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the given election\n function hasVotedInEpoch(address user, uint epochIndex) external view returns (bool);\n\n /// @notice Returns the number of votes given to a particular ballot in a given epoch\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has in a given epoch\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the number of votes a candidate received in a given epoch\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the winners of the given election\n function getElectionWinnersInEpoch(uint epochIndex) external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "exportedSymbols": { + "IElectionInspectorModule": [ + 2484 + ] + }, + "id": 2485, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2371, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:26" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionInspectorModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2372, + "nodeType": "StructuredDocumentation", + "src": "56:233:26", + "text": "@title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n @dev View functions add to contract size, since they bloat the Solidity function dispatcher" + }, + "fullyImplemented": false, + "id": 2484, + "linearizedBaseContracts": [ + 2484 + ], + "name": "IElectionInspectorModule", + "nameLocation": "299:24:26", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2373, + "nodeType": "StructuredDocumentation", + "src": "447:61:26", + "text": "@notice Returns the date in which the given epoch started" + }, + "functionSelector": "714d8d0e", + "id": 2380, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "522:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2375, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "553:10:26", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "548:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2374, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "548:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "547:17:26" + }, + "returnParameters": { + "id": 2379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2378, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "588:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2377, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "588:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "587:8:26" + }, + "scope": 2484, + "src": "513:83:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2381, + "nodeType": "StructuredDocumentation", + "src": "602:59:26", + "text": "@notice Returns the date in which the given epoch ended" + }, + "functionSelector": "ba9a5b25", + "id": 2388, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "675:23:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "704:10:26", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "699:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2382, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "699:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "698:17:26" + }, + "returnParameters": { + "id": 2387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2386, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "739:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2385, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "739:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "738:8:26" + }, + "scope": 2484, + "src": "666:81:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2389, + "nodeType": "StructuredDocumentation", + "src": "753:86:26", + "text": "@notice Returns the date in which the Nomination period in the given epoch started" + }, + "functionSelector": "b749be55", + "id": 2396, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "853:36:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2391, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "895:10:26", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "890:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2390, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "890:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "889:17:26" + }, + "returnParameters": { + "id": 2395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "930:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2393, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "930:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "929:8:26" + }, + "scope": 2484, + "src": "844:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2397, + "nodeType": "StructuredDocumentation", + "src": "944:82:26", + "text": "@notice Returns the date in which the Voting period in the given epoch started" + }, + "functionSelector": "82e28473", + "id": 2404, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "1040:32:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1078:10:26", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1073:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2398, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1073:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1072:17:26" + }, + "returnParameters": { + "id": 2403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2402, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1113:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2401, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1113:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1112:8:26" + }, + "scope": 2484, + "src": "1031:90:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2405, + "nodeType": "StructuredDocumentation", + "src": "1127:65:26", + "text": "@notice Shows if a candidate was nominated in the given epoch" + }, + "functionSelector": "205569c2", + "id": 2414, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "1206:12:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2407, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1227:9:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1219:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1219:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2409, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1243:10:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1238:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1238:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1218:36:26" + }, + "returnParameters": { + "id": 2413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2412, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1278:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2411, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1278:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1277:6:26" + }, + "scope": 2484, + "src": "1197:87:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2415, + "nodeType": "StructuredDocumentation", + "src": "1290:73:26", + "text": "@notice Returns a list of all nominated candidates in the given epoch" + }, + "functionSelector": "ca80a2ed", + "id": 2423, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1377:18:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2417, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1401:10:26", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1396:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2416, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1396:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1395:17:26" + }, + "returnParameters": { + "id": 2422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2421, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1436:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1436:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2420, + "nodeType": "ArrayTypeName", + "src": "1436:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1435:18:26" + }, + "scope": 2484, + "src": "1368:86:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2424, + "nodeType": "StructuredDocumentation", + "src": "1460:74:26", + "text": "@notice Returns the ballot id that user voted on in the given election" + }, + "functionSelector": "49aed35c", + "id": 2433, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1548:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2426, + "mutability": "mutable", + "name": "user", + "nameLocation": "1578:4:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1570:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1570:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2428, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1589:10:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1584:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2427, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1584:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1569:31:26" + }, + "returnParameters": { + "id": 2432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2431, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1624:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2430, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1624:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1623:9:26" + }, + "scope": 2484, + "src": "1539:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2434, + "nodeType": "StructuredDocumentation", + "src": "1639:59:26", + "text": "@notice Returns if user has voted in the given election" + }, + "functionSelector": "1209644e", + "id": 2443, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1712:15:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2436, + "mutability": "mutable", + "name": "user", + "nameLocation": "1736:4:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1728:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1728:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2438, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1747:10:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1742:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2437, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1742:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1727:31:26" + }, + "returnParameters": { + "id": 2442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1782:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2440, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1782:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1781:6:26" + }, + "scope": 2484, + "src": "1703:85:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2444, + "nodeType": "StructuredDocumentation", + "src": "1794:85:26", + "text": "@notice Returns the number of votes given to a particular ballot in a given epoch" + }, + "functionSelector": "2c3c5ba3", + "id": 2453, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1893:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2446, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1923:8:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1915:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1915:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2448, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1938:10:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1933:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1933:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1914:35:26" + }, + "returnParameters": { + "id": 2452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2451, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1973:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2450, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1973:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1972:6:26" + }, + "scope": 2484, + "src": "1884:95:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2454, + "nodeType": "StructuredDocumentation", + "src": "1985:88:26", + "text": "@notice Returns the list of candidates that a particular ballot has in a given epoch" + }, + "functionSelector": "0a8b471a", + "id": 2464, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "2087:26:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2456, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2122:8:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2114:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2455, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2114:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2458, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2137:10:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2132:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2457, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2113:35:26" + }, + "returnParameters": { + "id": 2463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2172:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2172:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2461, + "nodeType": "ArrayTypeName", + "src": "2172:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2171:18:26" + }, + "scope": 2484, + "src": "2078:112:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2465, + "nodeType": "StructuredDocumentation", + "src": "2196:77:26", + "text": "@notice Returns the number of votes a candidate received in a given epoch" + }, + "functionSelector": "793b9a9d", + "id": 2474, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2287:24:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2467, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2320:9:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2312:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2312:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2469, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2336:10:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2331:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2468, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2331:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2311:36:26" + }, + "returnParameters": { + "id": 2473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2472, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2371:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2471, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2371:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2370:6:26" + }, + "scope": 2484, + "src": "2278:99:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2475, + "nodeType": "StructuredDocumentation", + "src": "2383:53:26", + "text": "@notice Returns the winners of the given election" + }, + "functionSelector": "cce32c52", + "id": 2483, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2450:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2477, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2481:10:26", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2476:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2476:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2475:17:26" + }, + "returnParameters": { + "id": 2482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2516:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2516:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2480, + "nodeType": "ArrayTypeName", + "src": "2516:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2515:18:26" + }, + "scope": 2484, + "src": "2441:93:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2485, + "src": "289:2247:26", + "usedErrors": [] + } + ], + "src": "31:2506:26" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/ElectionStorage.sol\";\n\n/// @dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule\ncontract ElectionBase is ElectionStorage {\n // ---------------------------------------\n // Enums\n // ---------------------------------------\n\n enum ElectionPeriod {\n // Council elected and active\n Administration,\n // Accepting nominations for next election\n Nomination,\n // Accepting votes for ongoing election\n Vote,\n // Votes being counted\n Evaluation\n }\n\n // ---------------------------------------\n // Errors\n // ---------------------------------------\n\n error ElectionNotEvaluated();\n error ElectionAlreadyEvaluated();\n error AlreadyNominated();\n error NotNominated();\n error NoCandidates();\n error NoVotePower();\n error VoteNotCasted();\n error DuplicateCandidates();\n error InvalidEpochConfiguration();\n error InvalidElectionSettings();\n error NotCallableInCurrentPeriod();\n error ChangesCurrentPeriod();\n error AlreadyACouncilMember();\n error NotACouncilMember();\n error InvalidMinimumActiveMembers();\n error CrossDomainMessengerNotSet();\n error OnlyCrossDomainMessengerCanInvoke();\n error OnlyCrossDomainUserCanInvoke();\n\n // ---------------------------------------\n // Events\n // ---------------------------------------\n\n event ElectionModuleInitialized();\n event EpochStarted(uint epochIndex);\n event CouncilTokenCreated(address proxy, address implementation);\n event CouncilTokenUpgraded(address newImplementation);\n event CouncilMemberAdded(address indexed member, uint indexed epochIndex);\n event CouncilMemberRemoved(address indexed member, uint indexed epochIndex);\n event CouncilMembersDismissed(address[] members, uint indexed epochIndex);\n event EpochScheduleUpdated(uint64 nominationPeriodStartDate, uint64 votingPeriodStartDate, uint64 epochEndDate);\n event MinimumEpochDurationsChanged(\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n event MaxDateAdjustmentToleranceChanged(uint64 tolerance);\n event DefaultBallotEvaluationBatchSizeChanged(uint size);\n event NextEpochSeatCountChanged(uint8 seatCount);\n event MinimumActiveMembersChanged(uint8 minimumActiveMembers);\n event CandidateNominated(address indexed candidate, uint indexed epochIndex);\n event NominationWithdrawn(address indexed candidate, uint indexed epochIndex);\n event VoteRecorded(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event VoteWithdrawn(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event ElectionEvaluated(uint indexed epochIndex, uint totalBallots);\n event ElectionBatchEvaluated(uint indexed epochIndex, uint evaluatedBallots, uint totalBallots);\n event EmergencyElectionStarted(uint indexed epochIndex);\n event CrossDomainMessengerSet(address messenger);\n\n // ---------------------------------------\n // Helpers\n // ---------------------------------------\n\n function _createNewEpoch() internal virtual {\n ElectionStore storage store = _electionStore();\n\n store.epochs.push();\n store.elections.push();\n }\n\n function _getCurrentEpochIndex() internal view returns (uint) {\n return _electionStore().epochs.length - 1;\n }\n\n function _getCurrentEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex());\n }\n\n function _getPreviousEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex() - 1);\n }\n\n function _getEpochAtIndex(uint epochIndex) internal view returns (EpochData storage) {\n return _electionStore().epochs[epochIndex];\n }\n\n function _getCurrentElection() internal view returns (ElectionData storage) {\n return _getElectionAtIndex(_getCurrentEpochIndex());\n }\n\n function _getElectionAtIndex(uint epochIndex) internal view returns (ElectionData storage) {\n return _electionStore().elections[epochIndex];\n }\n\n function _getBallot(bytes32 ballotId) internal view returns (BallotData storage) {\n return _getCurrentElection().ballotsById[ballotId];\n }\n\n function _getBallotInEpoch(bytes32 ballotId, uint epochIndex) internal view returns (BallotData storage) {\n return _getElectionAtIndex(epochIndex).ballotsById[ballotId];\n }\n\n function _calculateBallotId(address[] memory candidates) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(candidates));\n }\n\n function _ballotExists(BallotData storage ballot) internal view returns (bool) {\n return ballot.candidates.length != 0;\n }\n\n function _getBallotVoted(address user) internal view returns (bytes32) {\n return _getCurrentElection().ballotIdsByAddress[user];\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4684, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4333, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:34" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "file": "../../storage/ElectionStorage.sol", + "id": 4334, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4684, + "sourceUnit": 4332, + "src": "56:43:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4336, + "name": "ElectionStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4331, + "src": "228:15:34" + }, + "id": 4337, + "nodeType": "InheritanceSpecifier", + "src": "228:15:34" + } + ], + "canonicalName": "ElectionBase", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4335, + "nodeType": "StructuredDocumentation", + "src": "101:102:34", + "text": "@dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule" + }, + "fullyImplemented": true, + "id": 4683, + "linearizedBaseContracts": [ + 4683, + 4331 + ], + "name": "ElectionBase", + "nameLocation": "212:12:34", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionBase.ElectionPeriod", + "id": 4342, + "members": [ + { + "id": 4338, + "name": "Administration", + "nameLocation": "426:14:34", + "nodeType": "EnumValue", + "src": "426:14:34" + }, + { + "id": 4339, + "name": "Nomination", + "nameLocation": "501:10:34", + "nodeType": "EnumValue", + "src": "501:10:34" + }, + { + "id": 4340, + "name": "Vote", + "nameLocation": "569:4:34", + "nodeType": "EnumValue", + "src": "569:4:34" + }, + { + "id": 4341, + "name": "Evaluation", + "nameLocation": "614:10:34", + "nodeType": "EnumValue", + "src": "614:10:34" + } + ], + "name": "ElectionPeriod", + "nameLocation": "363:14:34", + "nodeType": "EnumDefinition", + "src": "358:272:34" + }, + { + "id": 4344, + "name": "ElectionNotEvaluated", + "nameLocation": "751:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4343, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:2:34" + }, + "src": "745:29:34" + }, + { + "id": 4346, + "name": "ElectionAlreadyEvaluated", + "nameLocation": "785:24:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4345, + "nodeType": "ParameterList", + "parameters": [], + "src": "809:2:34" + }, + "src": "779:33:34" + }, + { + "id": 4348, + "name": "AlreadyNominated", + "nameLocation": "823:16:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4347, + "nodeType": "ParameterList", + "parameters": [], + "src": "839:2:34" + }, + "src": "817:25:34" + }, + { + "id": 4350, + "name": "NotNominated", + "nameLocation": "853:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4349, + "nodeType": "ParameterList", + "parameters": [], + "src": "865:2:34" + }, + "src": "847:21:34" + }, + { + "id": 4352, + "name": "NoCandidates", + "nameLocation": "879:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4351, + "nodeType": "ParameterList", + "parameters": [], + "src": "891:2:34" + }, + "src": "873:21:34" + }, + { + "id": 4354, + "name": "NoVotePower", + "nameLocation": "905:11:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4353, + "nodeType": "ParameterList", + "parameters": [], + "src": "916:2:34" + }, + "src": "899:20:34" + }, + { + "id": 4356, + "name": "VoteNotCasted", + "nameLocation": "930:13:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4355, + "nodeType": "ParameterList", + "parameters": [], + "src": "943:2:34" + }, + "src": "924:22:34" + }, + { + "id": 4358, + "name": "DuplicateCandidates", + "nameLocation": "957:19:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4357, + "nodeType": "ParameterList", + "parameters": [], + "src": "976:2:34" + }, + "src": "951:28:34" + }, + { + "id": 4360, + "name": "InvalidEpochConfiguration", + "nameLocation": "990:25:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4359, + "nodeType": "ParameterList", + "parameters": [], + "src": "1015:2:34" + }, + "src": "984:34:34" + }, + { + "id": 4362, + "name": "InvalidElectionSettings", + "nameLocation": "1029:23:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4361, + "nodeType": "ParameterList", + "parameters": [], + "src": "1052:2:34" + }, + "src": "1023:32:34" + }, + { + "id": 4364, + "name": "NotCallableInCurrentPeriod", + "nameLocation": "1066:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4363, + "nodeType": "ParameterList", + "parameters": [], + "src": "1092:2:34" + }, + "src": "1060:35:34" + }, + { + "id": 4366, + "name": "ChangesCurrentPeriod", + "nameLocation": "1106:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4365, + "nodeType": "ParameterList", + "parameters": [], + "src": "1126:2:34" + }, + "src": "1100:29:34" + }, + { + "id": 4368, + "name": "AlreadyACouncilMember", + "nameLocation": "1140:21:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4367, + "nodeType": "ParameterList", + "parameters": [], + "src": "1161:2:34" + }, + "src": "1134:30:34" + }, + { + "id": 4370, + "name": "NotACouncilMember", + "nameLocation": "1175:17:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4369, + "nodeType": "ParameterList", + "parameters": [], + "src": "1192:2:34" + }, + "src": "1169:26:34" + }, + { + "id": 4372, + "name": "InvalidMinimumActiveMembers", + "nameLocation": "1206:27:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4371, + "nodeType": "ParameterList", + "parameters": [], + "src": "1233:2:34" + }, + "src": "1200:36:34" + }, + { + "id": 4374, + "name": "CrossDomainMessengerNotSet", + "nameLocation": "1247:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1273:2:34" + }, + "src": "1241:35:34" + }, + { + "id": 4376, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nameLocation": "1287:33:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4375, + "nodeType": "ParameterList", + "parameters": [], + "src": "1320:2:34" + }, + "src": "1281:42:34" + }, + { + "id": 4378, + "name": "OnlyCrossDomainUserCanInvoke", + "nameLocation": "1334:28:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4377, + "nodeType": "ParameterList", + "parameters": [], + "src": "1362:2:34" + }, + "src": "1328:37:34" + }, + { + "anonymous": false, + "id": 4380, + "name": "ElectionModuleInitialized", + "nameLocation": "1486:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4379, + "nodeType": "ParameterList", + "parameters": [], + "src": "1511:2:34" + }, + "src": "1480:34:34" + }, + { + "anonymous": false, + "id": 4384, + "name": "EpochStarted", + "nameLocation": "1525:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4383, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4382, + "indexed": false, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1543:10:34", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "1538:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4381, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1538:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:17:34" + }, + "src": "1519:36:34" + }, + { + "anonymous": false, + "id": 4390, + "name": "CouncilTokenCreated", + "nameLocation": "1566:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4386, + "indexed": false, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "1594:5:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1586:13:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1586:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4388, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1609:14:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1601:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1585:39:34" + }, + "src": "1560:65:34" + }, + { + "anonymous": false, + "id": 4394, + "name": "CouncilTokenUpgraded", + "nameLocation": "1636:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4392, + "indexed": false, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1665:17:34", + "nodeType": "VariableDeclaration", + "scope": 4394, + "src": "1657:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4391, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1657:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1656:27:34" + }, + "src": "1630:54:34" + }, + { + "anonymous": false, + "id": 4400, + "name": "CouncilMemberAdded", + "nameLocation": "1695:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4396, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1730:6:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1714:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1714:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4398, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1751:10:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1738:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4397, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1738:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1713:49:34" + }, + "src": "1689:74:34" + }, + { + "anonymous": false, + "id": 4406, + "name": "CouncilMemberRemoved", + "nameLocation": "1774:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4402, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1811:6:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1795:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1795:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4404, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1832:10:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1819:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4403, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1819:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1794:49:34" + }, + "src": "1768:76:34" + }, + { + "anonymous": false, + "id": 4413, + "name": "CouncilMembersDismissed", + "nameLocation": "1855:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4409, + "indexed": false, + "mutability": "mutable", + "name": "members", + "nameLocation": "1889:7:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1879:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1879:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4408, + "nodeType": "ArrayTypeName", + "src": "1879:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4411, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1911:10:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1898:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4410, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1898:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1878:44:34" + }, + "src": "1849:74:34" + }, + { + "anonymous": false, + "id": 4421, + "name": "EpochScheduleUpdated", + "nameLocation": "1934:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "indexed": false, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1962:25:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1955:32:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4414, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1955:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4417, + "indexed": false, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1996:21:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1989:28:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4416, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1989:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "indexed": false, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2026:12:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "2019:19:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4418, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2019:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1954:85:34" + }, + "src": "1928:112:34" + }, + { + "anonymous": false, + "id": 4429, + "name": "MinimumEpochDurationsChanged", + "nameLocation": "2051:28:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4423, + "indexed": false, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "2096:27:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2089:34:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4422, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2089:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4425, + "indexed": false, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "2140:23:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2133:30:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4424, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2133:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4427, + "indexed": false, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "2180:16:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2173:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4426, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2173:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2079:123:34" + }, + "src": "2045:158:34" + }, + { + "anonymous": false, + "id": 4433, + "name": "MaxDateAdjustmentToleranceChanged", + "nameLocation": "2214:33:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4431, + "indexed": false, + "mutability": "mutable", + "name": "tolerance", + "nameLocation": "2255:9:34", + "nodeType": "VariableDeclaration", + "scope": 4433, + "src": "2248:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4430, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2248:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2247:18:34" + }, + "src": "2208:58:34" + }, + { + "anonymous": false, + "id": 4437, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nameLocation": "2277:39:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4435, + "indexed": false, + "mutability": "mutable", + "name": "size", + "nameLocation": "2322:4:34", + "nodeType": "VariableDeclaration", + "scope": 4437, + "src": "2317:9:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4434, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2317:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2316:11:34" + }, + "src": "2271:57:34" + }, + { + "anonymous": false, + "id": 4441, + "name": "NextEpochSeatCountChanged", + "nameLocation": "2339:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4439, + "indexed": false, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "2371:9:34", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "2365:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4438, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2365:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2364:17:34" + }, + "src": "2333:49:34" + }, + { + "anonymous": false, + "id": 4445, + "name": "MinimumActiveMembersChanged", + "nameLocation": "2393:27:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4443, + "indexed": false, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2427:20:34", + "nodeType": "VariableDeclaration", + "scope": 4445, + "src": "2421:26:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4442, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2421:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2420:28:34" + }, + "src": "2387:62:34" + }, + { + "anonymous": false, + "id": 4451, + "name": "CandidateNominated", + "nameLocation": "2460:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4447, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2495:9:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2479:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4446, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2479:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4449, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2519:10:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2506:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4448, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2506:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2478:52:34" + }, + "src": "2454:77:34" + }, + { + "anonymous": false, + "id": 4457, + "name": "NominationWithdrawn", + "nameLocation": "2542:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4453, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2578:9:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2562:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2562:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4455, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2602:10:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2589:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4454, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2589:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2561:52:34" + }, + "src": "2536:78:34" + }, + { + "anonymous": false, + "id": 4467, + "name": "VoteRecorded", + "nameLocation": "2625:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4459, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2654:5:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2638:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4458, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2638:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4461, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2677:8:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2661:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4460, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2661:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4463, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2700:10:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2687:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4462, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2687:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4465, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2717:9:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2712:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4464, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2637:90:34" + }, + "src": "2619:109:34" + }, + { + "anonymous": false, + "id": 4477, + "name": "VoteWithdrawn", + "nameLocation": "2739:13:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4469, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2769:5:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2753:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2753:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4471, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2792:8:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2776:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4470, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2776:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4473, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2815:10:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2802:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4472, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2802:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4475, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2832:9:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2827:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4474, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2827:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2752:90:34" + }, + "src": "2733:110:34" + }, + { + "anonymous": false, + "id": 4483, + "name": "ElectionEvaluated", + "nameLocation": "2854:17:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4479, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2885:10:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2872:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4478, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2872:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4481, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "2902:12:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2897:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4480, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2897:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2871:44:34" + }, + "src": "2848:68:34" + }, + { + "anonymous": false, + "id": 4491, + "name": "ElectionBatchEvaluated", + "nameLocation": "2927:22:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4485, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2963:10:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2950:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2950:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4487, + "indexed": false, + "mutability": "mutable", + "name": "evaluatedBallots", + "nameLocation": "2980:16:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2975:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4486, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2975:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4489, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "3003:12:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2998:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4488, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2998:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2949:67:34" + }, + "src": "2921:96:34" + }, + { + "anonymous": false, + "id": 4495, + "name": "EmergencyElectionStarted", + "nameLocation": "3028:24:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4493, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3066:10:34", + "nodeType": "VariableDeclaration", + "scope": 4495, + "src": "3053:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3053:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3052:25:34" + }, + "src": "3022:56:34" + }, + { + "anonymous": false, + "id": 4499, + "name": "CrossDomainMessengerSet", + "nameLocation": "3089:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4498, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4497, + "indexed": false, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3121:9:34", + "nodeType": "VariableDeclaration", + "scope": 4499, + "src": "3113:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3113:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3112:19:34" + }, + "src": "3083:49:34" + }, + { + "body": { + "id": 4522, + "nodeType": "Block", + "src": "3292:125:34", + "statements": [ + { + "assignments": [ + 4504 + ], + "declarations": [ + { + "constant": false, + "id": 4504, + "mutability": "mutable", + "name": "store", + "nameLocation": "3324:5:34", + "nodeType": "VariableDeclaration", + "scope": 4522, + "src": "3302:27:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4503, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4502, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3302:13:34" + }, + "referencedDeclaration": 4246, + "src": "3302:13:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4507, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4505, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3332:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3332:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:46:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4508, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3359:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3359:12:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3359:17:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$returns$_t_struct$_EpochData_$4270_storage_$bound_to$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.EpochData storage ref[] storage pointer) returns (struct ElectionStorage.EpochData storage ref)" + } + }, + "id": 4513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:19:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "id": 4514, + "nodeType": "ExpressionStatement", + "src": "3359:19:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4515, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3388:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4518, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "3388:15:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3388:20:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$returns$_t_struct$_ElectionData_$4299_storage_$bound_to$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.ElectionData storage ref[] storage pointer) returns (struct ElectionStorage.ElectionData storage ref)" + } + }, + "id": 4520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3388:22:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "id": 4521, + "nodeType": "ExpressionStatement", + "src": "3388:22:34" + } + ] + }, + "id": 4523, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "3257:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4500, + "nodeType": "ParameterList", + "parameters": [], + "src": "3272:2:34" + }, + "returnParameters": { + "id": 4501, + "nodeType": "ParameterList", + "parameters": [], + "src": "3292:0:34" + }, + "scope": 4683, + "src": "3248:169:34", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 4535, + "nodeType": "Block", + "src": "3485:58:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4528, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3502:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3502:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3502:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3502:30:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3535:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3502:34:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4527, + "id": 4534, + "nodeType": "Return", + "src": "3495:41:34" + } + ] + }, + "id": 4536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpochIndex", + "nameLocation": "3432:21:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4524, + "nodeType": "ParameterList", + "parameters": [], + "src": "3453:2:34" + }, + "returnParameters": { + "id": 4527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4526, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4536, + "src": "3479:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4525, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3479:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3478:6:34" + }, + "scope": 4683, + "src": "3423:120:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4547, + "nodeType": "Block", + "src": "3619:65:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4543, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3653:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3653:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4542, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3636:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3636:41:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4541, + "id": 4546, + "nodeType": "Return", + "src": "3629:48:34" + } + ] + }, + "id": 4548, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpoch", + "nameLocation": "3558:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4537, + "nodeType": "ParameterList", + "parameters": [], + "src": "3574:2:34" + }, + "returnParameters": { + "id": 4541, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4540, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4548, + "src": "3600:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4539, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4538, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3600:9:34" + }, + "referencedDeclaration": 4270, + "src": "3600:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3599:19:34" + }, + "scope": 4683, + "src": "3549:135:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4561, + "nodeType": "Block", + "src": "3761:69:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4555, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3795:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3795:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3795:27:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4554, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3778:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3778:45:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4553, + "id": 4560, + "nodeType": "Return", + "src": "3771:52:34" + } + ] + }, + "id": 4562, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getPreviousEpoch", + "nameLocation": "3699:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4549, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:2:34" + }, + "returnParameters": { + "id": 4553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4552, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4562, + "src": "3742:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4551, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4550, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3742:9:34" + }, + "referencedDeclaration": 4270, + "src": "3742:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3741:19:34" + }, + "scope": 4683, + "src": "3690:140:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4576, + "nodeType": "Block", + "src": "3921:59:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4570, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3938:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3938:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3938:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4574, + "indexExpression": { + "id": 4573, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4564, + "src": "3962:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3938:35:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "functionReturnParameters": 4569, + "id": 4575, + "nodeType": "Return", + "src": "3931:42:34" + } + ] + }, + "id": 4577, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochAtIndex", + "nameLocation": "3845:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4564, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3867:10:34", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3862:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3862:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3861:17:34" + }, + "returnParameters": { + "id": 4569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4568, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3902:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4567, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4566, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3902:9:34" + }, + "referencedDeclaration": 4270, + "src": "3902:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3901:19:34" + }, + "scope": 4683, + "src": "3836:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4588, + "nodeType": "Block", + "src": "4062:68:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4584, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "4099:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4099:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4583, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4079:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4079:44:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "functionReturnParameters": 4582, + "id": 4587, + "nodeType": "Return", + "src": "4072:51:34" + } + ] + }, + "id": 4589, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentElection", + "nameLocation": "3995:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4578, + "nodeType": "ParameterList", + "parameters": [], + "src": "4014:2:34" + }, + "returnParameters": { + "id": 4582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4581, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4589, + "src": "4040:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4580, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4579, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4040:12:34" + }, + "referencedDeclaration": 4299, + "src": "4040:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4039:22:34" + }, + "scope": 4683, + "src": "3986:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4603, + "nodeType": "Block", + "src": "4227:62:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4597, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "4244:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4244:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "4244:26:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4601, + "indexExpression": { + "id": 4600, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4591, + "src": "4271:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4244:38:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "functionReturnParameters": 4596, + "id": 4602, + "nodeType": "Return", + "src": "4237:45:34" + } + ] + }, + "id": 4604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getElectionAtIndex", + "nameLocation": "4145:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4591, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4170:10:34", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4165:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4590, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4165:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4164:17:34" + }, + "returnParameters": { + "id": 4596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4205:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4594, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4593, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4205:12:34" + }, + "referencedDeclaration": 4299, + "src": "4205:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4204:22:34" + }, + "scope": 4683, + "src": "4136:153:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4618, + "nodeType": "Block", + "src": "4376:67:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4612, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "4393:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4393:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4393:33:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4616, + "indexExpression": { + "id": 4615, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "4427:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:43:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4611, + "id": 4617, + "nodeType": "Return", + "src": "4386:50:34" + } + ] + }, + "id": 4619, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallot", + "nameLocation": "4304:10:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4606, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4323:8:34", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4315:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4605, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4315:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4314:18:34" + }, + "returnParameters": { + "id": 4611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4610, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4356:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4609, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4608, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4356:10:34" + }, + "referencedDeclaration": 4309, + "src": "4356:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4355:20:34" + }, + "scope": 4683, + "src": "4295:148:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4636, + "nodeType": "Block", + "src": "4554:77:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 4630, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4623, + "src": "4591:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4629, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4571:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:31:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4571:43:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4634, + "indexExpression": { + "id": 4633, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "4615:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4571:53:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4628, + "id": 4635, + "nodeType": "Return", + "src": "4564:60:34" + } + ] + }, + "id": 4637, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotInEpoch", + "nameLocation": "4458:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4621, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4484:8:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4476:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4620, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4476:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4623, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4499:10:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4494:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4622, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4494:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4475:35:34" + }, + "returnParameters": { + "id": 4628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4627, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4534:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4626, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4625, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4534:10:34" + }, + "referencedDeclaration": 4309, + "src": "4534:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4533:20:34" + }, + "scope": 4683, + "src": "4449:182:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4652, + "nodeType": "Block", + "src": "4726:63:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4648, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4640, + "src": "4770:10:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 4646, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4753:3:34", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "4753:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4753:28:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4645, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "4743:9:34", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4743:39:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4644, + "id": 4651, + "nodeType": "Return", + "src": "4736:46:34" + } + ] + }, + "id": 4653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_calculateBallotId", + "nameLocation": "4646:18:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4640, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "4682:10:34", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4665:27:34", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4638, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4665:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4639, + "nodeType": "ArrayTypeName", + "src": "4665:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "4664:29:34" + }, + "returnParameters": { + "id": 4644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4643, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4717:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4642, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4717:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4716:9:34" + }, + "scope": 4683, + "src": "4637:152:34", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4667, + "nodeType": "Block", + "src": "4874:53:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4661, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4656, + "src": "4891:6:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4662, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "4891:17:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4891:24:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4919:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4891:29:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4660, + "id": 4666, + "nodeType": "Return", + "src": "4884:36:34" + } + ] + }, + "id": 4668, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ballotExists", + "nameLocation": "4804:13:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4656, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "4837:6:34", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4818:25:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4655, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4654, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4818:10:34" + }, + "referencedDeclaration": 4309, + "src": "4818:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4817:27:34" + }, + "returnParameters": { + "id": 4660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4659, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4868:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4658, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4868:4:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4867:6:34" + }, + "scope": 4683, + "src": "4795:132:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4681, + "nodeType": "Block", + "src": "5004:70:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4675, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "5021:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5021:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "5021:40:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 4679, + "indexExpression": { + "id": 4678, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "5062:4:34", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5021:46:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4674, + "id": 4680, + "nodeType": "Return", + "src": "5014:53:34" + } + ] + }, + "id": 4682, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotVoted", + "nameLocation": "4942:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "user", + "nameLocation": "4966:4:34", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4958:12:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4669, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4958:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4957:14:34" + }, + "returnParameters": { + "id": 4674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4673, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4995:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4672, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4995:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4994:9:34" + }, + "scope": 4683, + "src": "4933:141:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4684, + "src": "203:4873:34", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:5046:34" + } + }, + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\n\ncontract ElectionStorage {\n struct ElectionStore {\n // True if initializeElectionModule was called\n bool initialized;\n // The address of the council NFT\n address councilToken;\n // Council member addresses\n SetUtil.AddressSet councilMembers;\n // Council token id's by council member address\n mapping(address => uint) councilTokenIds;\n // Array of EpochData's for each epoch\n EpochData[] epochs;\n // Array of ElectionData's for each election\n ElectionData[] elections;\n // Pointer to ElectionSettings\n // To be always used via store.settings[0] to avoid storage collisions\n mapping(uint => ElectionSettings) settings;\n }\n\n struct ElectionSettings {\n // Number of council members in the next epoch\n uint8 nextEpochSeatCount;\n // Minimum active council members. If too many are dismissed an emergency election is triggered\n uint8 minimumActiveMembers;\n // Minimum epoch duration when adjusting schedules\n uint64 minEpochDuration;\n // Minimum nomination period duration when adjusting schedules\n uint64 minNominationPeriodDuration;\n // Minimum voting period duration when adjusting schedules\n uint64 minVotingPeriodDuration;\n // Maximum size for tweaking epoch schedules (see tweakEpochSchedule)\n uint64 maxDateAdjustmentTolerance;\n // Default batch size when calling evaluate() with numBallots = 0\n uint defaultBallotEvaluationBatchSize;\n }\n\n struct EpochData {\n // Date at which the epoch started\n uint64 startDate;\n // Date at which the epoch's voting period will end\n uint64 endDate;\n // Date at which the epoch's nomination period will start\n uint64 nominationPeriodStartDate;\n // Date at which the epoch's voting period will start\n uint64 votingPeriodStartDate;\n }\n\n struct ElectionData {\n // True if ballots have been counted in this election\n bool evaluated;\n // True if NFTs have been re-shuffled in this election\n bool resolved;\n // Number of counted ballots in this election\n uint numEvaluatedBallots;\n // List of nominated candidates in this election\n SetUtil.AddressSet nominees;\n // List of winners of this election (requires evaluation)\n SetUtil.AddressSet winners;\n // List of all ballot ids in this election\n bytes32[] ballotIds;\n // BallotData by ballot id\n mapping(bytes32 => BallotData) ballotsById;\n // Ballot id that each user voted on\n mapping(address => bytes32) ballotIdsByAddress;\n // Number of votes for each candidate\n mapping(address => uint) candidateVotes;\n }\n\n struct BallotData {\n // Total accumulated votes in this ballot (needs evaluation)\n uint votes;\n // List of candidates in this ballot\n address[] candidates;\n // Vote power added per voter\n mapping(address => uint) votesByUser;\n }\n\n function _electionSettings() internal view returns (ElectionSettings storage) {\n return _electionStore().settings[0];\n }\n\n function _electionStore() internal pure returns (ElectionStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.election\")) - 1)\n store.slot := 0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "exportedSymbols": { + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4332, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4220, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:33" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 4221, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4332, + "sourceUnit": 2289, + "src": "56:65:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ElectionStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4331, + "linearizedBaseContracts": [ + 4331 + ], + "name": "ElectionStorage", + "nameLocation": "132:15:33", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionStorage.ElectionStore", + "id": 4246, + "members": [ + { + "constant": false, + "id": 4223, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "245:11:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "240:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4222, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "240:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4225, + "mutability": "mutable", + "name": "councilToken", + "nameLocation": "316:12:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "308:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4228, + "mutability": "mutable", + "name": "councilMembers", + "nameLocation": "393:14:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "374:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4227, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4226, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "374:18:33" + }, + "referencedDeclaration": 1788, + "src": "374:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4232, + "mutability": "mutable", + "name": "councilTokenIds", + "nameLocation": "498:15:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "473:40:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4231, + "keyType": { + "id": 4229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "473:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4230, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "492:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4236, + "mutability": "mutable", + "name": "epochs", + "nameLocation": "582:6:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "570:18:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + }, + "typeName": { + "baseType": { + "id": 4234, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4233, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "570:9:33" + }, + "referencedDeclaration": 4270, + "src": "570:9:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "id": 4235, + "nodeType": "ArrayTypeName", + "src": "570:11:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4240, + "mutability": "mutable", + "name": "elections", + "nameLocation": "666:9:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "651:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + }, + "typeName": { + "baseType": { + "id": 4238, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4237, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "651:12:33" + }, + "referencedDeclaration": 4299, + "src": "651:12:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "id": 4239, + "nodeType": "ArrayTypeName", + "src": "651:14:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4245, + "mutability": "mutable", + "name": "settings", + "nameLocation": "837:8:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "803:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "typeName": { + "id": 4244, + "keyType": { + "id": 4241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "811:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "803:33:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "valueType": { + "id": 4243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4242, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "819:16:33" + }, + "referencedDeclaration": 4261, + "src": "819:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionStore", + "nameLocation": "161:13:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "154:698:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionSettings", + "id": 4261, + "members": [ + { + "constant": false, + "id": 4248, + "mutability": "mutable", + "name": "nextEpochSeatCount", + "nameLocation": "953:18:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "947:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4247, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "947:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4250, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1091:20:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1085:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4249, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1085:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4252, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "1187:16:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1180:23:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4251, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1180:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4254, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "1291:27:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1284:34:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4253, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1284:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4256, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "1402:23:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1395:30:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4255, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1395:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4258, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "1520:26:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1513:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4257, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1513:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4260, + "mutability": "mutable", + "name": "defaultBallotEvaluationBatchSize", + "nameLocation": "1635:32:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1630:37:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4259, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1630:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "ElectionSettings", + "nameLocation": "865:16:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "858:816:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.EpochData", + "id": 4270, + "members": [ + { + "constant": false, + "id": 4263, + "mutability": "mutable", + "name": "startDate", + "nameLocation": "1757:9:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1750:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1750:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4265, + "mutability": "mutable", + "name": "endDate", + "nameLocation": "1843:7:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1836:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4264, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1836:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4267, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1933:25:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1926:32:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4266, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1926:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4269, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2037:21:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "2030:28:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4268, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2030:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "name": "EpochData", + "nameLocation": "1687:9:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "1680:385:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionData", + "id": 4299, + "members": [ + { + "constant": false, + "id": 4272, + "mutability": "mutable", + "name": "evaluated", + "nameLocation": "2168:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2163:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4271, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2163:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4274, + "mutability": "mutable", + "name": "resolved", + "nameLocation": "2255:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2250:13:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4273, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2250:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4276, + "mutability": "mutable", + "name": "numEvaluatedBallots", + "nameLocation": "2332:19:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2327:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4275, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2327:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4279, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "2437:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2418:27:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4277, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2418:18:33" + }, + "referencedDeclaration": 1788, + "src": "2418:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4282, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2540:7:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2521:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4281, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4280, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2521:18:33" + }, + "referencedDeclaration": 1788, + "src": "2521:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4285, + "mutability": "mutable", + "name": "ballotIds", + "nameLocation": "2618:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2608:19:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 4283, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2608:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4284, + "nodeType": "ArrayTypeName", + "src": "2608:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4290, + "mutability": "mutable", + "name": "ballotsById", + "nameLocation": "2703:11:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2672:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "typeName": { + "id": 4289, + "keyType": { + "id": 4286, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2680:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2672:30:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "valueType": { + "id": 4288, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4287, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2691:10:33" + }, + "referencedDeclaration": 4309, + "src": "2691:10:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4294, + "mutability": "mutable", + "name": "ballotIdsByAddress", + "nameLocation": "2797:18:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2769:46:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "typeName": { + "id": 4293, + "keyType": { + "id": 4291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2777:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2769:27:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "valueType": { + "id": 4292, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2788:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4298, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2896:14:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2871:39:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4297, + "keyType": { + "id": 4295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2879:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2871:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4296, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2890:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionData", + "nameLocation": "2078:12:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2071:846:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.BallotData", + "id": 4309, + "members": [ + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "votes", + "nameLocation": "3025:5:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3020:10:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4300, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3020:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4304, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3095:10:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3085:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3085:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4303, + "nodeType": "ArrayTypeName", + "src": "3085:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4308, + "mutability": "mutable", + "name": "votesByUser", + "nameLocation": "3178:11:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3153:36:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4307, + "keyType": { + "id": 4305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3161:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "3153:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4306, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3172:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "BallotData", + "nameLocation": "2930:10:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2923:273:33", + "visibility": "public" + }, + { + "body": { + "id": 4321, + "nodeType": "Block", + "src": "3280:52:33", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4315, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3297:14:33", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3297:16:33", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "settings", + "nodeType": "MemberAccess", + "referencedDeclaration": 4245, + "src": "3297:25:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings storage ref)" + } + }, + "id": 4319, + "indexExpression": { + "hexValue": "30", + "id": 4318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3323:1:33", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3297:28:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage", + "typeString": "struct ElectionStorage.ElectionSettings storage ref" + } + }, + "functionReturnParameters": 4314, + "id": 4320, + "nodeType": "Return", + "src": "3290:35:33" + } + ] + }, + "id": 4322, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionSettings", + "nameLocation": "3211:17:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4310, + "nodeType": "ParameterList", + "parameters": [], + "src": "3228:2:33" + }, + "returnParameters": { + "id": 4314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4313, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4322, + "src": "3254:24:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 4312, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4311, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3254:16:33" + }, + "referencedDeclaration": 4261, + "src": "3254:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "src": "3253:26:33" + }, + "scope": 4331, + "src": "3202:130:33", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4329, + "nodeType": "Block", + "src": "3416:198:33", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "3435:173:33", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3518:80:33", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3532:66:33", + "type": "", + "value": "0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "3518:10:33" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 4326, + "isOffset": false, + "isSlot": true, + "src": "3518:10:33", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 4328, + "nodeType": "InlineAssembly", + "src": "3426:182:33" + } + ] + }, + "id": 4330, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionStore", + "nameLocation": "3347:14:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4323, + "nodeType": "ParameterList", + "parameters": [], + "src": "3361:2:33" + }, + "returnParameters": { + "id": 4327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4326, + "mutability": "mutable", + "name": "store", + "nameLocation": "3409:5:33", + "nodeType": "VariableDeclaration", + "scope": 4330, + "src": "3387:27:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4325, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4324, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3387:13:33" + }, + "referencedDeclaration": 4246, + "src": "3387:13:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "src": "3386:29:33" + }, + "scope": 4331, + "src": "3338:276:33", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4332, + "src": "123:3493:33", + "usedErrors": [] + } + ], + "src": "31:3586:33" + } + }, + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary SetUtil {\n // ----------------------------------------\n // Address support\n // ----------------------------------------\n\n struct AddressSet {\n Bytes32Set raw;\n }\n\n function add(AddressSet storage set, address value) internal {\n add(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function remove(AddressSet storage set, address value) internal {\n remove(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function replace(\n AddressSet storage set,\n address value,\n address newValue\n ) internal {\n replace(set.raw, bytes32(uint256(uint160(value))), bytes32(uint256(uint160(newValue))));\n }\n\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return contains(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function length(AddressSet storage set) internal view returns (uint) {\n return length(set.raw);\n }\n\n function valueAt(AddressSet storage set, uint position) internal view returns (address) {\n return address(uint160(uint256(valueAt(set.raw, position))));\n }\n\n function positionOf(AddressSet storage set, address value) internal view returns (uint) {\n return positionOf(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = values(set.raw);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // ----------------------------------------\n // Core bytes32 support\n // ----------------------------------------\n\n error PositionOutOfBounds();\n error ValueNotInSet();\n error ValueAlreadyInSet();\n\n struct Bytes32Set {\n /* solhint-disable private-vars-leading-underscore */\n bytes32[] _values;\n mapping(bytes32 => uint) _positions; // Position zero is never used.\n /* solhint-enable private-vars-leading-underscore */\n }\n\n function add(Bytes32Set storage set, bytes32 value) internal {\n if (contains(set, value)) {\n revert ValueAlreadyInSet();\n }\n\n set._values.push(value);\n set._positions[value] = set._values.length;\n }\n\n function remove(Bytes32Set storage set, bytes32 value) internal {\n uint position = set._positions[value];\n if (position == 0) {\n revert ValueNotInSet();\n }\n\n uint index = position - 1;\n uint lastIndex = set._values.length - 1;\n\n // If the element being deleted is not the last in the values,\n // move the last element to its position.\n if (index != lastIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n set._values[index] = lastValue;\n set._positions[lastValue] = position;\n }\n\n // Remove the last element in the values.\n set._values.pop();\n delete set._positions[value];\n }\n\n function replace(\n Bytes32Set storage set,\n bytes32 value,\n bytes32 newValue\n ) internal {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n if (contains(set, newValue)) {\n revert ValueAlreadyInSet();\n }\n\n uint position = set._positions[value];\n uint index = position - 1;\n\n set._values[index] = newValue;\n set._positions[newValue] = position;\n }\n\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return set._positions[value] != 0;\n }\n\n function length(Bytes32Set storage set) internal view returns (uint) {\n return set._values.length;\n }\n\n function valueAt(Bytes32Set storage set, uint position) internal view returns (bytes32) {\n if (position == 0 || position > set._values.length) {\n revert PositionOutOfBounds();\n }\n\n uint index = position - 1;\n\n return set._values[index];\n }\n\n function positionOf(Bytes32Set storage set, bytes32 value) internal view returns (uint) {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n return set._positions[value];\n }\n\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return set._values;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "exportedSymbols": { + "SetUtil": [ + 2288 + ] + }, + "id": 2289, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1784, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:24" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SetUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2288, + "linearizedBaseContracts": [ + 2288 + ], + "name": "SetUtil", + "nameLocation": "64:7:24", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "SetUtil.AddressSet", + "id": 1788, + "members": [ + { + "constant": false, + "id": 1787, + "mutability": "mutable", + "name": "raw", + "nameLocation": "237:3:24", + "nodeType": "VariableDeclaration", + "scope": 1788, + "src": "226:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 1786, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1785, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "226:10:24" + }, + "referencedDeclaration": 2007, + "src": "226:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "name": "AddressSet", + "nameLocation": "205:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "198:49:24", + "visibility": "public" + }, + { + "body": { + "id": 1811, + "nodeType": "Block", + "src": "314:63:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1797, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "328:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "328:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1805, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1793, + "src": "361:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "353:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1803, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "353:7:24", + "typeDescriptions": {} + } + }, + "id": 1806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "345:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "345:7:24", + "typeDescriptions": {} + } + }, + "id": 1807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "345:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "337:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1799, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "337:7:24", + "typeDescriptions": {} + } + }, + "id": 1808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "337:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1796, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1812, + 2043 + ], + "referencedDeclaration": 2043, + "src": "324:3:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1810, + "nodeType": "ExpressionStatement", + "src": "324:46:24" + } + ] + }, + "id": 1812, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "262:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1791, + "mutability": "mutable", + "name": "set", + "nameLocation": "285:3:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "266:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1790, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1789, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "266:10:24" + }, + "referencedDeclaration": 1788, + "src": "266:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1793, + "mutability": "mutable", + "name": "value", + "nameLocation": "298:5:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "290:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1792, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "290:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:39:24" + }, + "returnParameters": { + "id": 1795, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:0:24" + }, + "scope": 2288, + "src": "253:124:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1835, + "nodeType": "Block", + "src": "447:66:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1821, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1815, + "src": "464:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1822, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "464:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1829, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1817, + "src": "497:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "489:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1827, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "489:7:24", + "typeDescriptions": {} + } + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "489:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "481:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:24", + "typeDescriptions": {} + } + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "481:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "473:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1823, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "473:7:24", + "typeDescriptions": {} + } + }, + "id": 1832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1820, + "name": "remove", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1836, + 2122 + ], + "referencedDeclaration": 2122, + "src": "457:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "457:49:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1834, + "nodeType": "ExpressionStatement", + "src": "457:49:24" + } + ] + }, + "id": 1836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "392:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "set", + "nameLocation": "418:3:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "399:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1814, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1813, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "399:10:24" + }, + "referencedDeclaration": 1788, + "src": "399:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "value", + "nameLocation": "431:5:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "423:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1816, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "423:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "398:39:24" + }, + "returnParameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [], + "src": "447:0:24" + }, + "scope": 2288, + "src": "383:130:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1871, + "nodeType": "Block", + "src": "632:104:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1847, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "650:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "650:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "683:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "675:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1853, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "675:7:24", + "typeDescriptions": {} + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "675:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1852, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "667:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1851, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "667:7:24", + "typeDescriptions": {} + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "667:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1849, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "659:7:24", + "typeDescriptions": {} + } + }, + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1865, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "717:8:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "709:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1863, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "709:7:24", + "typeDescriptions": {} + } + }, + "id": 1866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "709:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "701:7:24", + "typeDescriptions": {} + } + }, + "id": 1867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "693:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1859, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "693:7:24", + "typeDescriptions": {} + } + }, + "id": 1868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "693:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1846, + "name": "replace", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1872, + 2181 + ], + "referencedDeclaration": 2181, + "src": "642:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32,bytes32)" + } + }, + "id": 1869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:87:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1870, + "nodeType": "ExpressionStatement", + "src": "642:87:24" + } + ] + }, + "id": 1872, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "528:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "set", + "nameLocation": "564:3:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "545:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1838, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1837, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "545:10:24" + }, + "referencedDeclaration": 1788, + "src": "545:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "value", + "nameLocation": "585:5:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "577:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1840, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "577:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "608:8:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "600:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "600:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "535:87:24" + }, + "returnParameters": { + "id": 1845, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:24" + }, + "scope": 2288, + "src": "519:217:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1897, + "nodeType": "Block", + "src": "828:75:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1883, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1875, + "src": "854:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "854:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1891, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1877, + "src": "887:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "879:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1889, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "879:7:24", + "typeDescriptions": {} + } + }, + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "879:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "871:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "871:7:24", + "typeDescriptions": {} + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "871:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "863:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1885, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "863:7:24", + "typeDescriptions": {} + } + }, + "id": 1894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "863:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1882, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "845:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "845:51:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1881, + "id": 1896, + "nodeType": "Return", + "src": "838:58:24" + } + ] + }, + "id": 1898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "751:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "set", + "nameLocation": "779:3:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "760:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1874, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1873, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "760:10:24" + }, + "referencedDeclaration": 1788, + "src": "760:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1877, + "mutability": "mutable", + "name": "value", + "nameLocation": "792:5:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "784:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "784:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "759:39:24" + }, + "returnParameters": { + "id": 1881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1880, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "822:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1879, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "822:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "821:6:24" + }, + "scope": 2288, + "src": "742:161:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1911, + "nodeType": "Block", + "src": "978:39:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1907, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1901, + "src": "1002:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1002:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1906, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1912, + 2212 + ], + "referencedDeclaration": 2212, + "src": "995:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (uint256)" + } + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1905, + "id": 1910, + "nodeType": "Return", + "src": "988:22:24" + } + ] + }, + "id": 1912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "918:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "set", + "nameLocation": "944:3:24", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "925:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "925:10:24" + }, + "referencedDeclaration": 1788, + "src": "925:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "924:24:24" + }, + "returnParameters": { + "id": 1905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1904, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "972:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "972:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "971:6:24" + }, + "scope": 2288, + "src": "909:108:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1937, + "nodeType": "Block", + "src": "1111:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 1929, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1915, + "src": "1160:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1160:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "id": 1931, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "1169:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1928, + "name": "valueAt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1938, + 2248 + ], + "referencedDeclaration": 2248, + "src": "1152:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,uint256) view returns (bytes32)" + } + }, + "id": 1932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1152:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1144:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1926, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1144:7:24", + "typeDescriptions": {} + } + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1144:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1924, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1136:7:24", + "typeDescriptions": {} + } + }, + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1136:44:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1128:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1922, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1128:7:24", + "typeDescriptions": {} + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1128:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1921, + "id": 1936, + "nodeType": "Return", + "src": "1121:60:24" + } + ] + }, + "id": 1938, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "1032:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1915, + "mutability": "mutable", + "name": "set", + "nameLocation": "1059:3:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1040:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1914, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1913, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1040:10:24" + }, + "referencedDeclaration": 1788, + "src": "1040:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "position", + "nameLocation": "1069:8:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1064:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1064:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1039:39:24" + }, + "returnParameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1920, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1102:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1102:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1101:9:24" + }, + "scope": 2288, + "src": "1023:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1963, + "nodeType": "Block", + "src": "1282:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1949, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1941, + "src": "1310:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1310:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1957, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1943, + "src": "1343:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1335:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1955, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1335:7:24", + "typeDescriptions": {} + } + }, + "id": 1958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1335:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1327:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:24", + "typeDescriptions": {} + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1327:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1319:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1951, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1319:7:24", + "typeDescriptions": {} + } + }, + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1319:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1948, + "name": "positionOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1964, + 2274 + ], + "referencedDeclaration": 2274, + "src": "1299:10:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (uint256)" + } + }, + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1947, + "id": 1962, + "nodeType": "Return", + "src": "1292:60:24" + } + ] + }, + "id": 1964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "1203:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1941, + "mutability": "mutable", + "name": "set", + "nameLocation": "1233:3:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1214:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1940, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1939, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1214:10:24" + }, + "referencedDeclaration": 1788, + "src": "1214:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "value", + "nameLocation": "1246:5:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1238:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1942, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1238:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1213:39:24" + }, + "returnParameters": { + "id": 1947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1276:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1945, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1276:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1275:6:24" + }, + "scope": 2288, + "src": "1194:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1992, + "nodeType": "Block", + "src": "1446:172:24", + "statements": [ + { + "assignments": [ + 1977 + ], + "declarations": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "store", + "nameLocation": "1473:5:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1456:22:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1975, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1456:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1976, + "nodeType": "ArrayTypeName", + "src": "1456:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "id": 1982, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 1979, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1967, + "src": "1488:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1488:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1978, + "name": "values", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1993, + 2287 + ], + "referencedDeclaration": 2287, + "src": "1481:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (bytes32[] memory)" + } + }, + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1481:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1456:40:24" + }, + { + "assignments": [ + 1987 + ], + "declarations": [ + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "result", + "nameLocation": "1523:6:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1506:23:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1506:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1986, + "nodeType": "ArrayTypeName", + "src": "1506:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 1988, + "nodeType": "VariableDeclarationStatement", + "src": "1506:23:24" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1549:39:24", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1563:15:24", + "value": { + "name": "store", + "nodeType": "YulIdentifier", + "src": "1573:5:24" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1563:6:24" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1987, + "isOffset": false, + "isSlot": false, + "src": "1563:6:24", + "valueSize": 1 + }, + { + "declaration": 1977, + "isOffset": false, + "isSlot": false, + "src": "1573:5:24", + "valueSize": 1 + } + ], + "id": 1989, + "nodeType": "InlineAssembly", + "src": "1540:48:24" + }, + { + "expression": { + "id": 1990, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1987, + "src": "1605:6:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1972, + "id": 1991, + "nodeType": "Return", + "src": "1598:13:24" + } + ] + }, + "id": 1993, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "1374:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1967, + "mutability": "mutable", + "name": "set", + "nameLocation": "1400:3:24", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1381:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1966, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1965, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1381:10:24" + }, + "referencedDeclaration": 1788, + "src": "1381:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "1380:24:24" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1428:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1970, + "nodeType": "ArrayTypeName", + "src": "1428:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1427:18:24" + }, + "scope": 2288, + "src": "1365:253:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 1995, + "name": "PositionOutOfBounds", + "nameLocation": "1755:19:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1994, + "nodeType": "ParameterList", + "parameters": [], + "src": "1774:2:24" + }, + "src": "1749:28:24" + }, + { + "id": 1997, + "name": "ValueNotInSet", + "nameLocation": "1788:13:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1996, + "nodeType": "ParameterList", + "parameters": [], + "src": "1801:2:24" + }, + "src": "1782:22:24" + }, + { + "id": 1999, + "name": "ValueAlreadyInSet", + "nameLocation": "1815:17:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [], + "src": "1832:2:24" + }, + "src": "1809:26:24" + }, + { + "canonicalName": "SetUtil.Bytes32Set", + "id": 2007, + "members": [ + { + "constant": false, + "id": 2002, + "mutability": "mutable", + "name": "_values", + "nameLocation": "1941:7:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1931:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2000, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1931:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2001, + "nodeType": "ArrayTypeName", + "src": "1931:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2006, + "mutability": "mutable", + "name": "_positions", + "nameLocation": "1983:10:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1958:35:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 2005, + "keyType": { + "id": 2003, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1966:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1958:24:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 2004, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1977:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "Bytes32Set", + "nameLocation": "1848:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "1841:252:24", + "visibility": "public" + }, + { + "body": { + "id": 2042, + "nodeType": "Block", + "src": "2160:179:24", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 2016, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2183:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2017, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2188:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2015, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "2174:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2174:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2023, + "nodeType": "IfStatement", + "src": "2170:77:24", + "trueBody": { + "id": 2022, + "nodeType": "Block", + "src": "2196:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2019, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "2217:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2217:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2021, + "nodeType": "RevertStatement", + "src": "2210:26:24" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2029, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2274:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 2024, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2257:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2257:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "2257:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2257:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2031, + "nodeType": "ExpressionStatement", + "src": "2257:23:24" + }, + { + "expression": { + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2032, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2290:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2290:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2036, + "indexExpression": { + "id": 2034, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2305:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2290:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "id": 2037, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2314:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2314:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2314:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2290:42:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2041, + "nodeType": "ExpressionStatement", + "src": "2290:42:24" + } + ] + }, + "id": 2043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "2108:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2013, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2010, + "mutability": "mutable", + "name": "set", + "nameLocation": "2131:3:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2112:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2009, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2008, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2112:10:24" + }, + "referencedDeclaration": 2007, + "src": "2112:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2012, + "mutability": "mutable", + "name": "value", + "nameLocation": "2144:5:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2136:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2011, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2111:39:24" + }, + "returnParameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [], + "src": "2160:0:24" + }, + "scope": 2288, + "src": "2099:240:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2121, + "nodeType": "Block", + "src": "2409:647:24", + "statements": [ + { + "assignments": [ + 2052 + ], + "declarations": [ + { + "constant": false, + "id": 2052, + "mutability": "mutable", + "name": "position", + "nameLocation": "2424:8:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2419:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2419:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2057, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2053, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2435:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2435:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2056, + "indexExpression": { + "id": 2055, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "2450:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2435:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2419:37:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2058, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2470:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2482:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2470:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2065, + "nodeType": "IfStatement", + "src": "2466:66:24", + "trueBody": { + "id": 2064, + "nodeType": "Block", + "src": "2485:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2061, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "2506:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2063, + "nodeType": "RevertStatement", + "src": "2499:22:24" + } + ] + } + }, + { + "assignments": [ + 2067 + ], + "declarations": [ + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "index", + "nameLocation": "2547:5:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2542:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2066, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2542:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2071, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2068, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2555:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2566:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2555:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2542:25:24" + }, + { + "assignments": [ + 2073 + ], + "declarations": [ + { + "constant": false, + "id": 2073, + "mutability": "mutable", + "name": "lastIndex", + "nameLocation": "2582:9:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2577:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2072, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2577:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2079, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 2074, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2594:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2075, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2594:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2594:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2594:22:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2577:39:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2080, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2752:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2081, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2761:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2752:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2107, + "nodeType": "IfStatement", + "src": "2748:186:24", + "trueBody": { + "id": 2106, + "nodeType": "Block", + "src": "2772:162:24", + "statements": [ + { + "assignments": [ + 2084 + ], + "declarations": [ + { + "constant": false, + "id": 2084, + "mutability": "mutable", + "name": "lastValue", + "nameLocation": "2794:9:24", + "nodeType": "VariableDeclaration", + "scope": 2106, + "src": "2786:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2083, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2786:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 2089, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2085, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2806:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2806:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2088, + "indexExpression": { + "id": 2087, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2818:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2806:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2786:42:24" + }, + { + "expression": { + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2090, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2843:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2843:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2094, + "indexExpression": { + "id": 2092, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2855:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2843:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2095, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2864:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2843:30:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2097, + "nodeType": "ExpressionStatement", + "src": "2843:30:24" + }, + { + "expression": { + "id": 2104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2098, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2887:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2887:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2102, + "indexExpression": { + "id": 2100, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2902:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2887:25:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2103, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2915:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2887:36:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2105, + "nodeType": "ExpressionStatement", + "src": "2887:36:24" + } + ] + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 2108, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2994:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2994:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "src": "2994:15:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer)" + } + }, + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2994:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2114, + "nodeType": "ExpressionStatement", + "src": "2994:17:24" + }, + { + "expression": { + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "3021:28:24", + "subExpression": { + "baseExpression": { + "expression": { + "id": 2115, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "3028:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3028:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2118, + "indexExpression": { + "id": 2117, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "3043:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3028:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2120, + "nodeType": "ExpressionStatement", + "src": "3021:28:24" + } + ] + }, + "id": 2122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "2354:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "set", + "nameLocation": "2380:3:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2361:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2361:10:24" + }, + "referencedDeclaration": 2007, + "src": "2361:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2048, + "mutability": "mutable", + "name": "value", + "nameLocation": "2393:5:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2385:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2385:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2360:39:24" + }, + "returnParameters": { + "id": 2050, + "nodeType": "ParameterList", + "parameters": [], + "src": "2409:0:24" + }, + "scope": 2288, + "src": "2345:711:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2180, + "nodeType": "Block", + "src": "3175:348:24", + "statements": [ + { + "condition": { + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3189:21:24", + "subExpression": { + "arguments": [ + { + "id": 2133, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3199:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2134, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3204:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2132, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3190:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3190:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2141, + "nodeType": "IfStatement", + "src": "3185:74:24", + "trueBody": { + "id": 2140, + "nodeType": "Block", + "src": "3212:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2137, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "3233:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3233:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2139, + "nodeType": "RevertStatement", + "src": "3226:22:24" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 2143, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3282:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2144, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3287:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2142, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3273:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2150, + "nodeType": "IfStatement", + "src": "3269:80:24", + "trueBody": { + "id": 2149, + "nodeType": "Block", + "src": "3298:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2146, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "3319:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3319:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2148, + "nodeType": "RevertStatement", + "src": "3312:26:24" + } + ] + } + }, + { + "assignments": [ + 2152 + ], + "declarations": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "position", + "nameLocation": "3364:8:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3359:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2151, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3359:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2157, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2153, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3375:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3375:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2156, + "indexExpression": { + "id": 2155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3390:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3375:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3359:37:24" + }, + { + "assignments": [ + 2159 + ], + "declarations": [ + { + "constant": false, + "id": 2159, + "mutability": "mutable", + "name": "index", + "nameLocation": "3411:5:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3406:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2158, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3406:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2163, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2160, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3419:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3430:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3419:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3406:25:24" + }, + { + "expression": { + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2164, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3442:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3442:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2168, + "indexExpression": { + "id": 2166, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2159, + "src": "3454:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3442:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2169, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3463:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3442:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "3442:29:24" + }, + { + "expression": { + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2172, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3481:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3481:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2176, + "indexExpression": { + "id": 2174, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3496:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3481:24:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2177, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3508:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3481:35:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2179, + "nodeType": "ExpressionStatement", + "src": "3481:35:24" + } + ] + }, + "id": 2181, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "3071:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2125, + "mutability": "mutable", + "name": "set", + "nameLocation": "3107:3:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3088:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2124, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2123, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3088:10:24" + }, + "referencedDeclaration": 2007, + "src": "3088:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2127, + "mutability": "mutable", + "name": "value", + "nameLocation": "3128:5:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3120:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3120:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2129, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "3151:8:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3143:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3143:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3078:87:24" + }, + "returnParameters": { + "id": 2131, + "nodeType": "ParameterList", + "parameters": [], + "src": "3175:0:24" + }, + "scope": 2288, + "src": "3062:461:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2198, + "nodeType": "Block", + "src": "3615:50:24", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 2191, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "3632:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3632:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2194, + "indexExpression": { + "id": 2193, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2186, + "src": "3647:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3632:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3657:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3632:26:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2190, + "id": 2197, + "nodeType": "Return", + "src": "3625:33:24" + } + ] + }, + "id": 2199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "3538:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2184, + "mutability": "mutable", + "name": "set", + "nameLocation": "3566:3:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3547:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2183, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2182, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3547:10:24" + }, + "referencedDeclaration": 2007, + "src": "3547:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2186, + "mutability": "mutable", + "name": "value", + "nameLocation": "3579:5:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3571:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2185, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3571:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3546:39:24" + }, + "returnParameters": { + "id": 2190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3609:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2188, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3609:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3608:6:24" + }, + "scope": 2288, + "src": "3529:136:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2211, + "nodeType": "Block", + "src": "3740:42:24", + "statements": [ + { + "expression": { + "expression": { + "expression": { + "id": 2207, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "3757:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3757:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3757:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2206, + "id": 2210, + "nodeType": "Return", + "src": "3750:25:24" + } + ] + }, + "id": 2212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "3680:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2202, + "mutability": "mutable", + "name": "set", + "nameLocation": "3706:3:24", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3687:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2201, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2200, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3687:10:24" + }, + "referencedDeclaration": 2007, + "src": "3687:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "3686:24:24" + }, + "returnParameters": { + "id": 2206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2205, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3734:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3734:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3733:6:24" + }, + "scope": 2288, + "src": "3671:111:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2247, + "nodeType": "Block", + "src": "3876:193:24", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2222, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3890:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3902:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3890:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2225, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3907:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "expression": { + "id": 2226, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "3918:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3918:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3918:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3907:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3890:46:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2235, + "nodeType": "IfStatement", + "src": "3886:105:24", + "trueBody": { + "id": 2234, + "nodeType": "Block", + "src": "3938:53:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2231, + "name": "PositionOutOfBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "3959:19:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3959:21:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2233, + "nodeType": "RevertStatement", + "src": "3952:28:24" + } + ] + } + }, + { + "assignments": [ + 2237 + ], + "declarations": [ + { + "constant": false, + "id": 2237, + "mutability": "mutable", + "name": "index", + "nameLocation": "4006:5:24", + "nodeType": "VariableDeclaration", + "scope": 2247, + "src": "4001:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2236, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4001:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2241, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2238, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "4014:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4014:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4001:25:24" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2242, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "4044:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4044:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2245, + "indexExpression": { + "id": 2244, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2237, + "src": "4056:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4044:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2221, + "id": 2246, + "nodeType": "Return", + "src": "4037:25:24" + } + ] + }, + "id": 2248, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "3797:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2215, + "mutability": "mutable", + "name": "set", + "nameLocation": "3824:3:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3805:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2214, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2213, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3805:10:24" + }, + "referencedDeclaration": 2007, + "src": "3805:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2217, + "mutability": "mutable", + "name": "position", + "nameLocation": "3834:8:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3829:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3829:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3804:39:24" + }, + "returnParameters": { + "id": 2221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2220, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3867:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2219, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3867:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3866:9:24" + }, + "scope": 2288, + "src": "3788:281:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2273, + "nodeType": "Block", + "src": "4163:129:24", + "statements": [ + { + "condition": { + "id": 2262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4177:21:24", + "subExpression": { + "arguments": [ + { + "id": 2259, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4187:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2260, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4192:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2258, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "4178:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4178:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2267, + "nodeType": "IfStatement", + "src": "4173:74:24", + "trueBody": { + "id": 2266, + "nodeType": "Block", + "src": "4200:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2263, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "4221:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4221:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2265, + "nodeType": "RevertStatement", + "src": "4214:22:24" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2268, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4264:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "4264:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2271, + "indexExpression": { + "id": 2270, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4279:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4264:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2257, + "id": 2272, + "nodeType": "Return", + "src": "4257:28:24" + } + ] + }, + "id": 2274, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "4084:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2251, + "mutability": "mutable", + "name": "set", + "nameLocation": "4114:3:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4095:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2250, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2249, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4095:10:24" + }, + "referencedDeclaration": 2007, + "src": "4095:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2253, + "mutability": "mutable", + "name": "value", + "nameLocation": "4127:5:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4119:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2252, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4119:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4094:39:24" + }, + "returnParameters": { + "id": 2257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4157:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4157:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4156:6:24" + }, + "scope": 2288, + "src": "4075:217:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2286, + "nodeType": "Block", + "src": "4379:35:24", + "statements": [ + { + "expression": { + "expression": { + "id": 2283, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4396:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4396:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "functionReturnParameters": 2282, + "id": 2285, + "nodeType": "Return", + "src": "4389:18:24" + } + ] + }, + "id": 2287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "4307:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "set", + "nameLocation": "4333:3:24", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4314:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2276, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2275, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4314:10:24" + }, + "referencedDeclaration": 2007, + "src": "4314:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "4313:24:24" + }, + "returnParameters": { + "id": 2282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2281, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4361:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2279, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4361:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2280, + "nodeType": "ArrayTypeName", + "src": "4361:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4360:18:24" + }, + "scope": 2288, + "src": "4298:116:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2289, + "src": "56:4360:24", + "usedErrors": [ + 1995, + 1997, + 1999 + ] + } + ], + "src": "31:4386:24" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/MerkleProof.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"../../storage/DebtShareStorage.sol\";\n\n/// @dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number\ncontract CrossChainDebtShareManager is ElectionBase, DebtShareStorage {\n error MerkleRootNotSet();\n error InvalidMerkleProof();\n error CrossChainDebtShareAlreadyDeclared();\n\n event CrossChainDebtShareMerkleRootSet(bytes32 merkleRoot, uint blocknumber, uint epoch);\n event CrossChainDebtShareDeclared(address user, uint debtShare);\n\n function _setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n debtShareData.merkleRoot = merkleRoot;\n debtShareData.merkleRootBlockNumber = blocknumber;\n }\n\n function _declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.debtShares[user] != 0) {\n revert CrossChainDebtShareAlreadyDeclared();\n }\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n bytes32 leaf = keccak256(abi.encodePacked(user, debtShare));\n\n if (!MerkleProof.verify(merkleProof, debtShareData.merkleRoot, leaf)) {\n revert InvalidMerkleProof();\n }\n\n debtShareData.debtShares[user] = debtShare;\n }\n\n function _getCrossChainDebtShareMerkleRoot() internal view returns (bytes32) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRoot;\n }\n\n function _getCrossChainDebtShareMerkleRootBlockNumber() internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRootBlockNumber;\n }\n\n function _getDeclaredCrossChainDebtShare(address user) internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n return debtShareData.debtShares[user];\n }\n\n function _setCrossDomainMessenger(address newCrossDomainMessengerAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newCrossDomainMessengerAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newCrossDomainMessengerAddress == address(store.crossDomainMessenger)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newCrossDomainMessengerAddress)) {\n revert AddressError.NotAContract(newCrossDomainMessengerAddress);\n }\n\n store.crossDomainMessenger = ICrossDomainMessenger(newCrossDomainMessengerAddress);\n }\n\n function _getCrossDomainMessenger() internal view returns (address) {\n return address(_debtShareStore().crossDomainMessenger);\n }\n\n function _validateCrossChainMessage(address user) internal view {\n ICrossDomainMessenger messenger = ICrossDomainMessenger(_debtShareStore().crossDomainMessenger);\n\n if (address(messenger) == address(0)) {\n revert CrossDomainMessengerNotSet();\n }\n\n if (msg.sender != address(messenger)) {\n revert OnlyCrossDomainMessengerCanInvoke();\n }\n\n if (messenger.xDomainMessageSender() != user) {\n revert OnlyCrossDomainUserCanInvoke();\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 6950 + ], + "DebtShareStorage": [ + 6611 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6951, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6613, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:44" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "id": 6614, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 1783, + "src": "56:69:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6615, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 4684, + "src": "126:82:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6616, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 1697, + "src": "209:69:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6617, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 26, + "src": "279:70:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6618, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 16, + "src": "350:71:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6619, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6951, + "sourceUnit": 6612, + "src": "422:44:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6621, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "619:12:44" + }, + "id": 6622, + "nodeType": "InheritanceSpecifier", + "src": "619:12:44" + }, + { + "baseName": { + "id": 6623, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6611, + "src": "633:16:44" + }, + "id": 6624, + "nodeType": "InheritanceSpecifier", + "src": "633:16:44" + } + ], + "canonicalName": "CrossChainDebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6620, + "nodeType": "StructuredDocumentation", + "src": "468:112:44", + "text": "@dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number" + }, + "fullyImplemented": true, + "id": 6950, + "linearizedBaseContracts": [ + 6950, + 6611, + 4683, + 4331 + ], + "name": "CrossChainDebtShareManager", + "nameLocation": "589:26:44", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6626, + "name": "MerkleRootNotSet", + "nameLocation": "662:16:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6625, + "nodeType": "ParameterList", + "parameters": [], + "src": "678:2:44" + }, + "src": "656:25:44" + }, + { + "id": 6628, + "name": "InvalidMerkleProof", + "nameLocation": "692:18:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6627, + "nodeType": "ParameterList", + "parameters": [], + "src": "710:2:44" + }, + "src": "686:27:44" + }, + { + "id": 6630, + "name": "CrossChainDebtShareAlreadyDeclared", + "nameLocation": "724:34:44", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6629, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:44" + }, + "src": "718:43:44" + }, + { + "anonymous": false, + "id": 6638, + "name": "CrossChainDebtShareMerkleRootSet", + "nameLocation": "773:32:44", + "nodeType": "EventDefinition", + "parameters": { + "id": 6637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6632, + "indexed": false, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "814:10:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "806:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6631, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "806:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6634, + "indexed": false, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "831:11:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "826:16:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6633, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "826:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6636, + "indexed": false, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "849:5:44", + "nodeType": "VariableDeclaration", + "scope": 6638, + "src": "844:10:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6635, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "844:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "805:50:44" + }, + "src": "767:89:44" + }, + { + "anonymous": false, + "id": 6644, + "name": "CrossChainDebtShareDeclared", + "nameLocation": "867:27:44", + "nodeType": "EventDefinition", + "parameters": { + "id": 6643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6640, + "indexed": false, + "mutability": "mutable", + "name": "user", + "nameLocation": "903:4:44", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "895:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6639, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "895:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6642, + "indexed": false, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "914:9:44", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "909:14:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "909:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "894:30:44" + }, + "src": "861:64:44" + }, + { + "body": { + "id": 6673, + "nodeType": "Block", + "src": "1021:238:44", + "statements": [ + { + "assignments": [ + 6653 + ], + "declarations": [ + { + "constant": false, + "id": 6653, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1063:13:44", + "nodeType": "VariableDeclaration", + "scope": 6673, + "src": "1031:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6652, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6651, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "1031:23:44" + }, + "referencedDeclaration": 6602, + "src": "1031:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6660, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6654, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1079:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6656, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "1079:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6659, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6657, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1121:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1121:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1079:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1031:114:44" + }, + { + "expression": { + "id": 6665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6661, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6653, + "src": "1156:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6663, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1156:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6664, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6646, + "src": "1183:10:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1156:37:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6666, + "nodeType": "ExpressionStatement", + "src": "1156:37:44" + }, + { + "expression": { + "id": 6671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6667, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6653, + "src": "1203:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6669, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6597, + "src": "1203:35:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6670, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6648, + "src": "1241:11:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1203:49:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6672, + "nodeType": "ExpressionStatement", + "src": "1203:49:44" + } + ] + }, + "id": 6674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossChainDebtShareMerkleRoot", + "nameLocation": "940:33:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6649, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6646, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "982:10:44", + "nodeType": "VariableDeclaration", + "scope": 6674, + "src": "974:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6645, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "974:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6648, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "999:11:44", + "nodeType": "VariableDeclaration", + "scope": 6674, + "src": "994:16:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6647, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "994:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "973:38:44" + }, + "returnParameters": { + "id": 6650, + "nodeType": "ParameterList", + "parameters": [], + "src": "1021:0:44" + }, + "scope": 6950, + "src": "931:328:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6745, + "nodeType": "Block", + "src": "1406:600:44", + "statements": [ + { + "assignments": [ + 6686 + ], + "declarations": [ + { + "constant": false, + "id": 6686, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1448:13:44", + "nodeType": "VariableDeclaration", + "scope": 6745, + "src": "1416:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6685, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6684, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "1416:23:44" + }, + "referencedDeclaration": 6602, + "src": "1416:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6693, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6687, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1464:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1464:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6689, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "1464:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6692, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6690, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1506:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1506:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1464:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1416:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 6694, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1545:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6695, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "1545:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6697, + "indexExpression": { + "id": 6696, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1570:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1545:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1579:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1545:35:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6704, + "nodeType": "IfStatement", + "src": "1541:109:44", + "trueBody": { + "id": 6703, + "nodeType": "Block", + "src": "1582:68:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6700, + "name": "CrossChainDebtShareAlreadyDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6630, + "src": "1603:34:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:36:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6702, + "nodeType": "RevertStatement", + "src": "1596:43:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6705, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1664:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6706, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1664:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1692:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1664:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6713, + "nodeType": "IfStatement", + "src": "1660:85:44", + "trueBody": { + "id": 6712, + "nodeType": "Block", + "src": "1695:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6709, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "1716:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1716:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6711, + "nodeType": "RevertStatement", + "src": "1709:25:44" + } + ] + } + }, + { + "assignments": [ + 6715 + ], + "declarations": [ + { + "constant": false, + "id": 6715, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "1763:4:44", + "nodeType": "VariableDeclaration", + "scope": 6745, + "src": "1755:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1755:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6723, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 6719, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1797:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6720, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "1803:9:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6717, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1780:3:44", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1780:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:33:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6716, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1770:9:44", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1770:44:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1755:59:44" + }, + { + "condition": { + "id": 6731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1829:64:44", + "subExpression": { + "arguments": [ + { + "id": 6726, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6681, + "src": "1849:11:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "expression": { + "id": 6727, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1862:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "1862:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6729, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6715, + "src": "1888:4:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6724, + "name": "MerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1782, + "src": "1830:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MerkleProof_$1782_$", + "typeString": "type(library MerkleProof)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verify", + "nodeType": "MemberAccess", + "referencedDeclaration": 1770, + "src": "1830:18:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32[] memory,bytes32,bytes32) pure returns (bool)" + } + }, + "id": 6730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1830:63:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6736, + "nodeType": "IfStatement", + "src": "1825:122:44", + "trueBody": { + "id": 6735, + "nodeType": "Block", + "src": "1895:52:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6732, + "name": "InvalidMerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6628, + "src": "1916:18:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1916:20:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6734, + "nodeType": "RevertStatement", + "src": "1909:27:44" + } + ] + } + }, + { + "expression": { + "id": 6743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6737, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6686, + "src": "1957:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "1957:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6741, + "indexExpression": { + "id": 6739, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6676, + "src": "1982:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1957:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6742, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6678, + "src": "1990:9:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1957:42:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6744, + "nodeType": "ExpressionStatement", + "src": "1957:42:44" + } + ] + }, + "id": 6746, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_declareCrossChainDebtShare", + "nameLocation": "1274:27:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6676, + "mutability": "mutable", + "name": "user", + "nameLocation": "1319:4:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1311:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6675, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1311:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6678, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "1341:9:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1333:17:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1333:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6681, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "1379:11:44", + "nodeType": "VariableDeclaration", + "scope": 6746, + "src": "1360:30:44", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6679, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1360:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6680, + "nodeType": "ArrayTypeName", + "src": "1360:9:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "1301:95:44" + }, + "returnParameters": { + "id": 6683, + "nodeType": "ParameterList", + "parameters": [], + "src": "1406:0:44" + }, + "scope": 6950, + "src": "1265:741:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6773, + "nodeType": "Block", + "src": "2089:268:44", + "statements": [ + { + "assignments": [ + 6753 + ], + "declarations": [ + { + "constant": false, + "id": 6753, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2131:13:44", + "nodeType": "VariableDeclaration", + "scope": 6773, + "src": "2099:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6751, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2099:23:44" + }, + "referencedDeclaration": 6602, + "src": "2099:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6760, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6754, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2147:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2147:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2147:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6759, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6757, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2189:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2147:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2099:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6761, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6753, + "src": "2228:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6762, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2228:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2256:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2228:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6769, + "nodeType": "IfStatement", + "src": "2224:85:44", + "trueBody": { + "id": 6768, + "nodeType": "Block", + "src": "2259:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6765, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "2280:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2280:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6767, + "nodeType": "RevertStatement", + "src": "2273:25:44" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6770, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6753, + "src": "2326:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6771, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2326:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6750, + "id": 6772, + "nodeType": "Return", + "src": "2319:31:44" + } + ] + }, + "id": 6774, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRoot", + "nameLocation": "2021:33:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6747, + "nodeType": "ParameterList", + "parameters": [], + "src": "2054:2:44" + }, + "returnParameters": { + "id": 6750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6749, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6774, + "src": "2080:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6748, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2080:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2079:9:44" + }, + "scope": 6950, + "src": "2012:345:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6801, + "nodeType": "Block", + "src": "2448:279:44", + "statements": [ + { + "assignments": [ + 6781 + ], + "declarations": [ + { + "constant": false, + "id": 6781, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2490:13:44", + "nodeType": "VariableDeclaration", + "scope": 6801, + "src": "2458:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6780, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6779, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2458:23:44" + }, + "referencedDeclaration": 6602, + "src": "2458:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6788, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6782, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2506:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6784, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2506:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6787, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6785, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2548:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2548:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2506:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2458:114:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6789, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6781, + "src": "2587:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6790, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6595, + "src": "2587:24:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2587:29:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6797, + "nodeType": "IfStatement", + "src": "2583:85:44", + "trueBody": { + "id": 6796, + "nodeType": "Block", + "src": "2618:50:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6793, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6626, + "src": "2639:16:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6794, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2639:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6795, + "nodeType": "RevertStatement", + "src": "2632:25:44" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6798, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6781, + "src": "2685:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6597, + "src": "2685:35:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6778, + "id": 6800, + "nodeType": "Return", + "src": "2678:42:44" + } + ] + }, + "id": 6802, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2372:44:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6775, + "nodeType": "ParameterList", + "parameters": [], + "src": "2416:2:44" + }, + "returnParameters": { + "id": 6778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6777, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6802, + "src": "2442:4:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2442:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2441:6:44" + }, + "scope": 6950, + "src": "2363:364:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6824, + "nodeType": "Block", + "src": "2817:179:44", + "statements": [ + { + "assignments": [ + 6811 + ], + "declarations": [ + { + "constant": false, + "id": 6811, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2859:13:44", + "nodeType": "VariableDeclaration", + "scope": 6824, + "src": "2827:45:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6810, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6809, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "2827:23:44" + }, + "referencedDeclaration": 6602, + "src": "2827:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6818, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6812, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2875:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2875:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6589, + "src": "2875:41:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6817, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6815, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2917:21:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:23:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2875:66:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2827:114:44" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6819, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6811, + "src": "2959:13:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6820, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6601, + "src": "2959:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6822, + "indexExpression": { + "id": 6821, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6804, + "src": "2984:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2959:30:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6808, + "id": 6823, + "nodeType": "Return", + "src": "2952:37:44" + } + ] + }, + "id": 6825, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDeclaredCrossChainDebtShare", + "nameLocation": "2742:31:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6805, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6804, + "mutability": "mutable", + "name": "user", + "nameLocation": "2782:4:44", + "nodeType": "VariableDeclaration", + "scope": 6825, + "src": "2774:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6803, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2774:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2773:14:44" + }, + "returnParameters": { + "id": 6808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6807, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6825, + "src": "2811:4:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6806, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2811:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2810:6:44" + }, + "scope": 6950, + "src": "2733:263:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6884, + "nodeType": "Block", + "src": "3085:575:44", + "statements": [ + { + "assignments": [ + 6832 + ], + "declarations": [ + { + "constant": false, + "id": 6832, + "mutability": "mutable", + "name": "store", + "nameLocation": "3118:5:44", + "nodeType": "VariableDeclaration", + "scope": 6884, + "src": "3095:28:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6831, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6830, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "3095:14:44" + }, + "referencedDeclaration": 6593, + "src": "3095:14:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6835, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6833, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3126:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3126:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3095:48:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6836, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3158:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6839, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3200:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3192:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6837, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3192:7:44", + "typeDescriptions": {} + } + }, + "id": 6840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3192:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3158:44:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6848, + "nodeType": "IfStatement", + "src": "3154:108:44", + "trueBody": { + "id": 6847, + "nodeType": "Block", + "src": "3204:58:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6842, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3225:12:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "3225:24:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3225:26:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6846, + "nodeType": "RevertStatement", + "src": "3218:33:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6849, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3276:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 6852, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6832, + "src": "3318:5:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3318:26:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6851, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3310:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3310:7:44", + "typeDescriptions": {} + } + }, + "id": 6854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3310:35:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3276:69:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6862, + "nodeType": "IfStatement", + "src": "3272:129:44", + "trueBody": { + "id": 6861, + "nodeType": "Block", + "src": "3347:54:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6856, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "3368:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 6858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "3368:20:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3368:22:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6860, + "nodeType": "RevertStatement", + "src": "3361:29:44" + } + ] + } + }, + { + "condition": { + "id": 6867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3415:55:44", + "subExpression": { + "arguments": [ + { + "id": 6865, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3439:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6863, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "3416:11:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 6864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "3416:22:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3416:54:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6875, + "nodeType": "IfStatement", + "src": "3411:150:44", + "trueBody": { + "id": 6874, + "nodeType": "Block", + "src": "3472:89:44", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 6871, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3519:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6868, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3493:12:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "3493:25:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 6872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3493:57:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6873, + "nodeType": "RevertStatement", + "src": "3486:64:44" + } + ] + } + }, + { + "expression": { + "id": 6882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6876, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6832, + "src": "3571:5:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6878, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3571:26:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6880, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6827, + "src": "3622:30:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6879, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3600:21:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3600:53:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "src": "3571:82:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6883, + "nodeType": "ExpressionStatement", + "src": "3571:82:44" + } + ] + }, + "id": 6885, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossDomainMessenger", + "nameLocation": "3011:24:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6828, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6827, + "mutability": "mutable", + "name": "newCrossDomainMessengerAddress", + "nameLocation": "3044:30:44", + "nodeType": "VariableDeclaration", + "scope": 6885, + "src": "3036:38:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6826, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3036:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3035:40:44" + }, + "returnParameters": { + "id": 6829, + "nodeType": "ParameterList", + "parameters": [], + "src": "3085:0:44" + }, + "scope": 6950, + "src": "3002:658:44", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6897, + "nodeType": "Block", + "src": "3734:71:44", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6892, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3759:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3759:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6894, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3759:38:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6891, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3751:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6890, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3751:7:44", + "typeDescriptions": {} + } + }, + "id": 6895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3751:47:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6889, + "id": 6896, + "nodeType": "Return", + "src": "3744:54:44" + } + ] + }, + "id": 6898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossDomainMessenger", + "nameLocation": "3675:24:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6886, + "nodeType": "ParameterList", + "parameters": [], + "src": "3699:2:44" + }, + "returnParameters": { + "id": 6889, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6888, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6898, + "src": "3725:7:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6887, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3725:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3724:9:44" + }, + "scope": 6950, + "src": "3666:139:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6948, + "nodeType": "Block", + "src": "3875:453:44", + "statements": [ + { + "assignments": [ + 6905 + ], + "declarations": [ + { + "constant": false, + "id": 6905, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3907:9:44", + "nodeType": "VariableDeclaration", + "scope": 6948, + "src": "3885:31:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6904, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6903, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "3885:21:44" + }, + "referencedDeclaration": 6416, + "src": "3885:21:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "id": 6911, + "initialValue": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6907, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "3941:15:44", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3941:17:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6592, + "src": "3941:38:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6906, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3919:21:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3919:61:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3885:95:44" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6914, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4003:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3995:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6912, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3995:7:44", + "typeDescriptions": {} + } + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3995:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:44", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6917, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4017:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6916, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4017:7:44", + "typeDescriptions": {} + } + }, + "id": 6919, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4017:10:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3995:32:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6925, + "nodeType": "IfStatement", + "src": "3991:98:44", + "trueBody": { + "id": 6924, + "nodeType": "Block", + "src": "4029:60:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6921, + "name": "CrossDomainMessengerNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4374, + "src": "4050:26:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4050:28:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6923, + "nodeType": "RevertStatement", + "src": "4043:35:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6926, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4103:3:44", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4103:10:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "id": 6930, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4125:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4117:7:44", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6928, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4117:7:44", + "typeDescriptions": {} + } + }, + "id": 6931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4117:18:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4103:32:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6937, + "nodeType": "IfStatement", + "src": "4099:105:44", + "trueBody": { + "id": 6936, + "nodeType": "Block", + "src": "4137:67:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6933, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4376, + "src": "4158:33:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4158:35:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6935, + "nodeType": "RevertStatement", + "src": "4151:42:44" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6938, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6905, + "src": "4218:9:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xDomainMessageSender", + "nodeType": "MemberAccess", + "referencedDeclaration": 6406, + "src": "4218:30:44", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4218:32:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 6941, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6900, + "src": "4254:4:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4218:40:44", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6947, + "nodeType": "IfStatement", + "src": "4214:108:44", + "trueBody": { + "id": 6946, + "nodeType": "Block", + "src": "4260:62:44", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6943, + "name": "OnlyCrossDomainUserCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4378, + "src": "4281:28:44", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4281:30:44", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6945, + "nodeType": "RevertStatement", + "src": "4274:37:44" + } + ] + } + } + ] + }, + "id": 6949, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCrossChainMessage", + "nameLocation": "3820:26:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6900, + "mutability": "mutable", + "name": "user", + "nameLocation": "3855:4:44", + "nodeType": "VariableDeclaration", + "scope": 6949, + "src": "3847:12:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6899, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:44", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3846:14:44" + }, + "returnParameters": { + "id": 6902, + "nodeType": "ParameterList", + "parameters": [], + "src": "3875:0:44" + }, + "scope": 6950, + "src": "3811:517:44", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6951, + "src": "580:3750:44", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6626, + 6628, + 6630 + ] + } + ], + "src": "31:4300:44" + } + }, + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Based on OpenZeppelin https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol\nlibrary MerkleProof {\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n bytes32 computedHash = leaf;\n\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n\n // Check if the computed hash (root) is equal to the provided root\n return computedHash == root;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "exportedSymbols": { + "MerkleProof": [ + 1782 + ] + }, + "id": 1783, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1710, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:23" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MerkleProof", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1782, + "linearizedBaseContracts": [ + 1782 + ], + "name": "MerkleProof", + "nameLocation": "201:11:23", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1769, + "nodeType": "Block", + "src": "346:656:23", + "statements": [ + { + "assignments": [ + 1723 + ], + "declarations": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "computedHash", + "nameLocation": "364:12:23", + "nodeType": "VariableDeclaration", + "scope": 1769, + "src": "356:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1722, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "356:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1725, + "initialValue": { + "id": 1724, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1717, + "src": "379:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "356:27:23" + }, + { + "body": { + "id": 1763, + "nodeType": "Block", + "src": "437:446:23", + "statements": [ + { + "assignments": [ + 1738 + ], + "declarations": [ + { + "constant": false, + "id": 1738, + "mutability": "mutable", + "name": "proofElement", + "nameLocation": "459:12:23", + "nodeType": "VariableDeclaration", + "scope": 1763, + "src": "451:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1737, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "451:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1742, + "initialValue": { + "baseExpression": { + "id": 1739, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "474:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1741, + "indexExpression": { + "id": 1740, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "480:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "474:8:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "451:31:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1743, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "501:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 1744, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "517:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "501:28:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1761, + "nodeType": "Block", + "src": "705:168:23", + "statements": [ + { + "expression": { + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1754, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "801:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1756, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "831:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1757, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "845:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1755, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "816:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "816:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "801:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1760, + "nodeType": "ExpressionStatement", + "src": "801:57:23" + } + ] + }, + "id": 1762, + "nodeType": "IfStatement", + "src": "497:376:23", + "trueBody": { + "id": 1753, + "nodeType": "Block", + "src": "531:168:23", + "statements": [ + { + "expression": { + "id": 1751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1746, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "627:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1748, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "657:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1749, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "671:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1747, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "642:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "627:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1752, + "nodeType": "ExpressionStatement", + "src": "627:57:23" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1730, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "414:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1731, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "418:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "418:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "414:16:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1764, + "initializationExpression": { + "assignments": [ + 1727 + ], + "declarations": [ + { + "constant": false, + "id": 1727, + "mutability": "mutable", + "name": "i", + "nameLocation": "407:1:23", + "nodeType": "VariableDeclaration", + "scope": 1764, + "src": "399:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1729, + "initialValue": { + "hexValue": "30", + "id": 1728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "411:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "399:13:23" + }, + "loopExpression": { + "expression": { + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "432:3:23", + "subExpression": { + "id": 1734, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "432:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1736, + "nodeType": "ExpressionStatement", + "src": "432:3:23" + }, + "nodeType": "ForStatement", + "src": "394:489:23" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1765, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "975:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1766, + "name": "root", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1715, + "src": "991:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "975:20:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1721, + "id": 1768, + "nodeType": "Return", + "src": "968:27:23" + } + ] + }, + "id": 1770, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verify", + "nameLocation": "228:6:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1718, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1713, + "mutability": "mutable", + "name": "proof", + "nameLocation": "261:5:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "244:22:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1711, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "244:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1712, + "nodeType": "ArrayTypeName", + "src": "244:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1715, + "mutability": "mutable", + "name": "root", + "nameLocation": "284:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "276:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "276:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1717, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "306:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "298:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1716, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "298:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "234:82:23" + }, + "returnParameters": { + "id": 1721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1720, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "340:4:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1719, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "340:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "339:6:23" + }, + "scope": 1782, + "src": "219:783:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1780, + "nodeType": "Block", + "src": "1091:135:23", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1110:110:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1131:4:23", + "type": "", + "value": "0x00" + }, + { + "name": "a", + "nodeType": "YulIdentifier", + "src": "1137:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1124:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1124:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1124:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1159:4:23", + "type": "", + "value": "0x20" + }, + { + "name": "b", + "nodeType": "YulIdentifier", + "src": "1165:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1152:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1152:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1152:15:23" + }, + { + "nodeType": "YulAssignment", + "src": "1180:30:23", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1199:4:23", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1205:4:23", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "keccak256", + "nodeType": "YulIdentifier", + "src": "1189:9:23" + }, + "nodeType": "YulFunctionCall", + "src": "1189:21:23" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1180:5:23" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1772, + "isOffset": false, + "isSlot": false, + "src": "1137:1:23", + "valueSize": 1 + }, + { + "declaration": 1774, + "isOffset": false, + "isSlot": false, + "src": "1165:1:23", + "valueSize": 1 + }, + { + "declaration": 1777, + "isOffset": false, + "isSlot": false, + "src": "1180:5:23", + "valueSize": 1 + } + ], + "id": 1779, + "nodeType": "InlineAssembly", + "src": "1101:119:23" + } + ] + }, + "id": 1781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_efficientHash", + "nameLocation": "1017:14:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1772, + "mutability": "mutable", + "name": "a", + "nameLocation": "1040:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1032:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1032:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1774, + "mutability": "mutable", + "name": "b", + "nameLocation": "1051:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1043:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1773, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1043:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1031:22:23" + }, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "value", + "nameLocation": "1084:5:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1076:13:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1776, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1076:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1075:15:23" + }, + "scope": 1782, + "src": "1008:218:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1783, + "src": "193:1035:23", + "usedErrors": [] + } + ], + "src": "31:1198:23" + } + }, + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressUtil {\n function isContract(address account) internal view returns (bool) {\n uint256 size;\n\n assembly {\n size := extcodesize(account)\n }\n\n return size > 0;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "exportedSymbols": { + "AddressUtil": [ + 1696 + ] + }, + "id": 1697, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1679, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:21" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1696, + "linearizedBaseContracts": [ + 1696 + ], + "name": "AddressUtil", + "nameLocation": "64:11:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1694, + "nodeType": "Block", + "src": "148:126:21", + "statements": [ + { + "assignments": [ + 1687 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "size", + "nameLocation": "166:4:21", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "158:12:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "158:7:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1688, + "nodeType": "VariableDeclarationStatement", + "src": "158:12:21" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "190:52:21", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "204:28:21", + "value": { + "arguments": [ + { + "name": "account", + "nodeType": "YulIdentifier", + "src": "224:7:21" + } + ], + "functionName": { + "name": "extcodesize", + "nodeType": "YulIdentifier", + "src": "212:11:21" + }, + "nodeType": "YulFunctionCall", + "src": "212:20:21" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "204:4:21" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1681, + "isOffset": false, + "isSlot": false, + "src": "224:7:21", + "valueSize": 1 + }, + { + "declaration": 1687, + "isOffset": false, + "isSlot": false, + "src": "204:4:21", + "valueSize": 1 + } + ], + "id": 1689, + "nodeType": "InlineAssembly", + "src": "181:61:21" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1690, + "name": "size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "259:4:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "266:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "259:8:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1685, + "id": 1693, + "nodeType": "Return", + "src": "252:15:21" + } + ] + }, + "id": 1695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isContract", + "nameLocation": "91:10:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1681, + "mutability": "mutable", + "name": "account", + "nameLocation": "110:7:21", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "102:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "101:17:21" + }, + "returnParameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "142:4:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "142:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "141:6:21" + }, + "scope": 1696, + "src": "82:192:21", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1697, + "src": "56:220:21", + "usedErrors": [] + } + ], + "src": "31:246:21" + } + }, + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ChangeError {\n error NoChange();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "exportedSymbols": { + "ChangeError": [ + 25 + ] + }, + "id": 26, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:3" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ChangeError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 25, + "linearizedBaseContracts": [ + 25 + ], + "name": "ChangeError", + "nameLocation": "64:11:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 24, + "name": "NoChange", + "nameLocation": "88:8:3", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [], + "src": "96:2:3" + }, + "src": "82:17:3" + } + ], + "scope": 26, + "src": "56:45:3", + "usedErrors": [ + 24 + ] + } + ], + "src": "31:71:3" + } + }, + "@synthetixio/core-contracts/contracts/errors/AddressError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressError {\n error ZeroAddress();\n error NotAContract(address contr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ] + }, + "id": 16, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:1" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 15, + "linearizedBaseContracts": [ + 15 + ], + "name": "AddressError", + "nameLocation": "64:12:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 10, + "name": "ZeroAddress", + "nameLocation": "89:11:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "100:2:1" + }, + "src": "83:20:1" + }, + { + "id": 14, + "name": "NotAContract", + "nameLocation": "114:12:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12, + "mutability": "mutable", + "name": "contr", + "nameLocation": "135:5:1", + "nodeType": "VariableDeclaration", + "scope": 14, + "src": "127:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "127:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "126:15:1" + }, + "src": "108:34:1" + } + ], + "scope": 16, + "src": "56:88:1", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:114:1" + } + }, + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IDebtShare.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\nimport \"../interfaces/ICrossDomainMessenger.sol\";\n\ncontract DebtShareStorage {\n struct DebtShareStore {\n // Synthetix c2 DebtShare contract used to determine vote power in the local chain\n IDebtShare debtShareContract;\n // Array of debt share snapshot id's for each epoch\n uint128[] debtShareIds;\n // Array of CrossChainDebtShareData's for each epoch\n CrossChainDebtShareData[] crossChainDebtShareData;\n // Stores the address of the Optimism cross domain messenger on L2\n ICrossDomainMessenger crossDomainMessenger;\n }\n\n struct CrossChainDebtShareData {\n // Synthetix v2 cross chain debt share merkle root\n bytes32 merkleRoot;\n // Cross chain debt share merkle root snapshot blocknumber\n uint merkleRootBlockNumber;\n // Cross chain debt shares declared on this chain\n mapping(address => uint) debtShares;\n }\n\n function _debtShareStore() internal pure returns (DebtShareStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.debtshare\")) - 1)\n store.slot := 0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "exportedSymbols": { + "DebtShareStorage": [ + 6611 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6612, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6576, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:43" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "file": "../interfaces/IDebtShare.sol", + "id": 6577, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 6429, + "src": "56:38:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 6578, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 2289, + "src": "95:65:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "file": "../interfaces/ICrossDomainMessenger.sol", + "id": 6579, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6612, + "sourceUnit": 6417, + "src": "161:49:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "DebtShareStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6611, + "linearizedBaseContracts": [ + 6611 + ], + "name": "DebtShareStorage", + "nameLocation": "221:16:43", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "DebtShareStorage.DebtShareStore", + "id": 6593, + "members": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "378:17:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "367:28:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + }, + "typeName": { + "id": 6581, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6580, + "name": "IDebtShare", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6428, + "src": "367:10:43" + }, + "referencedDeclaration": 6428, + "src": "367:10:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6585, + "mutability": "mutable", + "name": "debtShareIds", + "nameLocation": "475:12:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "465:22:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + }, + "typeName": { + "baseType": { + "id": 6583, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "465:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6584, + "nodeType": "ArrayTypeName", + "src": "465:9:43", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6589, + "mutability": "mutable", + "name": "crossChainDebtShareData", + "nameLocation": "584:23:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "558:49:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + }, + "typeName": { + "baseType": { + "id": 6587, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6586, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6602, + "src": "558:23:43" + }, + "referencedDeclaration": 6602, + "src": "558:23:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6602_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "id": 6588, + "nodeType": "ArrayTypeName", + "src": "558:25:43", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6602_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6592, + "mutability": "mutable", + "name": "crossDomainMessenger", + "nameLocation": "714:20:43", + "nodeType": "VariableDeclaration", + "scope": 6593, + "src": "692:42:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6591, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6590, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "692:21:43" + }, + "referencedDeclaration": 6416, + "src": "692:21:43", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "name": "DebtShareStore", + "nameLocation": "251:14:43", + "nodeType": "StructDefinition", + "scope": 6611, + "src": "244:497:43", + "visibility": "public" + }, + { + "canonicalName": "DebtShareStorage.CrossChainDebtShareData", + "id": 6602, + "members": [ + { + "constant": false, + "id": 6595, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "855:10:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "847:18:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6594, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "847:7:43", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6597, + "mutability": "mutable", + "name": "merkleRootBlockNumber", + "nameLocation": "947:21:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "942:26:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6596, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "942:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6601, + "mutability": "mutable", + "name": "debtShares", + "nameLocation": "1061:10:43", + "nodeType": "VariableDeclaration", + "scope": 6602, + "src": "1036:35:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6600, + "keyType": { + "id": 6598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1044:7:43", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1036:24:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6599, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1055:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "CrossChainDebtShareData", + "nameLocation": "754:23:43", + "nodeType": "StructDefinition", + "scope": 6611, + "src": "747:331:43", + "visibility": "public" + }, + { + "body": { + "id": 6609, + "nodeType": "Block", + "src": "1164:199:43", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1183:174:43", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1267:80:43", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1281:66:43", + "type": "", + "value": "0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "1267:10:43" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 6606, + "isOffset": false, + "isSlot": true, + "src": "1267:10:43", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 6608, + "nodeType": "InlineAssembly", + "src": "1174:183:43" + } + ] + }, + "id": 6610, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_debtShareStore", + "nameLocation": "1093:15:43", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6603, + "nodeType": "ParameterList", + "parameters": [], + "src": "1108:2:43" + }, + "returnParameters": { + "id": 6607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6606, + "mutability": "mutable", + "name": "store", + "nameLocation": "1157:5:43", + "nodeType": "VariableDeclaration", + "scope": 6610, + "src": "1134:28:43", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6605, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6604, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1134:14:43" + }, + "referencedDeclaration": 6593, + "src": "1134:14:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "src": "1133:30:43" + }, + "scope": 6611, + "src": "1084:279:43", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6612, + "src": "212:1153:43", + "usedErrors": [] + } + ], + "src": "31:1335:43" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IDebtShare {\n function balanceOfOnPeriod(address account, uint periodId) external view returns (uint);\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "exportedSymbols": { + "IDebtShare": [ + 6428 + ] + }, + "id": 6429, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6418, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:41" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IDebtShare", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6428, + "linearizedBaseContracts": [ + 6428 + ], + "name": "IDebtShare", + "nameLocation": "66:10:41", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "8a25acf4", + "id": 6427, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOfOnPeriod", + "nameLocation": "92:17:41", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6420, + "mutability": "mutable", + "name": "account", + "nameLocation": "118:7:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "110:15:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "110:7:41", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6422, + "mutability": "mutable", + "name": "periodId", + "nameLocation": "132:8:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "127:13:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6421, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "127:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "109:32:41" + }, + "returnParameters": { + "id": 6426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6425, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "165:4:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6424, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "165:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "164:6:41" + }, + "scope": 6428, + "src": "83:88:41", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6429, + "src": "56:117:41", + "usedErrors": [] + } + ], + "src": "31:143:41" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol": { + "sourceCode": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface ICrossDomainMessenger {\n event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit);\n event RelayedMessage(bytes32 indexed msgHash);\n event FailedRelayedMessage(bytes32 indexed msgHash);\n\n function xDomainMessageSender() external view returns (address);\n\n function sendMessage(\n address target,\n bytes calldata message,\n uint32 gasLimit\n ) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "exportedSymbols": { + "ICrossDomainMessenger": [ + 6416 + ] + }, + "id": 6417, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6381, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:23:40" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ICrossDomainMessenger", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6416, + "linearizedBaseContracts": [ + 6416 + ], + "name": "ICrossDomainMessenger", + "nameLocation": "67:21:40", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 6393, + "name": "SentMessage", + "nameLocation": "101:11:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6383, + "indexed": true, + "mutability": "mutable", + "name": "target", + "nameLocation": "129:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "113:22:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6382, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "113:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6385, + "indexed": false, + "mutability": "mutable", + "name": "sender", + "nameLocation": "145:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "137:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "137:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6387, + "indexed": false, + "mutability": "mutable", + "name": "message", + "nameLocation": "159:7:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "153:13:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6386, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "153:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6389, + "indexed": false, + "mutability": "mutable", + "name": "messageNonce", + "nameLocation": "176:12:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "168:20:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "168:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6391, + "indexed": false, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "198:8:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "190:16:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "190:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "112:95:40" + }, + "src": "95:113:40" + }, + { + "anonymous": false, + "id": 6397, + "name": "RelayedMessage", + "nameLocation": "219:14:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6395, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "250:7:40", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "234:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6394, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "234:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "233:25:40" + }, + "src": "213:46:40" + }, + { + "anonymous": false, + "id": 6401, + "name": "FailedRelayedMessage", + "nameLocation": "270:20:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "307:7:40", + "nodeType": "VariableDeclaration", + "scope": 6401, + "src": "291:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6398, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "291:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "290:25:40" + }, + "src": "264:52:40" + }, + { + "functionSelector": "6e296e45", + "id": 6406, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "xDomainMessageSender", + "nameLocation": "331:20:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [], + "src": "351:2:40" + }, + "returnParameters": { + "id": 6405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6406, + "src": "377:7:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "377:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "376:9:40" + }, + "scope": 6416, + "src": "322:64:40", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3dbb202b", + "id": 6415, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "sendMessage", + "nameLocation": "401:11:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6408, + "mutability": "mutable", + "name": "target", + "nameLocation": "430:6:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "422:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "422:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6410, + "mutability": "mutable", + "name": "message", + "nameLocation": "461:7:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "446:22:40", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6409, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "446:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6412, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "485:8:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "478:15:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 6411, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "478:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "412:87:40" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "508:0:40" + }, + "scope": 6416, + "src": "392:117:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6417, + "src": "57:454:40", + "usedErrors": [] + } + ], + "src": "32:480:40" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/DebtShareStorage.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\n\n/// @dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number\ncontract DebtShareManager is ElectionBase, DebtShareStorage {\n error DebtShareContractNotSet();\n error DebtShareSnapshotIdNotSet();\n\n event DebtShareContractSet(address contractAddress);\n event DebtShareSnapshotIdSet(uint snapshotId);\n\n function _setDebtShareSnapshotId(uint snapshotId) internal {\n DebtShareStore storage store = _debtShareStore();\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n store.debtShareIds[currentEpochIndex] = uint128(snapshotId);\n\n emit DebtShareSnapshotIdSet(snapshotId);\n }\n\n function _getDebtShareSnapshotId() internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n if (debtShareId == 0) {\n revert DebtShareSnapshotIdNotSet();\n }\n\n return debtShareId;\n }\n\n function _setDebtShareContract(address newDebtShareContractAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newDebtShareContractAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newDebtShareContractAddress == address(store.debtShareContract)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newDebtShareContractAddress)) {\n revert AddressError.NotAContract(newDebtShareContractAddress);\n }\n\n store.debtShareContract = IDebtShare(newDebtShareContractAddress);\n }\n\n function _getDebtShare(address user) internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n\n return store.debtShareContract.balanceOfOnPeriod(user, uint(debtShareId));\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "DebtShareManager": [ + 7129 + ], + "DebtShareStorage": [ + 6611 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 7130, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6952, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:45" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6953, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 6612, + "src": "56:44:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6954, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 1697, + "src": "101:69:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6955, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 26, + "src": "171:70:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6956, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 16, + "src": "242:71:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6957, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7130, + "sourceUnit": 4684, + "src": "314:82:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6959, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "521:12:45" + }, + "id": 6960, + "nodeType": "InheritanceSpecifier", + "src": "521:12:45" + }, + { + "baseName": { + "id": 6961, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6611, + "src": "535:16:45" + }, + "id": 6962, + "nodeType": "InheritanceSpecifier", + "src": "535:16:45" + } + ], + "canonicalName": "DebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6958, + "nodeType": "StructuredDocumentation", + "src": "398:94:45", + "text": "@dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number" + }, + "fullyImplemented": true, + "id": 7129, + "linearizedBaseContracts": [ + 7129, + 6611, + 4683, + 4331 + ], + "name": "DebtShareManager", + "nameLocation": "501:16:45", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6964, + "name": "DebtShareContractNotSet", + "nameLocation": "564:23:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6963, + "nodeType": "ParameterList", + "parameters": [], + "src": "587:2:45" + }, + "src": "558:32:45" + }, + { + "id": 6966, + "name": "DebtShareSnapshotIdNotSet", + "nameLocation": "601:25:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6965, + "nodeType": "ParameterList", + "parameters": [], + "src": "626:2:45" + }, + "src": "595:34:45" + }, + { + "anonymous": false, + "id": 6970, + "name": "DebtShareContractSet", + "nameLocation": "641:20:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6969, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6968, + "indexed": false, + "mutability": "mutable", + "name": "contractAddress", + "nameLocation": "670:15:45", + "nodeType": "VariableDeclaration", + "scope": 6970, + "src": "662:23:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6967, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "661:25:45" + }, + "src": "635:52:45" + }, + { + "anonymous": false, + "id": 6974, + "name": "DebtShareSnapshotIdSet", + "nameLocation": "698:22:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6972, + "indexed": false, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "726:10:45", + "nodeType": "VariableDeclaration", + "scope": 6974, + "src": "721:15:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6971, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "721:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "720:17:45" + }, + "src": "692:46:45" + }, + { + "body": { + "id": 7005, + "nodeType": "Block", + "src": "803:243:45", + "statements": [ + { + "assignments": [ + 6981 + ], + "declarations": [ + { + "constant": false, + "id": 6981, + "mutability": "mutable", + "name": "store", + "nameLocation": "836:5:45", + "nodeType": "VariableDeclaration", + "scope": 7005, + "src": "813:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6980, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6979, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "813:14:45" + }, + "referencedDeclaration": 6593, + "src": "813:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6984, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6982, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "844:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "844:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "813:48:45" + }, + { + "assignments": [ + 6986 + ], + "declarations": [ + { + "constant": false, + "id": 6986, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "877:17:45", + "nodeType": "VariableDeclaration", + "scope": 7005, + "src": "872:22:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6985, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "872:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6989, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6987, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "897:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "897:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "872:48:45" + }, + { + "expression": { + "id": 6999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6990, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6981, + "src": "930:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6993, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "930:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6994, + "indexExpression": { + "id": 6992, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6986, + "src": "949:17:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "930:37:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6997, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6976, + "src": "978:10:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "970:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6995, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "970:7:45", + "typeDescriptions": {} + } + }, + "id": 6998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:19:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "930:59:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 7000, + "nodeType": "ExpressionStatement", + "src": "930:59:45" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7002, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6976, + "src": "1028:10:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7001, + "name": "DebtShareSnapshotIdSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6974, + "src": "1005:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1005:34:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7004, + "nodeType": "EmitStatement", + "src": "1000:39:45" + } + ] + }, + "id": 7006, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareSnapshotId", + "nameLocation": "753:23:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6977, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6976, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "782:10:45", + "nodeType": "VariableDeclaration", + "scope": 7006, + "src": "777:15:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6975, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "777:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "776:17:45" + }, + "returnParameters": { + "id": 6978, + "nodeType": "ParameterList", + "parameters": [], + "src": "803:0:45" + }, + "scope": 7129, + "src": "744:302:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7035, + "nodeType": "Block", + "src": "1116:260:45", + "statements": [ + { + "assignments": [ + 7013 + ], + "declarations": [ + { + "constant": false, + "id": 7013, + "mutability": "mutable", + "name": "store", + "nameLocation": "1149:5:45", + "nodeType": "VariableDeclaration", + "scope": 7035, + "src": "1126:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7012, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7011, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1126:14:45" + }, + "referencedDeclaration": 6593, + "src": "1126:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7016, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7014, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1157:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1157:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1126:48:45" + }, + { + "assignments": [ + 7018 + ], + "declarations": [ + { + "constant": false, + "id": 7018, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "1193:11:45", + "nodeType": "VariableDeclaration", + "scope": 7035, + "src": "1185:19:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7017, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1185:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7024, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7019, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7013, + "src": "1207:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "1207:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7023, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7021, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1226:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1226:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1207:43:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1185:65:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 7027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7025, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "1264:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 7026, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1279:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1264:16:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7032, + "nodeType": "IfStatement", + "src": "1260:81:45", + "trueBody": { + "id": 7031, + "nodeType": "Block", + "src": "1282:59:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7028, + "name": "DebtShareSnapshotIdNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6966, + "src": "1303:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:27:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7030, + "nodeType": "RevertStatement", + "src": "1296:34:45" + } + ] + } + }, + { + "expression": { + "id": 7033, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7018, + "src": "1358:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "functionReturnParameters": 7010, + "id": 7034, + "nodeType": "Return", + "src": "1351:18:45" + } + ] + }, + "id": 7036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShareSnapshotId", + "nameLocation": "1061:23:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7007, + "nodeType": "ParameterList", + "parameters": [], + "src": "1084:2:45" + }, + "returnParameters": { + "id": 7010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7009, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7036, + "src": "1110:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7008, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1110:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1109:6:45" + }, + "scope": 7129, + "src": "1052:324:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7095, + "nodeType": "Block", + "src": "1459:543:45", + "statements": [ + { + "assignments": [ + 7043 + ], + "declarations": [ + { + "constant": false, + "id": 7043, + "mutability": "mutable", + "name": "store", + "nameLocation": "1492:5:45", + "nodeType": "VariableDeclaration", + "scope": 7095, + "src": "1469:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7042, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7041, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "1469:14:45" + }, + "referencedDeclaration": 6593, + "src": "1469:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7046, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7044, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "1500:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1500:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1469:48:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7047, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1532:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7050, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1571:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1563:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7048, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1563:7:45", + "typeDescriptions": {} + } + }, + "id": 7051, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:10:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1532:41:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7059, + "nodeType": "IfStatement", + "src": "1528:105:45", + "trueBody": { + "id": 7058, + "nodeType": "Block", + "src": "1575:58:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7053, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1596:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1596:24:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:26:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7057, + "nodeType": "RevertStatement", + "src": "1589:33:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7060, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1647:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 7063, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7043, + "src": "1686:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7064, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "1686:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + ], + "id": 7062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1678:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1678:7:45", + "typeDescriptions": {} + } + }, + "id": 7065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1678:32:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1647:63:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7073, + "nodeType": "IfStatement", + "src": "1643:123:45", + "trueBody": { + "id": 7072, + "nodeType": "Block", + "src": "1712:54:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7067, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1733:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1733:20:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1733:22:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7071, + "nodeType": "RevertStatement", + "src": "1726:29:45" + } + ] + } + }, + { + "condition": { + "id": 7078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1780:52:45", + "subExpression": { + "arguments": [ + { + "id": 7076, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1804:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7074, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "1781:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 7075, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "1781:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 7077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1781:51:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7086, + "nodeType": "IfStatement", + "src": "1776:144:45", + "trueBody": { + "id": 7085, + "nodeType": "Block", + "src": "1834:86:45", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7082, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1881:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7079, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1855:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "1855:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 7083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1855:54:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7084, + "nodeType": "RevertStatement", + "src": "1848:61:45" + } + ] + } + }, + { + "expression": { + "id": 7093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 7087, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7043, + "src": "1930:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "1930:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7091, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7038, + "src": "1967:27:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7090, + "name": "IDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6428, + "src": "1956:10:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDebtShare_$6428_$", + "typeString": "type(contract IDebtShare)" + } + }, + "id": 7092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1956:39:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "src": "1930:65:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7094, + "nodeType": "ExpressionStatement", + "src": "1930:65:45" + } + ] + }, + "id": 7096, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareContract", + "nameLocation": "1391:21:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7038, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "1421:27:45", + "nodeType": "VariableDeclaration", + "scope": 7096, + "src": "1413:35:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1413:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1412:37:45" + }, + "returnParameters": { + "id": 7040, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:45" + }, + "scope": 7129, + "src": "1382:620:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7127, + "nodeType": "Block", + "src": "2074:225:45", + "statements": [ + { + "assignments": [ + 7105 + ], + "declarations": [ + { + "constant": false, + "id": 7105, + "mutability": "mutable", + "name": "store", + "nameLocation": "2107:5:45", + "nodeType": "VariableDeclaration", + "scope": 7127, + "src": "2084:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7104, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7103, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6593, + "src": "2084:14:45" + }, + "referencedDeclaration": 6593, + "src": "2084:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7108, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7106, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6610, + "src": "2115:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6593_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2084:48:45" + }, + { + "assignments": [ + 7110 + ], + "declarations": [ + { + "constant": false, + "id": 7110, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "2151:11:45", + "nodeType": "VariableDeclaration", + "scope": 7127, + "src": "2143:19:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7109, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2143:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7116, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7111, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "2165:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7112, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6585, + "src": "2165:18:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7115, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7113, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2184:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2165:43:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2143:65:45" + }, + { + "expression": { + "arguments": [ + { + "id": 7120, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7098, + "src": "2268:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 7123, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7110, + "src": "2279:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 7122, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2274:4:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7121, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2274:4:45", + "typeDescriptions": {} + } + }, + "id": 7124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2274:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 7117, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7105, + "src": "2226:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6593_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6582, + "src": "2226:23:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOfOnPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6427, + "src": "2226:41:45", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2226:66:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7102, + "id": 7126, + "nodeType": "Return", + "src": "2219:73:45" + } + ] + }, + "id": 7128, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShare", + "nameLocation": "2017:13:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7099, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7098, + "mutability": "mutable", + "name": "user", + "nameLocation": "2039:4:45", + "nodeType": "VariableDeclaration", + "scope": 7128, + "src": "2031:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7097, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2031:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2030:14:45" + }, + "returnParameters": { + "id": 7102, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7101, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7128, + "src": "2068:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7100, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2068:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2067:6:45" + }, + "scope": 7129, + "src": "2008:291:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7130, + "src": "492:1809:45", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6964, + 6966 + ] + } + ], + "src": "31:2271:45" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\n\n/// @dev Defines core functionality for recording votes in ElectionModule.cast()\ncontract ElectionVotes is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _validateCandidates(address[] calldata candidates) internal virtual {\n uint length = candidates.length;\n\n if (length == 0) {\n revert NoCandidates();\n }\n\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n for (uint i = 0; i < length; i++) {\n address candidate = candidates[i];\n\n // Reject candidates that are not nominated.\n if (!nominees.contains(candidate)) {\n revert NotNominated();\n }\n\n // Reject duplicate candidates.\n if (i < length - 1) {\n for (uint j = i + 1; j < length; j++) {\n address otherCandidate = candidates[j];\n\n if (candidate == otherCandidate) {\n revert DuplicateCandidates();\n }\n }\n }\n }\n }\n\n function _recordVote(\n address user,\n uint votePower,\n address[] calldata candidates\n ) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = _calculateBallotId(candidates);\n BallotData storage ballot = _getBallot(ballotId);\n\n // Initialize ballot if new.\n if (!_ballotExists(ballot)) {\n address[] memory newCandidates = candidates;\n\n ballot.candidates = newCandidates;\n\n election.ballotIds.push(ballotId);\n }\n\n ballot.votes += votePower;\n ballot.votesByUser[user] = votePower;\n election.ballotIdsByAddress[user] = ballotId;\n\n return ballotId;\n }\n\n function _withdrawVote(address user, uint votePower) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n ballot.votes -= votePower;\n ballot.votesByUser[user] = 0;\n election.ballotIdsByAddress[user] = bytes32(0);\n\n return ballotId;\n }\n\n function _withdrawCastedVote(address user, uint epochIndex) internal virtual {\n uint castedVotePower = _getCastedVotePower(user);\n\n bytes32 ballotId = _withdrawVote(user, castedVotePower);\n\n emit VoteWithdrawn(user, ballotId, epochIndex, castedVotePower);\n }\n\n function _getCastedVotePower(address user) internal virtual returns (uint votePower) {\n ElectionData storage election = _getCurrentElection();\n\n bytes32 ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n return ballot.votesByUser[user];\n }\n\n function _getVotePower(address) internal view virtual returns (uint) {\n return 1;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionVotes": [ + 6279 + ], + "MathUtil": [ + 1708 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6280, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5963, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5964, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 4684, + "src": "56:28:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 5965, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1697, + "src": "85:69:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 5966, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1709, + "src": "155:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 5967, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 26, + "src": "222:70:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 5968, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 16, + "src": "293:71:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5970, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "473:12:38" + }, + "id": 5971, + "nodeType": "InheritanceSpecifier", + "src": "473:12:38" + } + ], + "canonicalName": "ElectionVotes", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5969, + "nodeType": "StructuredDocumentation", + "src": "366:81:38", + "text": "@dev Defines core functionality for recording votes in ElectionModule.cast()" + }, + "fullyImplemented": true, + "id": 6279, + "linearizedBaseContracts": [ + 6279, + 4683, + 4331 + ], + "name": "ElectionVotes", + "nameLocation": "456:13:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5975, + "libraryName": { + "id": 5972, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "498:7:38" + }, + "nodeType": "UsingForDirective", + "src": "492:37:38", + "typeName": { + "id": 5974, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5973, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "510:18:38" + }, + "referencedDeclaration": 1788, + "src": "510:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 6066, + "nodeType": "Block", + "src": "612:821:38", + "statements": [ + { + "assignments": [ + 5982 + ], + "declarations": [ + { + "constant": false, + "id": 5982, + "mutability": "mutable", + "name": "length", + "nameLocation": "627:6:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "622:11:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5981, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "622:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5985, + "initialValue": { + "expression": { + "id": 5983, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "636:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 5984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "636:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "622:31:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5986, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "668:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "678:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "668:11:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5993, + "nodeType": "IfStatement", + "src": "664:63:38", + "trueBody": { + "id": 5992, + "nodeType": "Block", + "src": "681:46:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5989, + "name": "NoCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4352, + "src": "702:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "702:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5991, + "nodeType": "RevertStatement", + "src": "695:21:38" + } + ] + } + }, + { + "assignments": [ + 5998 + ], + "declarations": [ + { + "constant": false, + "id": 5998, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "764:8:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "737:35:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5996, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "737:18:38" + }, + "referencedDeclaration": 1788, + "src": "737:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 6002, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5999, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "775:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "775:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6001, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "775:30:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "737:68:38" + }, + { + "body": { + "id": 6064, + "nodeType": "Block", + "src": "850:577:38", + "statements": [ + { + "assignments": [ + 6014 + ], + "declarations": [ + { + "constant": false, + "id": 6014, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "872:9:38", + "nodeType": "VariableDeclaration", + "scope": 6064, + "src": "864:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "864:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6018, + "initialValue": { + "baseExpression": { + "id": 6015, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6017, + "indexExpression": { + "id": 6016, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "895:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "884:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "864:33:38" + }, + { + "condition": { + "id": 6023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "973:29:38", + "subExpression": { + "arguments": [ + { + "id": 6021, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "992:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6019, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5998, + "src": "974:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 6020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "974:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 6022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "974:28:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6028, + "nodeType": "IfStatement", + "src": "969:89:38", + "trueBody": { + "id": 6027, + "nodeType": "Block", + "src": "1004:54:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6024, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "1029:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1029:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6026, + "nodeType": "RevertStatement", + "src": "1022:21:38" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6029, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1120:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6030, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1124:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1133:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1124:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1120:14:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6063, + "nodeType": "IfStatement", + "src": "1116:301:38", + "trueBody": { + "id": 6062, + "nodeType": "Block", + "src": "1136:281:38", + "statements": [ + { + "body": { + "id": 6060, + "nodeType": "Block", + "src": "1192:211:38", + "statements": [ + { + "assignments": [ + 6047 + ], + "declarations": [ + { + "constant": false, + "id": 6047, + "mutability": "mutable", + "name": "otherCandidate", + "nameLocation": "1222:14:38", + "nodeType": "VariableDeclaration", + "scope": 6060, + "src": "1214:22:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6046, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1214:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6051, + "initialValue": { + "baseExpression": { + "id": 6048, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "1239:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6050, + "indexExpression": { + "id": 6049, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1250:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1239:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1214:38:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6052, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "1279:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6053, + "name": "otherCandidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "1292:14:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1279:27:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6059, + "nodeType": "IfStatement", + "src": "1275:110:38", + "trueBody": { + "id": 6058, + "nodeType": "Block", + "src": "1308:77:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6055, + "name": "DuplicateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4358, + "src": "1341:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1341:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6057, + "nodeType": "RevertStatement", + "src": "1334:28:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6040, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1175:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6041, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1179:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1175:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6061, + "initializationExpression": { + "assignments": [ + 6035 + ], + "declarations": [ + { + "constant": false, + "id": 6035, + "mutability": "mutable", + "name": "j", + "nameLocation": "1164:1:38", + "nodeType": "VariableDeclaration", + "scope": 6061, + "src": "1159:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6034, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1159:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6039, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6036, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1168:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 6037, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1172:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1168:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1159:14:38" + }, + "loopExpression": { + "expression": { + "id": 6044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1187:3:38", + "subExpression": { + "id": 6043, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1187:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6045, + "nodeType": "ExpressionStatement", + "src": "1187:3:38" + }, + "nodeType": "ForStatement", + "src": "1154:249:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6007, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "833:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6008, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "837:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "833:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6065, + "initializationExpression": { + "assignments": [ + 6004 + ], + "declarations": [ + { + "constant": false, + "id": 6004, + "mutability": "mutable", + "name": "i", + "nameLocation": "826:1:38", + "nodeType": "VariableDeclaration", + "scope": 6065, + "src": "821:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "821:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6006, + "initialValue": { + "hexValue": "30", + "id": 6005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "821:10:38" + }, + "loopExpression": { + "expression": { + "id": 6011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "845:3:38", + "subExpression": { + "id": 6010, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "845:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6012, + "nodeType": "ExpressionStatement", + "src": "845:3:38" + }, + "nodeType": "ForStatement", + "src": "816:611:38" + } + ] + }, + "id": 6067, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCandidates", + "nameLocation": "544:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5978, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "583:10:38", + "nodeType": "VariableDeclaration", + "scope": 6067, + "src": "564:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 5976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "564:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5977, + "nodeType": "ArrayTypeName", + "src": "564:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "563:31:38" + }, + "returnParameters": { + "id": 5980, + "nodeType": "ParameterList", + "parameters": [], + "src": "612:0:38" + }, + "scope": 6279, + "src": "535:898:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6149, + "nodeType": "Block", + "src": "1595:581:38", + "statements": [ + { + "assignments": [ + 6081 + ], + "declarations": [ + { + "constant": false, + "id": 6081, + "mutability": "mutable", + "name": "election", + "nameLocation": "1626:8:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1605:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6080, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6079, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1605:12:38" + }, + "referencedDeclaration": 4299, + "src": "1605:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6084, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6082, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "1637:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1637:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1605:53:38" + }, + { + "expression": { + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6085, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1669:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6087, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1699:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6086, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "1680:18:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 6088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:30:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1669:41:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6090, + "nodeType": "ExpressionStatement", + "src": "1669:41:38" + }, + { + "assignments": [ + 6093 + ], + "declarations": [ + { + "constant": false, + "id": 6093, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1739:6:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1720:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6092, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6091, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1720:10:38" + }, + "referencedDeclaration": 4309, + "src": "1720:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6097, + "initialValue": { + "arguments": [ + { + "id": 6095, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1759:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6094, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "1748:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1748:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1720:48:38" + }, + { + "condition": { + "id": 6101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1820:22:38", + "subExpression": { + "arguments": [ + { + "id": 6099, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1835:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + ], + "id": 6098, + "name": "_ballotExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "1821:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_BallotData_$4309_storage_ptr_$returns$_t_bool_$", + "typeString": "function (struct ElectionStorage.BallotData storage pointer) view returns (bool)" + } + }, + "id": 6100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1821:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6124, + "nodeType": "IfStatement", + "src": "1816:192:38", + "trueBody": { + "id": 6123, + "nodeType": "Block", + "src": "1844:164:38", + "statements": [ + { + "assignments": [ + 6106 + ], + "declarations": [ + { + "constant": false, + "id": 6106, + "mutability": "mutable", + "name": "newCandidates", + "nameLocation": "1875:13:38", + "nodeType": "VariableDeclaration", + "scope": 6123, + "src": "1858:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1858:7:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6105, + "nodeType": "ArrayTypeName", + "src": "1858:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 6108, + "initialValue": { + "id": 6107, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1891:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1858:43:38" + }, + { + "expression": { + "id": 6113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6109, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1916:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1916:17:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6112, + "name": "newCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6106, + "src": "1936:13:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "1916:33:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 6114, + "nodeType": "ExpressionStatement", + "src": "1916:33:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6120, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1988:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 6115, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "1964:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1964:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "1964:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1964:33:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6122, + "nodeType": "ExpressionStatement", + "src": "1964:33:38" + } + ] + } + }, + { + "expression": { + "id": 6129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6125, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2018:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2018:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 6128, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2034:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2018:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6130, + "nodeType": "ExpressionStatement", + "src": "2018:25:38" + }, + { + "expression": { + "id": 6137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6131, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2053:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2053:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6135, + "indexExpression": { + "id": 6133, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2072:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2053:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6136, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2080:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2053:36:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6138, + "nodeType": "ExpressionStatement", + "src": "2053:36:38" + }, + { + "expression": { + "id": 6145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6139, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "2099:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2099:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6143, + "indexExpression": { + "id": 6141, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2127:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2099:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6144, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2135:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2099:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6146, + "nodeType": "ExpressionStatement", + "src": "2099:44:38" + }, + { + "expression": { + "id": 6147, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2161:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6078, + "id": 6148, + "nodeType": "Return", + "src": "2154:15:38" + } + ] + }, + "id": 6150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_recordVote", + "nameLocation": "1448:11:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6069, + "mutability": "mutable", + "name": "user", + "nameLocation": "1477:4:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1469:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6068, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1469:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6071, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "1496:9:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1491:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6070, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1491:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6074, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "1534:10:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1515:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1515:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6073, + "nodeType": "ArrayTypeName", + "src": "1515:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1459:91:38" + }, + "returnParameters": { + "id": 6078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6077, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1585:8:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1577:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1577:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1576:18:38" + }, + "scope": 6279, + "src": "1439:737:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6206, + "nodeType": "Block", + "src": "2279:339:38", + "statements": [ + { + "assignments": [ + 6161 + ], + "declarations": [ + { + "constant": false, + "id": 6161, + "mutability": "mutable", + "name": "election", + "nameLocation": "2310:8:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2289:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6160, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6159, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2289:12:38" + }, + "referencedDeclaration": 4299, + "src": "2289:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6164, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6162, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "2321:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2321:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2289:53:38" + }, + { + "expression": { + "id": 6170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6165, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2353:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "expression": { + "id": 6166, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2364:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2364:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6169, + "indexExpression": { + "id": 6168, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2392:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2364:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2353:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6171, + "nodeType": "ExpressionStatement", + "src": "2353:44:38" + }, + { + "assignments": [ + 6174 + ], + "declarations": [ + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "2426:6:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2407:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6173, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6172, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2407:10:38" + }, + "referencedDeclaration": 4309, + "src": "2407:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6178, + "initialValue": { + "arguments": [ + { + "id": 6176, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2446:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6175, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "2435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2435:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2407:48:38" + }, + { + "expression": { + "id": 6183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6179, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2466:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2466:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 6182, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6154, + "src": "2482:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2466:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6184, + "nodeType": "ExpressionStatement", + "src": "2466:25:38" + }, + { + "expression": { + "id": 6191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6185, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2501:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6188, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2501:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6189, + "indexExpression": { + "id": 6187, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2520:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2501:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 6190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2528:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2501:28:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6192, + "nodeType": "ExpressionStatement", + "src": "2501:28:38" + }, + { + "expression": { + "id": 6202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6193, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2539:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2539:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6197, + "indexExpression": { + "id": 6195, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2567:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2539:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2583:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2575:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6198, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2575:7:38", + "typeDescriptions": {} + } + }, + "id": 6201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2575:10:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2539:46:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6203, + "nodeType": "ExpressionStatement", + "src": "2539:46:38" + }, + { + "expression": { + "id": 6204, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2603:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6158, + "id": 6205, + "nodeType": "Return", + "src": "2596:15:38" + } + ] + }, + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawVote", + "nameLocation": "2191:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6152, + "mutability": "mutable", + "name": "user", + "nameLocation": "2213:4:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2205:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2205:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6154, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2224:9:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2219:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6153, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2219:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2204:30:38" + }, + "returnParameters": { + "id": 6158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6157, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2269:8:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2261:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6156, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2261:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2260:18:38" + }, + "scope": 6279, + "src": "2182:436:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6234, + "nodeType": "Block", + "src": "2701:205:38", + "statements": [ + { + "assignments": [ + 6215 + ], + "declarations": [ + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "castedVotePower", + "nameLocation": "2716:15:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2711:20:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6214, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2711:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6219, + "initialValue": { + "arguments": [ + { + "id": 6217, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2754:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6216, + "name": "_getCastedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6268, + "src": "2734:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 6218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2734:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2711:48:38" + }, + { + "assignments": [ + 6221 + ], + "declarations": [ + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2778:8:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2770:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6220, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2770:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6226, + "initialValue": { + "arguments": [ + { + "id": 6223, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2803:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6224, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2809:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6222, + "name": "_withdrawVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6207, + "src": "2789:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) returns (bytes32)" + } + }, + "id": 6225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2789:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2770:55:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6228, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2855:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6229, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2861:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6230, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6211, + "src": "2871:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6231, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2883:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6227, + "name": "VoteWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4477, + "src": "2841:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2841:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6233, + "nodeType": "EmitStatement", + "src": "2836:63:38" + } + ] + }, + "id": 6235, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawCastedVote", + "nameLocation": "2633:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6209, + "mutability": "mutable", + "name": "user", + "nameLocation": "2661:4:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2653:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6211, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2672:10:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2667:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2667:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2652:31:38" + }, + "returnParameters": { + "id": 6213, + "nodeType": "ParameterList", + "parameters": [], + "src": "2701:0:38" + }, + "scope": 6279, + "src": "2624:282:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6267, + "nodeType": "Block", + "src": "2997:233:38", + "statements": [ + { + "assignments": [ + 6244 + ], + "declarations": [ + { + "constant": false, + "id": 6244, + "mutability": "mutable", + "name": "election", + "nameLocation": "3028:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3007:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6242, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3007:12:38" + }, + "referencedDeclaration": 4299, + "src": "3007:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6247, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6245, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "3039:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3007:53:38" + }, + { + "assignments": [ + 6249 + ], + "declarations": [ + { + "constant": false, + "id": 6249, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "3079:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3071:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6248, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3071:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6254, + "initialValue": { + "baseExpression": { + "expression": { + "id": 6250, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6244, + "src": "3090:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6251, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "3090:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6253, + "indexExpression": { + "id": 6252, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3118:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3090:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3071:52:38" + }, + { + "assignments": [ + 6257 + ], + "declarations": [ + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "3152:6:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3133:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6256, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6255, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "3133:10:38" + }, + "referencedDeclaration": 4309, + "src": "3133:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6261, + "initialValue": { + "arguments": [ + { + "id": 6259, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6249, + "src": "3172:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6258, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "3161:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3133:48:38" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6262, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "3199:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "3199:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6265, + "indexExpression": { + "id": 6264, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3218:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3199:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6241, + "id": 6266, + "nodeType": "Return", + "src": "3192:31:38" + } + ] + }, + "id": 6268, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCastedVotePower", + "nameLocation": "2921:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6237, + "mutability": "mutable", + "name": "user", + "nameLocation": "2949:4:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2941:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6236, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2941:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2940:14:38" + }, + "returnParameters": { + "id": 6241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6240, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2986:9:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2981:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2981:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2980:16:38" + }, + "scope": 6279, + "src": "2912:318:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6277, + "nodeType": "Block", + "src": "3305:25:38", + "statements": [ + { + "expression": { + "hexValue": "31", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3322:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 6274, + "id": 6276, + "nodeType": "Return", + "src": "3315:8:38" + } + ] + }, + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "3245:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6270, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3259:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3258:9:38" + }, + "returnParameters": { + "id": 6274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3299:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3299:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3298:6:38" + }, + "scope": 6279, + "src": "3236:94:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6280, + "src": "447:2885:38", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3302:38" + } + }, + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * Solmate - https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol\n*/\n\nlibrary MathUtil {\n function sqrt(uint256 x) internal pure returns (uint256 z) {\n assembly {\n // Start off with z at 1.\n z := 1\n\n // Used below to help find a nearby power of 2.\n let y := x\n\n // Find the lowest power of 2 that is at least sqrt(x).\n if iszero(lt(y, 0x100000000000000000000000000000000)) {\n y := shr(128, y) // Like dividing by 2 ** 128.\n z := shl(64, z) // Like multiplying by 2 ** 64.\n }\n if iszero(lt(y, 0x10000000000000000)) {\n y := shr(64, y) // Like dividing by 2 ** 64.\n z := shl(32, z) // Like multiplying by 2 ** 32.\n }\n if iszero(lt(y, 0x100000000)) {\n y := shr(32, y) // Like dividing by 2 ** 32.\n z := shl(16, z) // Like multiplying by 2 ** 16.\n }\n if iszero(lt(y, 0x10000)) {\n y := shr(16, y) // Like dividing by 2 ** 16.\n z := shl(8, z) // Like multiplying by 2 ** 8.\n }\n if iszero(lt(y, 0x100)) {\n y := shr(8, y) // Like dividing by 2 ** 8.\n z := shl(4, z) // Like multiplying by 2 ** 4.\n }\n if iszero(lt(y, 0x10)) {\n y := shr(4, y) // Like dividing by 2 ** 4.\n z := shl(2, z) // Like multiplying by 2 ** 2.\n }\n if iszero(lt(y, 0x8)) {\n // Equivalent to 2 ** z.\n z := shl(1, z)\n }\n\n // Shifting right by 1 is like dividing by 2.\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n\n // Compute a rounded down version of z.\n let zRoundDown := div(x, z)\n\n // If zRoundDown is smaller, use it.\n if lt(zRoundDown, z) {\n z := zRoundDown\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "exportedSymbols": { + "MathUtil": [ + 1708 + ] + }, + "id": 1709, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1698, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:22" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MathUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1708, + "linearizedBaseContracts": [ + 1708 + ], + "name": "MathUtil", + "nameLocation": "200:8:22", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1706, + "nodeType": "Block", + "src": "274:2057:22", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "293:2032:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "345:6:22", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "350:1:22", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "345:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "425:10:22", + "value": { + "name": "x", + "nodeType": "YulIdentifier", + "src": "434:1:22" + }, + "variables": [ + { + "name": "y", + "nodeType": "YulTypedName", + "src": "429:1:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "571:142:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "589:16:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "598:3:22", + "type": "", + "value": "128" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "603:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "594:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "594:11:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "589:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "652:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "661:2:22", + "type": "", + "value": "64" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "665:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "657:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "657:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "652:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "530:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "533:35:22", + "type": "", + "value": "0x100000000000000000000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "527:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "527:42:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "520:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "520:50:22" + }, + "nodeType": "YulIf", + "src": "517:196:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "764:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "782:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "791:2:22", + "type": "", + "value": "64" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "795:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "787:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "787:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "782:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "843:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "852:2:22", + "type": "", + "value": "32" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "856:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "848:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "848:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "843:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "739:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "742:19:22", + "type": "", + "value": "0x10000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "736:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "736:26:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "729:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "729:34:22" + }, + "nodeType": "YulIf", + "src": "726:178:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "947:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "965:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "974:2:22", + "type": "", + "value": "32" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "978:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "970:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "970:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "965:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1026:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1035:2:22", + "type": "", + "value": "16" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1039:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1031:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1031:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1026:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "930:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "933:11:22", + "type": "", + "value": "0x100000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "927:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "927:18:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "920:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "920:26:22" + }, + "nodeType": "YulIf", + "src": "917:170:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1126:138:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1144:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1153:2:22", + "type": "", + "value": "16" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1157:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1149:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1149:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1144:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1205:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1214:1:22", + "type": "", + "value": "8" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1217:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1210:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1210:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1205:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1113:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1116:7:22", + "type": "", + "value": "0x10000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1110:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1110:14:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1103:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1103:22:22" + }, + "nodeType": "YulIf", + "src": "1100:164:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1301:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1319:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1328:1:22", + "type": "", + "value": "8" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1331:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1324:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1324:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1319:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1378:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1387:1:22", + "type": "", + "value": "4" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1390:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1383:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1383:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1378:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1290:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1293:5:22", + "type": "", + "value": "0x100" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1287:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1287:12:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1280:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1280:20:22" + }, + "nodeType": "YulIf", + "src": "1277:160:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1473:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1491:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1500:1:22", + "type": "", + "value": "4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1503:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1496:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1496:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1491:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1550:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1559:1:22", + "type": "", + "value": "2" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1562:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1555:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1555:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1550:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1463:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1466:4:22", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1460:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1460:11:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1453:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1453:19:22" + }, + "nodeType": "YulIf", + "src": "1450:159:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1644:87:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1703:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1712:1:22", + "type": "", + "value": "1" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1715:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1708:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1708:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1703:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1635:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1638:3:22", + "type": "", + "value": "0x8" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1632:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1632:10:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1625:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1625:18:22" + }, + "nodeType": "YulIf", + "src": "1622:109:22" + }, + { + "nodeType": "YulAssignment", + "src": "1803:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1812:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1819:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1826:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1829:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1822:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1822:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1815:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1815:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1808:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1808:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1803:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1846:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1855:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1862:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1869:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1872:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1865:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1865:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1858:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1858:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1851:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1851:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1846:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1889:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1898:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1905:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1912:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1915:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1908:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1908:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1901:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1901:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1894:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1894:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1889:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1932:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1941:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1948:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1955:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1958:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1951:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1951:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1944:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1944:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1937:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1937:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1932:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1975:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1984:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1991:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1998:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2001:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1994:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1994:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1987:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1987:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1980:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1980:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1975:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2018:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2027:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2034:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2041:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2044:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2037:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2037:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2030:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2030:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2023:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2023:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2018:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2061:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2070:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2077:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2084:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2087:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2080:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2080:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2073:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2073:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2066:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2066:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2061:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2157:27:22", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2179:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2182:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2175:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2175:9:22" + }, + "variables": [ + { + "name": "zRoundDown", + "nodeType": "YulTypedName", + "src": "2161:10:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2268:47:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2286:15:22", + "value": { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2291:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2286:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2253:10:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2265:1:22" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2250:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "2250:17:22" + }, + "nodeType": "YulIf", + "src": "2247:68:22" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1826:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1869:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1912:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1955:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1998:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2041:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2084:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2179:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "434:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1026:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1039:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1205:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1217:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1378:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1390:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1550:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1562:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1703:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1715:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1803:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1819:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1829:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1846:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1862:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1872:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1889:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1905:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1915:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1932:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1948:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1958:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1975:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1991:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2001:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2018:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2034:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2044:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2061:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2077:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2087:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2182:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2265:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2286:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "345:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "652:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "665:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "843:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "856:1:22", + "valueSize": 1 + } + ], + "id": 1705, + "nodeType": "InlineAssembly", + "src": "284:2041:22" + } + ] + }, + "id": 1707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "224:4:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1700, + "mutability": "mutable", + "name": "x", + "nameLocation": "237:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "229:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "229:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "228:11:22" + }, + "returnParameters": { + "id": 1704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1703, + "mutability": "mutable", + "name": "z", + "nameLocation": "271:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "263:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1702, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "263:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "262:11:22" + }, + "scope": 1708, + "src": "215:2116:22", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1709, + "src": "192:2141:22", + "usedErrors": [] + } + ], + "src": "31:2303:22" + } + }, + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableMixin.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\n\ncontract Ownable is IOwnable, OwnableMixin {\n event OwnerNominated(address newOwner);\n event OwnerChanged(address oldOwner, address newOwner);\n\n error NotNominated(address addr);\n\n function acceptOwnership() public override {\n OwnableStore storage store = _ownableStore();\n\n address currentNominatedOwner = store.nominatedOwner;\n if (msg.sender != currentNominatedOwner) {\n revert NotNominated(msg.sender);\n }\n\n emit OwnerChanged(store.owner, currentNominatedOwner);\n store.owner = currentNominatedOwner;\n\n store.nominatedOwner = address(0);\n }\n\n function nominateNewOwner(address newNominatedOwner) public override onlyOwnerIfSet {\n OwnableStore storage store = _ownableStore();\n\n if (newNominatedOwner == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newNominatedOwner == store.nominatedOwner) {\n revert ChangeError.NoChange();\n }\n\n store.nominatedOwner = newNominatedOwner;\n emit OwnerNominated(newNominatedOwner);\n }\n\n function renounceNomination() external override {\n OwnableStore storage store = _ownableStore();\n\n if (store.nominatedOwner != msg.sender) {\n revert NotNominated(msg.sender);\n }\n\n store.nominatedOwner = address(0);\n }\n\n function owner() external view override returns (address) {\n return _ownableStore().owner;\n }\n\n function nominatedOwner() external view override returns (address) {\n return _ownableStore().nominatedOwner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 415, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 240, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:12" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "./OwnableMixin.sol", + "id": 241, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 477, + "src": "56:28:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "file": "../interfaces/IOwnable.sol", + "id": 242, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 221, + "src": "85:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 243, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 16, + "src": "122:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 244, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 26, + "src": "159:35:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 245, + "name": "IOwnable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 220, + "src": "216:8:12" + }, + "id": 246, + "nodeType": "InheritanceSpecifier", + "src": "216:8:12" + }, + { + "baseName": { + "id": 247, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "226:12:12" + }, + "id": 248, + "nodeType": "InheritanceSpecifier", + "src": "226:12:12" + } + ], + "canonicalName": "Ownable", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 414, + "linearizedBaseContracts": [ + 414, + 476, + 494, + 220 + ], + "name": "Ownable", + "nameLocation": "205:7:12", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 252, + "name": "OwnerNominated", + "nameLocation": "251:14:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "274:8:12", + "nodeType": "VariableDeclaration", + "scope": 252, + "src": "266:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "266:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:18:12" + }, + "src": "245:39:12" + }, + { + "anonymous": false, + "id": 258, + "name": "OwnerChanged", + "nameLocation": "295:12:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 254, + "indexed": false, + "mutability": "mutable", + "name": "oldOwner", + "nameLocation": "316:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "308:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 256, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "334:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "326:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "326:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "307:36:12" + }, + "src": "289:55:12" + }, + { + "id": 262, + "name": "NotNominated", + "nameLocation": "356:12:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 260, + "mutability": "mutable", + "name": "addr", + "nameLocation": "377:4:12", + "nodeType": "VariableDeclaration", + "scope": 262, + "src": "369:12:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "369:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "368:14:12" + }, + "src": "350:33:12" + }, + { + "baseFunctions": [ + 201 + ], + "body": { + "id": 309, + "nodeType": "Block", + "src": "432:383:12", + "statements": [ + { + "assignments": [ + 268 + ], + "declarations": [ + { + "constant": false, + "id": 268, + "mutability": "mutable", + "name": "store", + "nameLocation": "463:5:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "442:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 267, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 266, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "442:12:12" + }, + "referencedDeclaration": 485, + "src": "442:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 271, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 269, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "471:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "471:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "442:44:12" + }, + { + "assignments": [ + 273 + ], + "declarations": [ + { + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "currentNominatedOwner", + "nameLocation": "505:21:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "497:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "497:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 276, + "initialValue": { + "expression": { + "id": 274, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "529:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 275, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "529:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "497:52:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 277, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "563:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "563:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 279, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "577:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "563:35:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 287, + "nodeType": "IfStatement", + "src": "559:97:12", + "trueBody": { + "id": 286, + "nodeType": "Block", + "src": "600:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 282, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "634:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "634:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 281, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "621:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "621:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 285, + "nodeType": "RevertStatement", + "src": "614:31:12" + } + ] + } + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 289, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "684:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 290, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "684:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 291, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "697:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 288, + "name": "OwnerChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "671:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "671:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 293, + "nodeType": "EmitStatement", + "src": "666:53:12" + }, + { + "expression": { + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 294, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "729:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "729:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 297, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "743:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "729:35:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "729:35:12" + }, + { + "expression": { + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 300, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "775:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "775:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "806:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "798:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 303, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "798:7:12", + "typeDescriptions": {} + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "798:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "775:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "775:33:12" + } + ] + }, + "functionSelector": "79ba5097", + "id": 310, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "398:15:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 264, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "423:8:12" + }, + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [], + "src": "413:2:12" + }, + "returnParameters": { + "id": 265, + "nodeType": "ParameterList", + "parameters": [], + "src": "432:0:12" + }, + "scope": 414, + "src": "389:426:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 206 + ], + "body": { + "id": 358, + "nodeType": "Block", + "src": "905:376:12", + "statements": [ + { + "assignments": [ + 320 + ], + "declarations": [ + { + "constant": false, + "id": 320, + "mutability": "mutable", + "name": "store", + "nameLocation": "936:5:12", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "915:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 319, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 318, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "915:12:12" + }, + "referencedDeclaration": 485, + "src": "915:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 323, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 321, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "944:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "944:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "915:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 324, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "974:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1003:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "995:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 325, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "995:7:12", + "typeDescriptions": {} + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "974:31:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 336, + "nodeType": "IfStatement", + "src": "970:95:12", + "trueBody": { + "id": 335, + "nodeType": "Block", + "src": "1007:58:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 330, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1028:12:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1028:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1028:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 334, + "nodeType": "RevertStatement", + "src": "1021:33:12" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 337, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1079:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 338, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1100:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 339, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1100:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1079:41:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 347, + "nodeType": "IfStatement", + "src": "1075:101:12", + "trueBody": { + "id": 346, + "nodeType": "Block", + "src": "1122:54:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 341, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1143:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1143:20:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1143:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "RevertStatement", + "src": "1136:29:12" + } + ] + } + }, + { + "expression": { + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 348, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1186:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1186:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 351, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1209:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1186:40:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 353, + "nodeType": "ExpressionStatement", + "src": "1186:40:12" + }, + { + "eventCall": { + "arguments": [ + { + "id": 355, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1256:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 354, + "name": "OwnerNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 252, + "src": "1241:14:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1241:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 357, + "nodeType": "EmitStatement", + "src": "1236:38:12" + } + ] + }, + "functionSelector": "1627540c", + "id": 359, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 316, + "kind": "modifierInvocation", + "modifierName": { + "id": 315, + "name": "onlyOwnerIfSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 447, + "src": "890:14:12" + }, + "nodeType": "ModifierInvocation", + "src": "890:14:12" + } + ], + "name": "nominateNewOwner", + "nameLocation": "830:16:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 314, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "881:8:12" + }, + "parameters": { + "id": 313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 312, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "855:17:12", + "nodeType": "VariableDeclaration", + "scope": 359, + "src": "847:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "847:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "846:27:12" + }, + "returnParameters": { + "id": 317, + "nodeType": "ParameterList", + "parameters": [], + "src": "905:0:12" + }, + "scope": 414, + "src": "821:460:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 209 + ], + "body": { + "id": 390, + "nodeType": "Block", + "src": "1335:211:12", + "statements": [ + { + "assignments": [ + 365 + ], + "declarations": [ + { + "constant": false, + "id": 365, + "mutability": "mutable", + "name": "store", + "nameLocation": "1366:5:12", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "1345:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 364, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 363, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "1345:12:12" + }, + "referencedDeclaration": 485, + "src": "1345:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 368, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 366, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1374:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1374:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 369, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1404:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1404:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 371, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1428:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1428:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1404:34:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 380, + "nodeType": "IfStatement", + "src": "1400:96:12", + "trueBody": { + "id": 379, + "nodeType": "Block", + "src": "1440:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 375, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1474:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1474:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 374, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "1461:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1461:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "RevertStatement", + "src": "1454:31:12" + } + ] + } + }, + { + "expression": { + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 381, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1506:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 383, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1506:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1537:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1529:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1529:7:12", + "typeDescriptions": {} + } + }, + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1529:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1506:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 389, + "nodeType": "ExpressionStatement", + "src": "1506:33:12" + } + ] + }, + "functionSelector": "718fe928", + "id": 391, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "1296:18:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 361, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1326:8:12" + }, + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "1314:2:12" + }, + "returnParameters": { + "id": 362, + "nodeType": "ParameterList", + "parameters": [], + "src": "1335:0:12" + }, + "scope": 414, + "src": "1287:259:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 214 + ], + "body": { + "id": 401, + "nodeType": "Block", + "src": "1610:45:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 397, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1627:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1627:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 399, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "1627:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 396, + "id": 400, + "nodeType": "Return", + "src": "1620:28:12" + } + ] + }, + "functionSelector": "8da5cb5b", + "id": 402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "1561:5:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 393, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:12" + }, + "parameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [], + "src": "1566:2:12" + }, + "returnParameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 395, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "1601:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1600:9:12" + }, + "scope": 414, + "src": "1552:103:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 219 + ], + "body": { + "id": 412, + "nodeType": "Block", + "src": "1728:54:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 408, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1745:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1745:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1745:30:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 407, + "id": 411, + "nodeType": "Return", + "src": "1738:37:12" + } + ] + }, + "functionSelector": "53a47bb7", + "id": 413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "1670:14:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 404, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1701:8:12" + }, + "parameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "1684:2:12" + }, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "1719:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 405, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1719:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1718:9:12" + }, + "scope": 414, + "src": "1661:121:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 415, + "src": "196:1588:12", + "usedErrors": [ + 5, + 10, + 24, + 262 + ] + } + ], + "src": "31:1754:12" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableStorage.sol\";\nimport \"../errors/AccessError.sol\";\n\ncontract OwnableMixin is OwnableStorage {\n modifier onlyOwner() {\n _onlyOwner();\n\n _;\n }\n\n modifier onlyOwnerIfSet() {\n address owner = _getOwner();\n\n // if owner is set then check if msg.sender is the owner\n if (owner != address(0)) {\n _onlyOwner();\n }\n\n _;\n }\n\n function _onlyOwner() internal view {\n if (msg.sender != _getOwner()) {\n revert AccessError.Unauthorized(msg.sender);\n }\n }\n\n function _getOwner() internal view returns (address) {\n return _ownableStore().owner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 477, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 416, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:13" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "file": "./OwnableStorage.sol", + "id": 417, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 495, + "src": "56:30:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 418, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 7, + "src": "87:35:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 419, + "name": "OwnableStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 494, + "src": "149:14:13" + }, + "id": 420, + "nodeType": "InheritanceSpecifier", + "src": "149:14:13" + } + ], + "canonicalName": "OwnableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 476, + "linearizedBaseContracts": [ + 476, + 494 + ], + "name": "OwnableMixin", + "nameLocation": "133:12:13", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 426, + "nodeType": "Block", + "src": "191:41:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 422, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "201:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "201:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "201:12:13" + }, + { + "id": 425, + "nodeType": "PlaceholderStatement", + "src": "224:1:13" + } + ] + }, + "id": 427, + "name": "onlyOwner", + "nameLocation": "179:9:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:13" + }, + "src": "170:62:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 446, + "nodeType": "Block", + "src": "264:193:13", + "statements": [ + { + "assignments": [ + 430 + ], + "declarations": [ + { + "constant": false, + "id": 430, + "mutability": "mutable", + "name": "owner", + "nameLocation": "282:5:13", + "nodeType": "VariableDeclaration", + "scope": 446, + "src": "274:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 433, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 431, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "290:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "290:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "274:27:13" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 434, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "381:5:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "398:1:13", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "390:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "390:7:13", + "typeDescriptions": {} + } + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "390:10:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "381:19:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 444, + "nodeType": "IfStatement", + "src": "377:62:13", + "trueBody": { + "id": 443, + "nodeType": "Block", + "src": "402:37:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 440, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "416:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "416:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 442, + "nodeType": "ExpressionStatement", + "src": "416:12:13" + } + ] + } + }, + { + "id": 445, + "nodeType": "PlaceholderStatement", + "src": "449:1:13" + } + ] + }, + "id": 447, + "name": "onlyOwnerIfSet", + "nameLocation": "247:14:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 428, + "nodeType": "ParameterList", + "parameters": [], + "src": "261:2:13" + }, + "src": "238:219:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 464, + "nodeType": "Block", + "src": "499:115:13", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 450, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "513:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "513:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 452, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "527:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "527:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "513:25:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 463, + "nodeType": "IfStatement", + "src": "509:99:13", + "trueBody": { + "id": 462, + "nodeType": "Block", + "src": "540:68:13", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 458, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "586:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "586:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 455, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "561:11:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "561:24:13", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "561:36:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 461, + "nodeType": "RevertStatement", + "src": "554:43:13" + } + ] + } + } + ] + }, + "id": 465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyOwner", + "nameLocation": "472:10:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [], + "src": "482:2:13" + }, + "returnParameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [], + "src": "499:0:13" + }, + "scope": 476, + "src": "463:151:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 474, + "nodeType": "Block", + "src": "673:45:13", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 470, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "690:13:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "690:15:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "690:21:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 469, + "id": 473, + "nodeType": "Return", + "src": "683:28:13" + } + ] + }, + "id": 475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getOwner", + "nameLocation": "629:9:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 466, + "nodeType": "ParameterList", + "parameters": [], + "src": "638:2:13" + }, + "returnParameters": { + "id": 469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 475, + "src": "664:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 467, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "664:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "663:9:13" + }, + "scope": 476, + "src": "620:98:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 477, + "src": "124:596:13", + "usedErrors": [] + } + ], + "src": "31:690:13" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnable {\n function acceptOwnership() external;\n\n function nominateNewOwner(address newNominatedOwner) external;\n\n function renounceNomination() external;\n\n function owner() external view returns (address);\n\n function nominatedOwner() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "exportedSymbols": { + "IOwnable": [ + 220 + ] + }, + "id": 221, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:10" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnable", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 220, + "linearizedBaseContracts": [ + 220 + ], + "name": "IOwnable", + "nameLocation": "66:8:10", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "79ba5097", + "id": 201, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "90:15:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 199, + "nodeType": "ParameterList", + "parameters": [], + "src": "105:2:10" + }, + "returnParameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [], + "src": "116:0:10" + }, + "scope": 220, + "src": "81:36:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1627540c", + "id": 206, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominateNewOwner", + "nameLocation": "132:16:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "157:17:10", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "149:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 202, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "148:27:10" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [], + "src": "184:0:10" + }, + "scope": 220, + "src": "123:62:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "718fe928", + "id": 209, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "200:18:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 207, + "nodeType": "ParameterList", + "parameters": [], + "src": "218:2:10" + }, + "returnParameters": { + "id": 208, + "nodeType": "ParameterList", + "parameters": [], + "src": "229:0:10" + }, + "scope": 220, + "src": "191:39:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "8da5cb5b", + "id": 214, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "245:5:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 210, + "nodeType": "ParameterList", + "parameters": [], + "src": "250:2:10" + }, + "returnParameters": { + "id": 213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 212, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 214, + "src": "276:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "275:9:10" + }, + "scope": 220, + "src": "236:49:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "53a47bb7", + "id": 219, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "300:14:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:2:10" + }, + "returnParameters": { + "id": 218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 219, + "src": "340:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 216, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "340:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "339:9:10" + }, + "scope": 220, + "src": "291:58:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 221, + "src": "56:295:10", + "usedErrors": [] + } + ], + "src": "31:321:10" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract OwnableStorage {\n struct OwnableStore {\n bool initialized;\n address owner;\n address nominatedOwner;\n }\n\n function _ownableStore() internal pure returns (OwnableStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ownable\")) - 1)\n store.slot := 0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "exportedSymbols": { + "OwnableStorage": [ + 494 + ] + }, + "id": 495, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 478, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "OwnableStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 494, + "linearizedBaseContracts": [ + 494 + ], + "name": "OwnableStorage", + "nameLocation": "65:14:14", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "OwnableStorage.OwnableStore", + "id": 485, + "members": [ + { + "constant": false, + "id": 480, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "121:11:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "116:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 479, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "116:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 482, + "mutability": "mutable", + "name": "owner", + "nameLocation": "150:5:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "142:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "142:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "nominatedOwner", + "nameLocation": "173:14:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "165:22:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "165:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "OwnableStore", + "nameLocation": "93:12:14", + "nodeType": "StructDefinition", + "scope": 494, + "src": "86:108:14", + "visibility": "public" + }, + { + "body": { + "id": 492, + "nodeType": "Block", + "src": "276:197:14", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "295:172:14", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "377:80:14", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "391:66:14", + "type": "", + "value": "0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "377:10:14" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 489, + "isOffset": false, + "isSlot": true, + "src": "377:10:14", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 491, + "nodeType": "InlineAssembly", + "src": "286:181:14" + } + ] + }, + "id": 493, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ownableStore", + "nameLocation": "209:13:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "222:2:14" + }, + "returnParameters": { + "id": 490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 489, + "mutability": "mutable", + "name": "store", + "nameLocation": "269:5:14", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "248:26:14", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 488, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 487, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "248:12:14" + }, + "referencedDeclaration": 485, + "src": "248:12:14", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "src": "247:28:14" + }, + "scope": 494, + "src": "200:273:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 495, + "src": "56:419:14", + "usedErrors": [] + } + ], + "src": "31:445:14" + } + }, + "@synthetixio/core-contracts/contracts/errors/AccessError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AccessError {\n error Unauthorized(address addr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ] + }, + "id": 7, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 6, + "linearizedBaseContracts": [ + 6 + ], + "name": "AccessError", + "nameLocation": "64:11:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "Unauthorized", + "nameLocation": "88:12:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "addr", + "nameLocation": "109:4:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "101:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "101:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "100:14:0" + }, + "src": "82:33:0" + } + ], + "scope": 7, + "src": "56:61:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "31:87:0" + } + }, + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IOwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is Ownable, IOwnerModule, InitializableMixin {\n function _isInitialized() internal view override returns (bool) {\n return _ownableStore().initialized;\n }\n\n function isOwnerModuleInitialized() external view override returns (bool) {\n return _isInitialized();\n }\n\n function initializeOwnerModule(address initialOwner) external override onlyIfNotInitialized {\n nominateNewOwner(initialOwner);\n acceptOwnership();\n\n _ownableStore().initialized = true;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "IOwnerModule": [ + 2791 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "OwnerModule": [ + 4196 + ] + }, + "id": 4197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4143, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:31" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 4144, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 415, + "src": "56:69:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 4145, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 69, + "src": "126:84:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "file": "../interfaces/IOwnerModule.sol", + "id": 4146, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 2792, + "src": "211:40:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4147, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "322:7:31" + }, + "id": 4148, + "nodeType": "InheritanceSpecifier", + "src": "322:7:31" + }, + { + "baseName": { + "id": 4149, + "name": "IOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2791, + "src": "331:12:31" + }, + "id": 4150, + "nodeType": "InheritanceSpecifier", + "src": "331:12:31" + }, + { + "baseName": { + "id": 4151, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "345:18:31" + }, + "id": 4152, + "nodeType": "InheritanceSpecifier", + "src": "345:18:31" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4196, + "linearizedBaseContracts": [ + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "307:11:31", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 4162, + "nodeType": "Block", + "src": "434:51:31", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4158, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "451:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "451:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4157, + "id": 4161, + "nodeType": "Return", + "src": "444:34:31" + } + ] + }, + "id": 4163, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "379:14:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4154, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:31" + }, + "parameters": { + "id": 4153, + "nodeType": "ParameterList", + "parameters": [], + "src": "393:2:31" + }, + "returnParameters": { + "id": 4157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4156, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4163, + "src": "428:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "428:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "427:6:31" + }, + "scope": 4196, + "src": "370:115:31", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2790 + ], + "body": { + "id": 4172, + "nodeType": "Block", + "src": "565:40:31", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4169, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4163 + ], + "referencedDeclaration": 4163, + "src": "582:14:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:16:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4168, + "id": 4171, + "nodeType": "Return", + "src": "575:23:31" + } + ] + }, + "functionSelector": "35eb2824", + "id": 4173, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "500:24:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4165, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "541:8:31" + }, + "parameters": { + "id": 4164, + "nodeType": "ParameterList", + "parameters": [], + "src": "524:2:31" + }, + "returnParameters": { + "id": 4168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4167, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4173, + "src": "559:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4166, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "559:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "558:6:31" + }, + "scope": 4196, + "src": "491:114:31", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2785 + ], + "body": { + "id": 4194, + "nodeType": "Block", + "src": "703:119:31", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4182, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4175, + "src": "730:12:31", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4181, + "name": "nominateNewOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "713:16:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "713:30:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4184, + "nodeType": "ExpressionStatement", + "src": "713:30:31" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4185, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "753:15:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "753:17:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4187, + "nodeType": "ExpressionStatement", + "src": "753:17:31" + }, + { + "expression": { + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4188, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "781:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "781:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4190, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "781:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 4191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "811:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "781:34:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4193, + "nodeType": "ExpressionStatement", + "src": "781:34:31" + } + ] + }, + "functionSelector": "624bd96d", + "id": 4195, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4179, + "kind": "modifierInvocation", + "modifierName": { + "id": 4178, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "682:20:31" + }, + "nodeType": "ModifierInvocation", + "src": "682:20:31" + } + ], + "name": "initializeOwnerModule", + "nameLocation": "620:21:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "673:8:31" + }, + "parameters": { + "id": 4176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4175, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "650:12:31", + "nodeType": "VariableDeclaration", + "scope": 4195, + "src": "642:20:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "642:7:31", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "641:22:31" + }, + "returnParameters": { + "id": 4180, + "nodeType": "ParameterList", + "parameters": [], + "src": "703:0:31" + }, + "scope": 4196, + "src": "611:211:31", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4197, + "src": "298:526:31", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:794:31" + } + }, + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../errors/InitError.sol\";\n\nabstract contract InitializableMixin {\n modifier onlyIfInitialized() {\n if (!_isInitialized()) {\n revert InitError.NotInitialized();\n }\n\n _;\n }\n\n modifier onlyIfNotInitialized() {\n if (_isInitialized()) {\n revert InitError.AlreadyInitialized();\n }\n\n _;\n }\n\n function _isInitialized() internal view virtual returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "exportedSymbols": { + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ] + }, + "id": 69, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 34, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:5" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 35, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 69, + "sourceUnit": 33, + "src": "56:33:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "InitializableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 68, + "linearizedBaseContracts": [ + 68 + ], + "name": "InitializableMixin", + "nameLocation": "109:18:5", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 48, + "nodeType": "Block", + "src": "163:109:5", + "statements": [ + { + "condition": { + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "177:17:5", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 37, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "178:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "178:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 46, + "nodeType": "IfStatement", + "src": "173:81:5", + "trueBody": { + "id": 45, + "nodeType": "Block", + "src": "196:58:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 40, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "217:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "217:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "217:26:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 44, + "nodeType": "RevertStatement", + "src": "210:33:5" + } + ] + } + }, + { + "id": 47, + "nodeType": "PlaceholderStatement", + "src": "264:1:5" + } + ] + }, + "id": 49, + "name": "onlyIfInitialized", + "nameLocation": "143:17:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 36, + "nodeType": "ParameterList", + "parameters": [], + "src": "160:2:5" + }, + "src": "134:138:5", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "310:112:5", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "324:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59, + "nodeType": "IfStatement", + "src": "320:84:5", + "trueBody": { + "id": 58, + "nodeType": "Block", + "src": "342:62:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 53, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "363:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "363:28:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "363:30:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 57, + "nodeType": "RevertStatement", + "src": "356:37:5" + } + ] + } + }, + { + "id": 60, + "nodeType": "PlaceholderStatement", + "src": "414:1:5" + } + ] + }, + "id": 62, + "name": "onlyIfNotInitialized", + "nameLocation": "287:20:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "307:2:5" + }, + "src": "278:144:5", + "virtual": false, + "visibility": "internal" + }, + { + "id": 67, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "437:14:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "451:2:5" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "485:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "485:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "484:6:5" + }, + "scope": 68, + "src": "428:63:5", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 69, + "src": "91:402:5", + "usedErrors": [] + } + ], + "src": "31:463:5" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnerModule {\n function initializeOwnerModule(address initialOwner) external;\n\n function isOwnerModuleInitialized() external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "exportedSymbols": { + "IOwnerModule": [ + 2791 + ] + }, + "id": 2792, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2780, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:28" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnerModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2791, + "linearizedBaseContracts": [ + 2791 + ], + "name": "IOwnerModule", + "nameLocation": "66:12:28", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "624bd96d", + "id": 2785, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeOwnerModule", + "nameLocation": "94:21:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2783, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2782, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "124:12:28", + "nodeType": "VariableDeclaration", + "scope": 2785, + "src": "116:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "116:7:28", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "115:22:28" + }, + "returnParameters": { + "id": 2784, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:28" + }, + "scope": 2791, + "src": "85:62:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "35eb2824", + "id": 2790, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "162:24:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "186:2:28" + }, + "returnParameters": { + "id": 2789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2790, + "src": "212:4:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2787, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "212:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "211:6:28" + }, + "scope": 2791, + "src": "153:65:28", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2792, + "src": "56:164:28", + "usedErrors": [] + } + ], + "src": "31:190:28" + } + }, + "@synthetixio/core-contracts/contracts/errors/InitError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary InitError {\n error AlreadyInitialized();\n error NotInitialized();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "exportedSymbols": { + "InitError": [ + 32 + ] + }, + "id": 33, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 27, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "InitError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 32, + "linearizedBaseContracts": [ + 32 + ], + "name": "InitError", + "nameLocation": "64:9:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 29, + "name": "AlreadyInitialized", + "nameLocation": "86:18:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [], + "src": "104:2:4" + }, + "src": "80:27:4" + }, + { + "id": 31, + "name": "NotInitialized", + "nameLocation": "118:14:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:4" + }, + "src": "112:23:4" + } + ], + "scope": 33, + "src": "56:81:4", + "usedErrors": [ + 29, + 31 + ] + } + ], + "src": "31:107:4" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IERC721.sol\";\nimport \"../interfaces/IERC721Metadata.sol\";\nimport \"../interfaces/IERC721Receiver.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/AccessError.sol\";\nimport \"../errors/InitError.sol\";\nimport \"./ERC721Storage.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"../utils/StringUtil.sol\";\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol\n*/\n\ncontract ERC721 is IERC721, IERC721Metadata, ERC721Storage {\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n error CannotSelfApprove(address);\n error InvalidTransferRecipient(address);\n error TokenDoesNotExist(uint256);\n error TokenAlreadyMinted(uint256);\n\n function _initialize(\n string memory tokenName,\n string memory tokenSymbol,\n string memory baseTokenURI\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (bytes(store.name).length > 0 || bytes(store.symbol).length > 0 || bytes(store.baseTokenURI).length > 0) {\n revert InitError.AlreadyInitialized();\n }\n\n store.name = tokenName;\n store.symbol = tokenSymbol;\n store.baseTokenURI = baseTokenURI;\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return\n interfaceId == this.supportsInterface.selector || // ERC165\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId;\n }\n\n function balanceOf(address holder) public view virtual override returns (uint) {\n if (holder == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n return _erc721Store().balanceOf[holder];\n }\n\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().ownerOf[tokenId];\n }\n\n function name() external view virtual override returns (string memory) {\n return _erc721Store().name;\n }\n\n function symbol() external view virtual override returns (string memory) {\n return _erc721Store().symbol;\n }\n\n function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n string memory baseURI = _erc721Store().baseTokenURI;\n\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, StringUtil.uintToString(tokenId))) : \"\";\n }\n\n function approve(address to, uint256 tokenId) public virtual override {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n if (to == holder) {\n revert CannotSelfApprove(to);\n }\n\n if (msg.sender != holder && !isApprovedForAll(holder, msg.sender)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _approve(to, tokenId);\n }\n\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().tokenApprovals[tokenId];\n }\n\n function setApprovalForAll(address operator, bool approved) public virtual override {\n if (msg.sender == operator) {\n revert CannotSelfApprove(operator);\n }\n\n _erc721Store().operatorApprovals[msg.sender][operator] = approved;\n\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n function isApprovedForAll(address holder, address operator) public view virtual override returns (bool) {\n return _erc721Store().operatorApprovals[holder][operator];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n if (!_checkOnERC721Received(from, to, tokenId, data)) {\n revert InvalidTransferRecipient(to);\n }\n }\n\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _erc721Store().ownerOf[tokenId] != address(0);\n }\n\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address holder = ownerOf(tokenId);\n\n // Not checking tokenId existence since it is checked in ownerOf() and getApproved()\n\n return (spender == holder || getApproved(tokenId) == spender || isApprovedForAll(holder, spender));\n }\n\n function _mint(address to, uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (_exists(tokenId)) {\n revert TokenAlreadyMinted(tokenId);\n }\n\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n function _burn(uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n _approve(address(0), tokenId);\n\n store.balanceOf[holder] -= 1;\n delete store.ownerOf[tokenId];\n\n emit Transfer(holder, address(0), tokenId);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n\n if (ownerOf(tokenId) != from) {\n revert AccessError.Unauthorized(from);\n }\n\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n // Clear approvals from the previous holder\n _approve(address(0), tokenId);\n\n store.balanceOf[from] -= 1;\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n function _approve(address to, uint256 tokenId) internal virtual {\n _erc721Store().tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (AddressUtil.isContract(to)) {\n try IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch {\n return false;\n }\n } else {\n return true;\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "InitError": [ + 32 + ], + "StringUtil": [ + 2369 + ] + }, + "id": 1642, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 818, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:19" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "file": "../interfaces/IERC721.sol", + "id": 819, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 158, + "src": "56:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "file": "../interfaces/IERC721Metadata.sol", + "id": 820, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 181, + "src": "92:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "file": "../interfaces/IERC721Receiver.sol", + "id": 821, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 197, + "src": "136:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 822, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 16, + "src": "180:36:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 823, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 7, + "src": "217:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 824, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 33, + "src": "253:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "file": "./ERC721Storage.sol", + "id": 825, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1678, + "src": "287:29:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 826, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1697, + "src": "317:34:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "file": "../utils/StringUtil.sol", + "id": 827, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 2370, + "src": "352:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 828, + "name": "IERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 157, + "src": "566:7:19" + }, + "id": 829, + "nodeType": "InheritanceSpecifier", + "src": "566:7:19" + }, + { + "baseName": { + "id": 830, + "name": "IERC721Metadata", + "nodeType": "IdentifierPath", + "referencedDeclaration": 180, + "src": "575:15:19" + }, + "id": 831, + "nodeType": "InheritanceSpecifier", + "src": "575:15:19" + }, + { + "baseName": { + "id": 832, + "name": "ERC721Storage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1677, + "src": "592:13:19" + }, + "id": 833, + "nodeType": "InheritanceSpecifier", + "src": "592:13:19" + } + ], + "canonicalName": "ERC721", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1641, + "linearizedBaseContracts": [ + 1641, + 1677, + 180, + 157, + 78 + ], + "name": "ERC721", + "nameLocation": "556:6:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 841, + "name": "Transfer", + "nameLocation": "618:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 835, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "643:4:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "627:20:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 834, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "627:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 837, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "665:2:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "649:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 839, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "685:7:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "669:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "626:67:19" + }, + "src": "612:82:19" + }, + { + "anonymous": false, + "id": 849, + "name": "Approval", + "nameLocation": "705:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 843, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "730:5:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "714:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 845, + "indexed": true, + "mutability": "mutable", + "name": "approved", + "nameLocation": "753:8:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "737:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 844, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "737:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 847, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "763:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "763:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "713:74:19" + }, + "src": "699:89:19" + }, + { + "anonymous": false, + "id": 857, + "name": "ApprovalForAll", + "nameLocation": "799:14:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 851, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "830:5:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "814:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "814:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 853, + "indexed": true, + "mutability": "mutable", + "name": "operator", + "nameLocation": "853:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "837:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 852, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 855, + "indexed": false, + "mutability": "mutable", + "name": "approved", + "nameLocation": "868:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "863:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 854, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "863:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "813:64:19" + }, + "src": "793:85:19" + }, + { + "id": 861, + "name": "CannotSelfApprove", + "nameLocation": "890:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 859, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 861, + "src": "908:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "908:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "907:9:19" + }, + "src": "884:33:19" + }, + { + "id": 865, + "name": "InvalidTransferRecipient", + "nameLocation": "928:24:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 865, + "src": "953:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "953:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "952:9:19" + }, + "src": "922:40:19" + }, + { + "id": 869, + "name": "TokenDoesNotExist", + "nameLocation": "973:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "991:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "991:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "990:9:19" + }, + "src": "967:33:19" + }, + { + "id": 873, + "name": "TokenAlreadyMinted", + "nameLocation": "1011:18:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1030:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1030:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1029:9:19" + }, + "src": "1005:34:19" + }, + { + "body": { + "id": 939, + "nodeType": "Block", + "src": "1193:350:19", + "statements": [ + { + "assignments": [ + 884 + ], + "declarations": [ + { + "constant": false, + "id": 884, + "mutability": "mutable", + "name": "store", + "nameLocation": "1223:5:19", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "1203:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 883, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 882, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "1203:11:19" + }, + "referencedDeclaration": 1668, + "src": "1203:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 887, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 885, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "1231:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1203:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 890, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1265:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1265:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1259:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 888, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1259:5:19", + "typeDescriptions": {} + } + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1259:17:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1259:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1286:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1259:28:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 898, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1297:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 899, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1297:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1291:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 896, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1291:5:19", + "typeDescriptions": {} + } + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1291:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1291:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1320:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1291:30:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:62:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 907, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1331:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1331:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1325:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 905, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1325:5:19", + "typeDescriptions": {} + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1325:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1325:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1360:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1325:36:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:102:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 920, + "nodeType": "IfStatement", + "src": "1255:170:19", + "trueBody": { + "id": 919, + "nodeType": "Block", + "src": "1363:62:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 914, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1384:9:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "1384:28:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1384:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 918, + "nodeType": "RevertStatement", + "src": "1377:37:19" + } + ] + } + }, + { + "expression": { + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 921, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1435:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1435:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 924, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 875, + "src": "1448:9:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1435:22:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 926, + "nodeType": "ExpressionStatement", + "src": "1435:22:19" + }, + { + "expression": { + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 927, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1467:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1467:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 930, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "1482:11:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1467:26:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 932, + "nodeType": "ExpressionStatement", + "src": "1467:26:19" + }, + { + "expression": { + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 933, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1503:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1503:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 936, + "name": "baseTokenURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "1524:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1503:33:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "1503:33:19" + } + ] + }, + "id": 940, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initialize", + "nameLocation": "1054:11:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 875, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "1089:9:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1075:23:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 874, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1075:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "1122:11:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1108:25:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 876, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1108:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 879, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "1157:12:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1143:26:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 878, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1143:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1065:110:19" + }, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [], + "src": "1193:0:19" + }, + "scope": 1641, + "src": "1045:498:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 77 + ], + "body": { + "id": 968, + "nodeType": "Block", + "src": "1640:212:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 948, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1669:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 949, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1684:4:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721_$1641", + "typeString": "contract ERC721" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 969, + "src": "1684:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1684:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1669:46:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 953, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1741:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 955, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "1761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + ], + "id": 954, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1756:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1756:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721_$157", + "typeString": "type(contract IERC721)" + } + }, + "id": 957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1756:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1741:40:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:112:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 960, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1797:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 962, + "name": "IERC721Metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 180, + "src": "1817:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + ], + "id": 961, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1812:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1812:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721Metadata_$180", + "typeString": "type(contract IERC721Metadata)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1812:33:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1797:48:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:176:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 947, + "id": 967, + "nodeType": "Return", + "src": "1650:195:19" + } + ] + }, + "functionSelector": "01ffc9a7", + "id": 969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "1558:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 944, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1616:8:19" + }, + "parameters": { + "id": 943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 942, + "mutability": "mutable", + "name": "interfaceId", + "nameLocation": "1583:11:19", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1576:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 941, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1576:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "1575:20:19" + }, + "returnParameters": { + "id": 947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1634:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 945, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1634:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1633:6:19" + }, + "scope": 1641, + "src": "1549:303:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 90 + ], + "body": { + "id": 996, + "nodeType": "Block", + "src": "1937:150:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 977, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "1951:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1969:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1961:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1961:7:19", + "typeDescriptions": {} + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1961:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1951:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 989, + "nodeType": "IfStatement", + "src": "1947:84:19", + "trueBody": { + "id": 988, + "nodeType": "Block", + "src": "1973:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 983, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1994:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1994:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 987, + "nodeType": "RevertStatement", + "src": "1987:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 990, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2048:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2048:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "2048:24:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 994, + "indexExpression": { + "id": 993, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2073:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2048:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 976, + "id": 995, + "nodeType": "Return", + "src": "2041:39:19" + } + ] + }, + "functionSelector": "70a08231", + "id": 997, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "1867:9:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 973, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1913:8:19" + }, + "parameters": { + "id": 972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 971, + "mutability": "mutable", + "name": "holder", + "nameLocation": "1885:6:19", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1877:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1877:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1876:16:19" + }, + "returnParameters": { + "id": 976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 975, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1931:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 974, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1931:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1930:6:19" + }, + "scope": 1641, + "src": "1858:229:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 97 + ], + "body": { + "id": 1021, + "nodeType": "Block", + "src": "2174:146:19", + "statements": [ + { + "condition": { + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2188:17:19", + "subExpression": { + "arguments": [ + { + "id": 1006, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2197:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1005, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2189:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1014, + "nodeType": "IfStatement", + "src": "2184:81:19", + "trueBody": { + "id": 1013, + "nodeType": "Block", + "src": "2207:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1010, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2246:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1009, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2228:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2228:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1012, + "nodeType": "RevertStatement", + "src": "2221:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1015, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2282:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2282:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "2282:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1019, + "indexExpression": { + "id": 1018, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2305:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2282:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1004, + "id": 1020, + "nodeType": "Return", + "src": "2275:38:19" + } + ] + }, + "functionSelector": "6352211e", + "id": 1022, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "2102:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1001, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2147:8:19" + }, + "parameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 999, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2118:7:19", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2110:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2110:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2109:17:19" + }, + "returnParameters": { + "id": 1004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2165:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1002, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2165:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2164:9:19" + }, + "scope": 1641, + "src": "2093:227:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 167 + ], + "body": { + "id": 1032, + "nodeType": "Block", + "src": "2397:43:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1028, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2414:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2414:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "2414:19:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1027, + "id": 1031, + "nodeType": "Return", + "src": "2407:26:19" + } + ] + }, + "functionSelector": "06fdde03", + "id": 1033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "2335:4:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1024, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2364:8:19" + }, + "parameters": { + "id": 1023, + "nodeType": "ParameterList", + "parameters": [], + "src": "2339:2:19" + }, + "returnParameters": { + "id": 1027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1026, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1033, + "src": "2382:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1025, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2382:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2381:15:19" + }, + "scope": 1641, + "src": "2326:114:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 172 + ], + "body": { + "id": 1043, + "nodeType": "Block", + "src": "2519:45:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1039, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2536:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1041, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "2536:21:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1038, + "id": 1042, + "nodeType": "Return", + "src": "2529:28:19" + } + ] + }, + "functionSelector": "95d89b41", + "id": 1044, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "2455:6:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1035, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2486:8:19" + }, + "parameters": { + "id": 1034, + "nodeType": "ParameterList", + "parameters": [], + "src": "2461:2:19" + }, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1037, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1044, + "src": "2504:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2504:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2503:15:19" + }, + "scope": 1641, + "src": "2446:118:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 179 + ], + "body": { + "id": 1089, + "nodeType": "Block", + "src": "2660:277:19", + "statements": [ + { + "condition": { + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2674:17:19", + "subExpression": { + "arguments": [ + { + "id": 1053, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2683:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1052, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2675:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2675:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1061, + "nodeType": "IfStatement", + "src": "2670:81:19", + "trueBody": { + "id": 1060, + "nodeType": "Block", + "src": "2693:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1057, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2732:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1056, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2714:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2714:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1059, + "nodeType": "RevertStatement", + "src": "2707:33:19" + } + ] + } + }, + { + "assignments": [ + 1063 + ], + "declarations": [ + { + "constant": false, + "id": 1063, + "mutability": "mutable", + "name": "baseURI", + "nameLocation": "2775:7:19", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "2761:21:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1062, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2761:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 1067, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1064, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2785:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2785:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "2785:27:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2761:51:19" + }, + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 1070, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2836:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2830:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1068, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2830:5:19", + "typeDescriptions": {} + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2830:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2830:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2854:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2830:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "", + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "id": 1087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2830:100:19", + "trueExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1079, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2882:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "id": 1082, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2915:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1080, + "name": "StringUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "2891:10:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_StringUtil_$2369_$", + "typeString": "type(library StringUtil)" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uintToString", + "nodeType": "MemberAccess", + "referencedDeclaration": 2368, + "src": "2891:23:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2891:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1077, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2865:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2865:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2865:59:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2858:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 1075, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2858:6:19", + "typeDescriptions": {} + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2858:67:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1051, + "id": 1088, + "nodeType": "Return", + "src": "2823:107:19" + } + ] + }, + "functionSelector": "c87b56dd", + "id": 1090, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "2579:8:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1048, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2627:8:19" + }, + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1046, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2596:7:19", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2588:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2588:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2587:17:19" + }, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2645:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2645:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2644:15:19" + }, + "scope": 1641, + "src": "2570:367:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 133 + ], + "body": { + "id": 1145, + "nodeType": "Block", + "src": "3013:366:19", + "statements": [ + { + "assignments": [ + 1100 + ], + "declarations": [ + { + "constant": false, + "id": 1100, + "mutability": "mutable", + "name": "store", + "nameLocation": "3043:5:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3023:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1098, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "3023:11:19" + }, + "referencedDeclaration": 1668, + "src": "3023:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1103, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1101, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3051:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3023:42:19" + }, + { + "assignments": [ + 1105 + ], + "declarations": [ + { + "constant": false, + "id": 1105, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3083:6:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3075:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3075:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1110, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1106, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1100, + "src": "3092:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "3092:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1109, + "indexExpression": { + "id": 1108, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3106:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3092:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3075:39:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1111, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3129:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1112, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3135:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3129:12:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1119, + "nodeType": "IfStatement", + "src": "3125:71:19", + "trueBody": { + "id": 1118, + "nodeType": "Block", + "src": "3143:53:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1115, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3182:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1114, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3164:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1117, + "nodeType": "RevertStatement", + "src": "3157:28:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3210:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3210:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1122, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3224:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3210:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3234:37:19", + "subExpression": { + "arguments": [ + { + "id": 1125, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3252:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1126, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3260:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3260:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "3235:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3210:61:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1139, + "nodeType": "IfStatement", + "src": "3206:135:19", + "trueBody": { + "id": 1138, + "nodeType": "Block", + "src": "3273:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1134, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3319:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3319:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1131, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "3294:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "3294:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3294:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1137, + "nodeType": "RevertStatement", + "src": "3287:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1141, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3360:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1142, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3364:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1140, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "3351:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3351:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1144, + "nodeType": "ExpressionStatement", + "src": "3351:21:19" + } + ] + }, + "functionSelector": "095ea7b3", + "id": 1146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2952:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3004:8:19" + }, + "parameters": { + "id": 1095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "mutability": "mutable", + "name": "to", + "nameLocation": "2968:2:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2960:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2960:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1094, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2980:7:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2972:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2972:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2959:29:19" + }, + "returnParameters": { + "id": 1097, + "nodeType": "ParameterList", + "parameters": [], + "src": "3013:0:19" + }, + "scope": 1641, + "src": "2943:436:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 147 + ], + "body": { + "id": 1170, + "nodeType": "Block", + "src": "3470:153:19", + "statements": [ + { + "condition": { + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3484:17:19", + "subExpression": { + "arguments": [ + { + "id": 1155, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3493:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1154, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "3485:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3485:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1163, + "nodeType": "IfStatement", + "src": "3480:81:19", + "trueBody": { + "id": 1162, + "nodeType": "Block", + "src": "3503:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1159, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3542:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1158, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "3524:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3524:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1161, + "nodeType": "RevertStatement", + "src": "3517:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1164, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3578:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3578:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "3578:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1168, + "indexExpression": { + "id": 1167, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3608:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3578:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1153, + "id": 1169, + "nodeType": "Return", + "src": "3571:45:19" + } + ] + }, + "functionSelector": "081812fc", + "id": 1171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "3394:11:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1150, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3443:8:19" + }, + "parameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1148, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3405:17:19" + }, + "returnParameters": { + "id": 1153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1152, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3461:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3461:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3460:9:19" + }, + "scope": 1641, + "src": "3385:238:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 140 + ], + "body": { + "id": 1207, + "nodeType": "Block", + "src": "3713:241:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1179, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3727:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3727:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1181, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3741:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3727:22:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1188, + "nodeType": "IfStatement", + "src": "3723:87:19", + "trueBody": { + "id": 1187, + "nodeType": "Block", + "src": "3751:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1184, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3790:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1183, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3772:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3772:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1186, + "nodeType": "RevertStatement", + "src": "3765:34:19" + } + ] + } + }, + { + "expression": { + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1189, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3820:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3820:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "3820:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1194, + "indexExpression": { + "expression": { + "id": 1192, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3853:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3853:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3820:44:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1196, + "indexExpression": { + "id": 1195, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3865:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3820:54:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1197, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3877:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3820:65:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1199, + "nodeType": "ExpressionStatement", + "src": "3820:65:19" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 1201, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3916:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3916:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1203, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3928:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1204, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3938:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1200, + "name": "ApprovalForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 857, + "src": "3901:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,address,bool)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3901:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1206, + "nodeType": "EmitStatement", + "src": "3896:51:19" + } + ] + }, + "functionSelector": "a22cb465", + "id": 1208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "3638:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3704:8:19" + }, + "parameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1173, + "mutability": "mutable", + "name": "operator", + "nameLocation": "3664:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3656:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3656:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "mutability": "mutable", + "name": "approved", + "nameLocation": "3679:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3674:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1174, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3674:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3655:33:19" + }, + "returnParameters": { + "id": 1178, + "nodeType": "ParameterList", + "parameters": [], + "src": "3713:0:19" + }, + "scope": 1641, + "src": "3629:325:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 156 + ], + "body": { + "id": 1226, + "nodeType": "Block", + "src": "4064:74:19", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1218, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "4081:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4081:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "4081:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1222, + "indexExpression": { + "id": 1221, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "4114:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:40:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1224, + "indexExpression": { + "id": 1223, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "4122:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:50:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1217, + "id": 1225, + "nodeType": "Return", + "src": "4074:57:19" + } + ] + }, + "functionSelector": "e985e9c5", + "id": 1227, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "3969:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1214, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4040:8:19" + }, + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3994:6:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "3986:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1209, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3986:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "mutability": "mutable", + "name": "operator", + "nameLocation": "4010:8:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4002:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4002:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3985:34:19" + }, + "returnParameters": { + "id": 1217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1216, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4058:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1215, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4058:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4057:6:19" + }, + "scope": 1641, + "src": "3960:178:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 126 + ], + "body": { + "id": 1258, + "nodeType": "Block", + "src": "4263:169:19", + "statements": [ + { + "condition": { + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4277:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1238, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4297:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4297:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1240, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4309:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1237, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4278:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4278:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1251, + "nodeType": "IfStatement", + "src": "4273:114:19", + "trueBody": { + "id": 1250, + "nodeType": "Block", + "src": "4319:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1246, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4365:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4365:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1243, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4340:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4340:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4340:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1249, + "nodeType": "RevertStatement", + "src": "4333:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1253, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1229, + "src": "4407:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1254, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "4413:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1255, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4417:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1252, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4397:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4397:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1257, + "nodeType": "ExpressionStatement", + "src": "4397:28:19" + } + ] + }, + "functionSelector": "23b872dd", + "id": 1259, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "4153:12:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1235, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4254:8:19" + }, + "parameters": { + "id": 1234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1229, + "mutability": "mutable", + "name": "from", + "nameLocation": "4183:4:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4175:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4175:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "to", + "nameLocation": "4205:2:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4197:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1230, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4197:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1233, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4225:7:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4217:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1232, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4217:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4165:73:19" + }, + "returnParameters": { + "id": 1236, + "nodeType": "ParameterList", + "parameters": [], + "src": "4263:0:19" + }, + "scope": 1641, + "src": "4144:288:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 117 + ], + "body": { + "id": 1276, + "nodeType": "Block", + "src": "4561:56:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1270, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "4588:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1271, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "4594:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1272, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4598:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4607:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 1269, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1277, + 1324 + ], + "referencedDeclaration": 1324, + "src": "4571:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1275, + "nodeType": "ExpressionStatement", + "src": "4571:39:19" + } + ] + }, + "functionSelector": "42842e0e", + "id": 1277, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4447:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1267, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4552:8:19" + }, + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1261, + "mutability": "mutable", + "name": "from", + "nameLocation": "4481:4:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4473:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1260, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4473:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "mutability": "mutable", + "name": "to", + "nameLocation": "4503:2:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4495:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4495:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4523:7:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4515:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4515:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4463:73:19" + }, + "returnParameters": { + "id": 1268, + "nodeType": "ParameterList", + "parameters": [], + "src": "4561:0:19" + }, + "scope": 1641, + "src": "4438:179:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 108 + ], + "body": { + "id": 1323, + "nodeType": "Block", + "src": "4773:292:19", + "statements": [ + { + "condition": { + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4787:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1290, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4807:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4807:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1292, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4819:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1289, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4788:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4788:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1303, + "nodeType": "IfStatement", + "src": "4783:114:19", + "trueBody": { + "id": 1302, + "nodeType": "Block", + "src": "4829:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1298, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4875:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4875:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1295, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4850:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4850:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4850:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1301, + "nodeType": "RevertStatement", + "src": "4843:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1305, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4917:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1306, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4923:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1307, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1304, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4907:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4907:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1309, + "nodeType": "ExpressionStatement", + "src": "4907:28:19" + }, + { + "condition": { + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4949:48:19", + "subExpression": { + "arguments": [ + { + "id": 1311, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4973:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1312, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4979:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1313, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4983:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1314, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "4992:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1310, + "name": "_checkOnERC721Received", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1640, + "src": "4950:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4950:47:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1322, + "nodeType": "IfStatement", + "src": "4945:114:19", + "trueBody": { + "id": 1321, + "nodeType": "Block", + "src": "4999:60:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1318, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "5045:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1317, + "name": "InvalidTransferRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 865, + "src": "5020:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5020:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1320, + "nodeType": "RevertStatement", + "src": "5013:35:19" + } + ] + } + } + ] + }, + "functionSelector": "b88d4fde", + "id": 1324, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4632:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1287, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4764:8:19" + }, + "parameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1279, + "mutability": "mutable", + "name": "from", + "nameLocation": "4666:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4658:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1281, + "mutability": "mutable", + "name": "to", + "nameLocation": "4688:2:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4680:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1280, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4680:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1283, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4708:7:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4700:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4700:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1285, + "mutability": "mutable", + "name": "data", + "nameLocation": "4738:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4725:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1284, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4725:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4648:100:19" + }, + "returnParameters": { + "id": 1288, + "nodeType": "ParameterList", + "parameters": [], + "src": "4773:0:19" + }, + "scope": 1641, + "src": "4623:442:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 1342, + "nodeType": "Block", + "src": "5142:69:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1331, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5159:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5159:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5159:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1335, + "indexExpression": { + "id": 1334, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "5182:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5159:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5202:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5194:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5194:7:19", + "typeDescriptions": {} + } + }, + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5194:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5159:45:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1330, + "id": 1341, + "nodeType": "Return", + "src": "5152:52:19" + } + ] + }, + "id": 1343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_exists", + "nameLocation": "5080:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1326, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5096:7:19", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5088:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5088:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5087:17:19" + }, + "returnParameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5136:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1328, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5135:6:19" + }, + "scope": 1641, + "src": "5071:140:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1374, + "nodeType": "Block", + "src": "5316:253:19", + "statements": [ + { + "assignments": [ + 1353 + ], + "declarations": [ + { + "constant": false, + "id": 1353, + "mutability": "mutable", + "name": "holder", + "nameLocation": "5334:6:19", + "nodeType": "VariableDeclaration", + "scope": 1374, + "src": "5326:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1352, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5326:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1357, + "initialValue": { + "arguments": [ + { + "id": 1355, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5351:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1354, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "5343:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5343:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5326:33:19" + }, + { + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1358, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5472:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1359, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5483:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5472:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1362, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5505:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1361, + "name": "getApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5493:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5493:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1364, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5517:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5493:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:52:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 1368, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5545:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1369, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5553:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1367, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "5528:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5528:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:89:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5471:91:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1351, + "id": 1373, + "nodeType": "Return", + "src": "5464:98:19" + } + ] + }, + "id": 1375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isApprovedOrOwner", + "nameLocation": "5226:18:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "mutability": "mutable", + "name": "spender", + "nameLocation": "5253:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5245:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5245:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1347, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5270:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5262:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5244:34:19" + }, + "returnParameters": { + "id": 1351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5310:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5310:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5309:6:19" + }, + "scope": 1641, + "src": "5217:352:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1435, + "nodeType": "Block", + "src": "5636:360:19", + "statements": [ + { + "assignments": [ + 1384 + ], + "declarations": [ + { + "constant": false, + "id": 1384, + "mutability": "mutable", + "name": "store", + "nameLocation": "5666:5:19", + "nodeType": "VariableDeclaration", + "scope": 1435, + "src": "5646:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1383, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1382, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "5646:11:19" + }, + "referencedDeclaration": 1668, + "src": "5646:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1385, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5674:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5674:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5646:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1388, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5702:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5716:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5708:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5708:7:19", + "typeDescriptions": {} + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5708:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5702:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1400, + "nodeType": "IfStatement", + "src": "5698:80:19", + "trueBody": { + "id": 1399, + "nodeType": "Block", + "src": "5720:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1394, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "5741:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "5741:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1398, + "nodeType": "RevertStatement", + "src": "5734:33:19" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 1402, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5800:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1401, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "5792:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1409, + "nodeType": "IfStatement", + "src": "5788:81:19", + "trueBody": { + "id": 1408, + "nodeType": "Block", + "src": "5810:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1405, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5850:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1404, + "name": "TokenAlreadyMinted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "5831:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5831:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1407, + "nodeType": "RevertStatement", + "src": "5824:34:19" + } + ] + } + }, + { + "expression": { + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1410, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5879:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1413, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "5879:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1414, + "indexExpression": { + "id": 1412, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5895:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5879:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5902:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5879:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1417, + "nodeType": "ExpressionStatement", + "src": "5879:24:19" + }, + { + "expression": { + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1418, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5913:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5913:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1422, + "indexExpression": { + "id": 1420, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5913:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1423, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5938:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5913:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1425, + "nodeType": "ExpressionStatement", + "src": "5913:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5973:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5965:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5965:7:19", + "typeDescriptions": {} + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5965:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1431, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5977:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1432, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5981:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1426, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "5956:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5956:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1434, + "nodeType": "EmitStatement", + "src": "5951:38:19" + } + ] + }, + "id": 1436, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nameLocation": "5584:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "mutability": "mutable", + "name": "to", + "nameLocation": "5598:2:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5590:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5590:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1379, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5610:7:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5602:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1378, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5602:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5589:29:19" + }, + "returnParameters": { + "id": 1381, + "nodeType": "ParameterList", + "parameters": [], + "src": "5636:0:19" + }, + "scope": 1641, + "src": "5575:421:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1485, + "nodeType": "Block", + "src": "6051:279:19", + "statements": [ + { + "assignments": [ + 1443 + ], + "declarations": [ + { + "constant": false, + "id": 1443, + "mutability": "mutable", + "name": "store", + "nameLocation": "6081:5:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6061:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1442, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1441, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6061:11:19" + }, + "referencedDeclaration": 1668, + "src": "6061:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1446, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1444, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6089:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6089:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6061:42:19" + }, + { + "assignments": [ + 1448 + ], + "declarations": [ + { + "constant": false, + "id": 1448, + "mutability": "mutable", + "name": "holder", + "nameLocation": "6121:6:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6113:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6113:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1453, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1449, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6130:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6130:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1452, + "indexExpression": { + "id": 1451, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6144:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6130:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6113:39:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6180:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6172:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1455, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6172:7:19", + "typeDescriptions": {} + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6172:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1459, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6184:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1454, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6163:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1461, + "nodeType": "ExpressionStatement", + "src": "6163:29:19" + }, + { + "expression": { + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1462, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6203:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6203:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1466, + "indexExpression": { + "id": 1464, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6219:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6203:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6230:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6203:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1469, + "nodeType": "ExpressionStatement", + "src": "6203:28:19" + }, + { + "expression": { + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6241:29:19", + "subExpression": { + "baseExpression": { + "expression": { + "id": 1470, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6248:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6248:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1473, + "indexExpression": { + "id": 1472, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6248:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1475, + "nodeType": "ExpressionStatement", + "src": "6241:29:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1477, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6295:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6311:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6303:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6303:7:19", + "typeDescriptions": {} + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6303:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1482, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6315:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1476, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6286:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6286:37:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "EmitStatement", + "src": "6281:42:19" + } + ] + }, + "id": 1486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nameLocation": "6011:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1438, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6025:7:19", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "6017:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1437, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6017:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6016:17:19" + }, + "returnParameters": { + "id": 1440, + "nodeType": "ParameterList", + "parameters": [], + "src": "6051:0:19" + }, + "scope": 1641, + "src": "6002:328:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1565, + "nodeType": "Block", + "src": "6445:494:19", + "statements": [ + { + "assignments": [ + 1497 + ], + "declarations": [ + { + "constant": false, + "id": 1497, + "mutability": "mutable", + "name": "store", + "nameLocation": "6475:5:19", + "nodeType": "VariableDeclaration", + "scope": 1565, + "src": "6455:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1496, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1495, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6455:11:19" + }, + "referencedDeclaration": 1668, + "src": "6455:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1500, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1498, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6483:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6483:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6455:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1502, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6520:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1501, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "6512:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1504, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6532:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6512:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1513, + "nodeType": "IfStatement", + "src": "6508:92:19", + "trueBody": { + "id": 1512, + "nodeType": "Block", + "src": "6538:62:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1509, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6584:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1506, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "6559:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "6559:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6559:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1511, + "nodeType": "RevertStatement", + "src": "6552:37:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1514, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6614:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6628:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6620:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6620:7:19", + "typeDescriptions": {} + } + }, + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6620:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1526, + "nodeType": "IfStatement", + "src": "6610:80:19", + "trueBody": { + "id": 1525, + "nodeType": "Block", + "src": "6632:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1520, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "6653:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "6653:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1524, + "nodeType": "RevertStatement", + "src": "6646:33:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6769:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1528, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6761:7:19", + "typeDescriptions": {} + } + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6761:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1532, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6773:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1527, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6752:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6752:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1534, + "nodeType": "ExpressionStatement", + "src": "6752:29:19" + }, + { + "expression": { + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1535, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6792:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6792:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1539, + "indexExpression": { + "id": 1537, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6808:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6792:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6792:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1542, + "nodeType": "ExpressionStatement", + "src": "6792:26:19" + }, + { + "expression": { + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1543, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6828:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6828:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1547, + "indexExpression": { + "id": 1545, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6844:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6828:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6851:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6828:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1550, + "nodeType": "ExpressionStatement", + "src": "6828:24:19" + }, + { + "expression": { + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1551, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6862:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6862:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1555, + "indexExpression": { + "id": 1553, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6876:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6862:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1556, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6887:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6862:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1558, + "nodeType": "ExpressionStatement", + "src": "6862:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1560, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6914:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1561, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6920:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1562, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6924:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1559, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6905:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6905:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1564, + "nodeType": "EmitStatement", + "src": "6900:32:19" + } + ] + }, + "id": 1566, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nameLocation": "6345:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1488, + "mutability": "mutable", + "name": "from", + "nameLocation": "6372:4:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6364:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6364:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1490, + "mutability": "mutable", + "name": "to", + "nameLocation": "6394:2:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6386:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6386:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1492, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6354:73:19" + }, + "returnParameters": { + "id": 1494, + "nodeType": "ParameterList", + "parameters": [], + "src": "6445:0:19" + }, + "scope": 1641, + "src": "6336:603:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1590, + "nodeType": "Block", + "src": "7009:121:19", + "statements": [ + { + "expression": { + "id": 1579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1573, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "7019:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7019:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1575, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "7019:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1577, + "indexExpression": { + "id": 1576, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7049:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7019:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1578, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7060:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7019:43:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1580, + "nodeType": "ExpressionStatement", + "src": "7019:43:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 1584, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7101:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1582, + "name": "ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1641, + "src": "7086:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721_$1641_$", + "typeString": "type(contract ERC721)" + } + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1022, + "src": "7086:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7086:23:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1586, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7111:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1587, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7115:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1581, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "7077:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7077:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "EmitStatement", + "src": "7072:51:19" + } + ] + }, + "id": 1591, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nameLocation": "6954:8:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1568, + "mutability": "mutable", + "name": "to", + "nameLocation": "6971:2:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6963:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6963:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1570, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6983:7:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6975:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6975:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6962:29:19" + }, + "returnParameters": { + "id": 1572, + "nodeType": "ParameterList", + "parameters": [], + "src": "7009:0:19" + }, + "scope": 1641, + "src": "6945:185:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1639, + "nodeType": "Block", + "src": "7291:355:19", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 1606, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7328:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1604, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "7305:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "7305:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7305:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1637, + "nodeType": "Block", + "src": "7604:36:19", + "statements": [ + { + "expression": { + "hexValue": "74727565", + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7625:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1603, + "id": 1636, + "nodeType": "Return", + "src": "7618:11:19" + } + ] + }, + "id": 1638, + "nodeType": "IfStatement", + "src": "7301:339:19", + "trueBody": { + "id": 1634, + "nodeType": "Block", + "src": "7333:265:19", + "statements": [ + { + "clauses": [ + { + "block": { + "id": 1627, + "nodeType": "Block", + "src": "7445:91:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1621, + "name": "retval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1619, + "src": "7470:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 1622, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7480:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7480:32:19", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function IERC721Receiver.onERC721Received(address,address,uint256,bytes memory) returns (bytes4)" + } + }, + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7480:41:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "7470:51:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1603, + "id": 1626, + "nodeType": "Return", + "src": "7463:58:19" + } + ] + }, + "errorName": "", + "id": 1628, + "nodeType": "TryCatchClause", + "parameters": { + "id": 1620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1619, + "mutability": "mutable", + "name": "retval", + "nameLocation": "7437:6:19", + "nodeType": "VariableDeclaration", + "scope": 1628, + "src": "7430:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1618, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "7430:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "7429:15:19" + }, + "src": "7421:115:19" + }, + { + "block": { + "id": 1631, + "nodeType": "Block", + "src": "7543:45:19", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7568:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1603, + "id": 1630, + "nodeType": "Return", + "src": "7561:12:19" + } + ] + }, + "errorName": "", + "id": 1632, + "nodeType": "TryCatchClause", + "src": "7537:51:19" + } + ], + "externalCall": { + "arguments": [ + { + "expression": { + "id": 1612, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7388:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7388:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1614, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "7400:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1615, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1597, + "src": "7406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1616, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1599, + "src": "7415:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 1609, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7367:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1608, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7351:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721Receiver_$196", + "typeString": "contract IERC721Receiver" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7351:36:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:69:19", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "id": 1633, + "nodeType": "TryStatement", + "src": "7347:241:19" + } + ] + } + } + ] + }, + "id": 1640, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOnERC721Received", + "nameLocation": "7145:22:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "from", + "nameLocation": "7185:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7177:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1592, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7177:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "to", + "nameLocation": "7207:2:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7199:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1594, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7199:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1597, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "7227:7:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7219:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7219:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1599, + "mutability": "mutable", + "name": "data", + "nameLocation": "7257:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7244:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1598, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7244:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7167:100:19" + }, + "returnParameters": { + "id": 1603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1602, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7285:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1601, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7285:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7284:6:19" + }, + "scope": 1641, + "src": "7136:510:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1642, + "src": "547:7101:19", + "usedErrors": [ + 5, + 10, + 861, + 865, + 869, + 873 + ] + } + ], + "src": "31:7618:19" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721 is IERC165 {\n function balanceOf(address owner) external view returns (uint256);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function approve(address approved, uint256 tokenId) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ] + }, + "id": 158, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 80, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:7" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 81, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 158, + "sourceUnit": 79, + "src": "56:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 82, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "102:7:7" + }, + "id": 83, + "nodeType": "InheritanceSpecifier", + "src": "102:7:7" + } + ], + "canonicalName": "IERC721", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 157, + "linearizedBaseContracts": [ + 157, + 78 + ], + "name": "IERC721", + "nameLocation": "91:7:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "70a08231", + "id": 90, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "125:9:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "owner", + "nameLocation": "143:5:7", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "135:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 84, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "135:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "134:15:7" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 88, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "173:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 87, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "173:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "172:9:7" + }, + "scope": 157, + "src": "116:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6352211e", + "id": 97, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "197:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 93, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 92, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "213:7:7", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "205:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "205:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "204:17:7" + }, + "returnParameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "245:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "245:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "244:9:7" + }, + "scope": 157, + "src": "188:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "b88d4fde", + "id": 108, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "269:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 99, + "mutability": "mutable", + "name": "from", + "nameLocation": "303:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "295:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 98, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "295:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 101, + "mutability": "mutable", + "name": "to", + "nameLocation": "325:2:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "317:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "317:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "345:7:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "337:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "337:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 105, + "mutability": "mutable", + "name": "data", + "nameLocation": "377:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "362:19:7", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 104, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "362:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "285:102:7" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "396:0:7" + }, + "scope": 157, + "src": "260:137:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "42842e0e", + "id": 117, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "412:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 110, + "mutability": "mutable", + "name": "from", + "nameLocation": "446:4:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "438:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 109, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "438:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "mutability": "mutable", + "name": "to", + "nameLocation": "468:2:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "460:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 111, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 114, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "488:7:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "480:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "428:73:7" + }, + "returnParameters": { + "id": 116, + "nodeType": "ParameterList", + "parameters": [], + "src": "510:0:7" + }, + "scope": 157, + "src": "403:108:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 126, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "526:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 124, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 119, + "mutability": "mutable", + "name": "from", + "nameLocation": "556:4:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "548:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "548:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 121, + "mutability": "mutable", + "name": "to", + "nameLocation": "578:2:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "570:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 120, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "570:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "598:7:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "590:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "590:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "538:73:7" + }, + "returnParameters": { + "id": 125, + "nodeType": "ParameterList", + "parameters": [], + "src": "620:0:7" + }, + "scope": 157, + "src": "517:104:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 133, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "636:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 128, + "mutability": "mutable", + "name": "approved", + "nameLocation": "652:8:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "644:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "644:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 130, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "670:7:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "662:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "662:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "643:35:7" + }, + "returnParameters": { + "id": 132, + "nodeType": "ParameterList", + "parameters": [], + "src": "687:0:7" + }, + "scope": 157, + "src": "627:61:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a22cb465", + "id": 140, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "703:17:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 135, + "mutability": "mutable", + "name": "operator", + "nameLocation": "729:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "721:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "721:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 137, + "mutability": "mutable", + "name": "approved", + "nameLocation": "744:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "739:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 136, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "739:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "720:33:7" + }, + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:7" + }, + "scope": 157, + "src": "694:69:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "081812fc", + "id": 147, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "778:11:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 142, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "798:7:7", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "790:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 141, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "789:17:7" + }, + "returnParameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 145, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "830:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "830:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "829:9:7" + }, + "scope": 157, + "src": "769:70:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e985e9c5", + "id": 156, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "854:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "owner", + "nameLocation": "879:5:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "871:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 148, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "871:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "operator", + "nameLocation": "894:8:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "886:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "886:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "870:33:7" + }, + "returnParameters": { + "id": 155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 154, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "927:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 153, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "926:6:7" + }, + "scope": 157, + "src": "845:88:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 158, + "src": "81:854:7", + "usedErrors": [] + } + ], + "src": "31:905:7" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721Metadata is IERC165 {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721Metadata": [ + 180 + ] + }, + "id": 181, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 159, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:8" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 181, + "sourceUnit": 79, + "src": "56:23:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 161, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "110:7:8" + }, + "id": 162, + "nodeType": "InheritanceSpecifier", + "src": "110:7:8" + } + ], + "canonicalName": "IERC721Metadata", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 180, + "linearizedBaseContracts": [ + 180, + 78 + ], + "name": "IERC721Metadata", + "nameLocation": "91:15:8", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "06fdde03", + "id": 167, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "133:4:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "137:2:8" + }, + "returnParameters": { + "id": 166, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 165, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "163:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 164, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "163:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "162:15:8" + }, + "scope": 180, + "src": "124:54:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "95d89b41", + "id": 172, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "193:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:8" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 172, + "src": "225:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 169, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "225:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "224:15:8" + }, + "scope": 180, + "src": "184:56:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c87b56dd", + "id": 179, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "255:8:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 174, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "272:7:8", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "264:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "263:17:8" + }, + "returnParameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "304:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "304:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "303:15:8" + }, + "scope": 180, + "src": "246:73:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 181, + "src": "81:240:8", + "usedErrors": [] + } + ], + "src": "31:291:8" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC721Receiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes memory data\n ) external returns (bytes4);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "exportedSymbols": { + "IERC721Receiver": [ + 196 + ] + }, + "id": 197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 182, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:9" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC721Receiver", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 196, + "linearizedBaseContracts": [ + 196 + ], + "name": "IERC721Receiver", + "nameLocation": "66:15:9", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "150b7a02", + "id": 195, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "onERC721Received", + "nameLocation": "97:16:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "operator", + "nameLocation": "131:8:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "123:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "123:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 186, + "mutability": "mutable", + "name": "from", + "nameLocation": "157:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "149:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 188, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "179:7:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "171:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "171:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "data", + "nameLocation": "209:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "196:17:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 189, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "196:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "113:106:9" + }, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "238:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 192, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "238:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "237:8:9" + }, + "scope": 196, + "src": "88:158:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 197, + "src": "56:192:9", + "usedErrors": [] + } + ], + "src": "31:218:9" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ERC721Storage {\n struct ERC721Store {\n string name;\n string symbol;\n string baseTokenURI;\n mapping(uint256 => address) ownerOf;\n mapping(address => uint256) balanceOf;\n mapping(uint256 => address) tokenApprovals;\n mapping(address => mapping(address => bool)) operatorApprovals;\n }\n\n function _erc721Store() internal pure returns (ERC721Store storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ERC721\")) - 1)\n store.slot := 0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "exportedSymbols": { + "ERC721Storage": [ + 1677 + ] + }, + "id": 1678, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1643, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:20" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ERC721Storage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1677, + "linearizedBaseContracts": [ + 1677 + ], + "name": "ERC721Storage", + "nameLocation": "65:13:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ERC721Storage.ERC721Store", + "id": 1668, + "members": [ + { + "constant": false, + "id": 1645, + "mutability": "mutable", + "name": "name", + "nameLocation": "121:4:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "114:11:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "114:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1647, + "mutability": "mutable", + "name": "symbol", + "nameLocation": "142:6:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "135:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1646, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "135:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1649, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "165:12:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "158:19:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1648, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "158:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1653, + "mutability": "mutable", + "name": "ownerOf", + "nameLocation": "215:7:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "187:35:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1652, + "keyType": { + "id": 1650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "195:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "187:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "206:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1657, + "mutability": "mutable", + "name": "balanceOf", + "nameLocation": "260:9:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "232:37:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1656, + "keyType": { + "id": 1654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "240:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "232:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "251:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1661, + "mutability": "mutable", + "name": "tokenApprovals", + "nameLocation": "307:14:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "279:42:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1660, + "keyType": { + "id": 1658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "279:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "298:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1667, + "mutability": "mutable", + "name": "operatorApprovals", + "nameLocation": "376:17:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "331:62:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "typeName": { + "id": 1666, + "keyType": { + "id": 1662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "339:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "331:44:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "valueType": { + "id": 1665, + "keyType": { + "id": 1663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "350:24:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 1664, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "369:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "internal" + } + ], + "name": "ERC721Store", + "nameLocation": "92:11:20", + "nodeType": "StructDefinition", + "scope": 1677, + "src": "85:315:20", + "visibility": "public" + }, + { + "body": { + "id": 1675, + "nodeType": "Block", + "src": "480:196:20", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "499:171:20", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "580:80:20", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "594:66:20", + "type": "", + "value": "0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "580:10:20" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1672, + "isOffset": false, + "isSlot": true, + "src": "580:10:20", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 1674, + "nodeType": "InlineAssembly", + "src": "490:180:20" + } + ] + }, + "id": 1676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_erc721Store", + "nameLocation": "415:12:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1669, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:20" + }, + "returnParameters": { + "id": 1673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1672, + "mutability": "mutable", + "name": "store", + "nameLocation": "473:5:20", + "nodeType": "VariableDeclaration", + "scope": 1676, + "src": "453:25:20", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1671, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1670, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "453:11:20" + }, + "referencedDeclaration": 1668, + "src": "453:11:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "src": "452:27:20" + }, + "scope": 1677, + "src": "406:270:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1678, + "src": "56:622:20", + "usedErrors": [] + } + ], + "src": "31:648:20" + } + }, + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol\n*/\n\nlibrary StringUtil {\n function uintToString(uint value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n\n return string(buffer);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "exportedSymbols": { + "StringUtil": [ + 2369 + ] + }, + "id": 2370, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2290, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:25" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "StringUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2369, + "linearizedBaseContracts": [ + 2369 + ], + "name": "StringUtil", + "nameLocation": "218:10:25", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2367, + "nodeType": "Block", + "src": "307:447:25", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2297, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "321:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "321:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2303, + "nodeType": "IfStatement", + "src": "317:51:25", + "trueBody": { + "id": 2302, + "nodeType": "Block", + "src": "333:35:25", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:3:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "functionReturnParameters": 2296, + "id": 2301, + "nodeType": "Return", + "src": "347:10:25" + } + ] + } + }, + { + "assignments": [ + 2305 + ], + "declarations": [ + { + "constant": false, + "id": 2305, + "mutability": "mutable", + "name": "temp", + "nameLocation": "386:4:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "378:12:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "378:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2307, + "initialValue": { + "id": 2306, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "393:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "378:20:25" + }, + { + "assignments": [ + 2309 + ], + "declarations": [ + { + "constant": false, + "id": 2309, + "mutability": "mutable", + "name": "digits", + "nameLocation": "416:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "408:14:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "408:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2310, + "nodeType": "VariableDeclarationStatement", + "src": "408:14:25" + }, + { + "body": { + "id": 2321, + "nodeType": "Block", + "src": "450:57:25", + "statements": [ + { + "expression": { + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "464:8:25", + "subExpression": { + "id": 2314, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "464:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2316, + "nodeType": "ExpressionStatement", + "src": "464:8:25" + }, + { + "expression": { + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2317, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "486:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "494:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "486:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2320, + "nodeType": "ExpressionStatement", + "src": "486:10:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2311, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "439:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "447:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "439:9:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2322, + "nodeType": "WhileStatement", + "src": "432:75:25" + }, + { + "assignments": [ + 2324 + ], + "declarations": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "530:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "517:19:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2323, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "517:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2329, + "initialValue": { + "arguments": [ + { + "id": 2327, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "549:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "539:9:25", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "543:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "539:17:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "517:39:25" + }, + { + "body": { + "id": 2360, + "nodeType": "Block", + "src": "585:131:25", + "statements": [ + { + "expression": { + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2333, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "599:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 2334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "609:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "599:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2336, + "nodeType": "ExpressionStatement", + "src": "599:11:25" + }, + { + "expression": { + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2337, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "624:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2339, + "indexExpression": { + "id": 2338, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "631:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "624:14:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3438", + "id": 2344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "654:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2347, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "667:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "3130", + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "675:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "667:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:25", + "typeDescriptions": {} + } + }, + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:19:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "654:24:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "648:5:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2342, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "648:5:25", + "typeDescriptions": {} + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:31:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "641:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2340, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "641:6:25", + "typeDescriptions": {} + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "641:39:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "624:56:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2355, + "nodeType": "ExpressionStatement", + "src": "624:56:25" + }, + { + "expression": { + "id": 2358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2356, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "694:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "703:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "694:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2359, + "nodeType": "ExpressionStatement", + "src": "694:11:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2330, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "573:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "582:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "573:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2361, + "nodeType": "WhileStatement", + "src": "566:150:25" + }, + { + "expression": { + "arguments": [ + { + "id": 2364, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "740:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "733:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2362, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "733:6:25", + "typeDescriptions": {} + } + }, + "id": 2365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "733:14:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2296, + "id": 2366, + "nodeType": "Return", + "src": "726:21:25" + } + ] + }, + "id": 2368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uintToString", + "nameLocation": "244:12:25", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2292, + "mutability": "mutable", + "name": "value", + "nameLocation": "262:5:25", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "257:10:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2291, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "257:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "256:12:25" + }, + "returnParameters": { + "id": 2296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2295, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "292:13:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2294, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "292:6:25", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "291:15:25" + }, + "scope": 2369, + "src": "235:519:25", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2370, + "src": "210:546:25", + "usedErrors": [] + } + ], + "src": "31:726:25" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC165 {\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ] + }, + "id": 79, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 70, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:6" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC165", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 78, + "linearizedBaseContracts": [ + 78 + ], + "name": "IERC165", + "nameLocation": "66:7:6", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "01ffc9a7", + "id": 77, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "89:17:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 72, + "mutability": "mutable", + "name": "interfaceID", + "nameLocation": "114:11:6", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "107:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 71, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "107:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "106:20:6" + }, + "returnParameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "150:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 74, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "150:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "149:6:6" + }, + "scope": 78, + "src": "80:76:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 79, + "src": "56:102:6", + "usedErrors": [] + } + ], + "src": "31:128:6" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IUUPSImplementation.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"./ProxyStorage.sol\";\n\nabstract contract UUPSImplementation is IUUPSImplementation, ProxyStorage {\n event Upgraded(address implementation);\n\n error ImplementationIsSterile(address implementation);\n error UpgradeSimulationFailed();\n\n function _upgradeTo(address newImplementation) internal virtual {\n if (newImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(newImplementation)) {\n revert AddressError.NotAContract(newImplementation);\n }\n\n ProxyStore storage store = _proxyStore();\n\n if (newImplementation == store.implementation) {\n revert ChangeError.NoChange();\n }\n\n if (!store.simulatingUpgrade && _implementationIsSterile(newImplementation)) {\n revert ImplementationIsSterile(newImplementation);\n }\n\n store.implementation = newImplementation;\n\n emit Upgraded(newImplementation);\n }\n\n function _implementationIsSterile(address candidateImplementation) internal virtual returns (bool) {\n (bool simulationReverted, bytes memory simulationResponse) = address(this).delegatecall(\n abi.encodeCall(this.simulateUpgradeTo, (candidateImplementation))\n );\n\n return\n !simulationReverted &&\n keccak256(abi.encodePacked(simulationResponse)) == keccak256(abi.encodePacked(UpgradeSimulationFailed.selector));\n }\n\n function simulateUpgradeTo(address newImplementation) public override {\n ProxyStore storage store = _proxyStore();\n\n store.simulatingUpgrade = true;\n\n address currentImplementation = store.implementation;\n store.implementation = newImplementation;\n\n (bool rollbackSuccessful, ) = newImplementation.delegatecall(\n abi.encodeCall(this.upgradeTo, (currentImplementation))\n );\n\n if (!rollbackSuccessful || _proxyStore().implementation != currentImplementation) {\n revert UpgradeSimulationFailed();\n }\n\n store.simulatingUpgrade = false;\n\n // solhint-disable-next-line reason-string\n revert();\n }\n\n function getImplementation() external view override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 757, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 544, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:17" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "file": "../interfaces/IUUPSImplementation.sol", + "id": 545, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 239, + "src": "56:47:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 546, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 16, + "src": "104:36:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 547, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 26, + "src": "141:35:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 548, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 1697, + "src": "177:34:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 549, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 543, + "src": "212:28:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 550, + "name": "IUUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 238, + "src": "282:19:17" + }, + "id": 551, + "nodeType": "InheritanceSpecifier", + "src": "282:19:17" + }, + { + "baseName": { + "id": 552, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "303:12:17" + }, + "id": 553, + "nodeType": "InheritanceSpecifier", + "src": "303:12:17" + } + ], + "canonicalName": "UUPSImplementation", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 756, + "linearizedBaseContracts": [ + 756, + 542, + 238 + ], + "name": "UUPSImplementation", + "nameLocation": "260:18:17", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 557, + "name": "Upgraded", + "nameLocation": "328:8:17", + "nodeType": "EventDefinition", + "parameters": { + "id": 556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 555, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "345:14:17", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "337:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "337:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "336:24:17" + }, + "src": "322:39:17" + }, + { + "id": 561, + "name": "ImplementationIsSterile", + "nameLocation": "373:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "405:14:17", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "397:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 558, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "397:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "396:24:17" + }, + "src": "367:54:17" + }, + { + "id": 563, + "name": "UpgradeSimulationFailed", + "nameLocation": "432:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 562, + "nodeType": "ParameterList", + "parameters": [], + "src": "455:2:17" + }, + "src": "426:32:17" + }, + { + "body": { + "id": 634, + "nodeType": "Block", + "src": "528:662:17", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 568, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "542:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:1:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 569, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "563:7:17", + "typeDescriptions": {} + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "542:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 580, + "nodeType": "IfStatement", + "src": "538:95:17", + "trueBody": { + "id": 579, + "nodeType": "Block", + "src": "575:58:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 574, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "596:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "596:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "596:26:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 578, + "nodeType": "RevertStatement", + "src": "589:33:17" + } + ] + } + }, + { + "condition": { + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "647:42:17", + "subExpression": { + "arguments": [ + { + "id": 583, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "671:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 581, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "648:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "648:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:41:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 593, + "nodeType": "IfStatement", + "src": "643:124:17", + "trueBody": { + "id": 592, + "nodeType": "Block", + "src": "691:76:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 589, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "738:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 586, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "712:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "712:25:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "712:44:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "RevertStatement", + "src": "705:51:17" + } + ] + } + }, + { + "assignments": [ + 596 + ], + "declarations": [ + { + "constant": false, + "id": 596, + "mutability": "mutable", + "name": "store", + "nameLocation": "796:5:17", + "nodeType": "VariableDeclaration", + "scope": 634, + "src": "777:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 595, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 594, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "777:10:17" + }, + "referencedDeclaration": 533, + "src": "777:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 599, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 597, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "804:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "804:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "777:40:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 600, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "832:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 601, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "853:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "853:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "832:41:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 610, + "nodeType": "IfStatement", + "src": "828:101:17", + "trueBody": { + "id": 609, + "nodeType": "Block", + "src": "875:54:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 604, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "896:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "896:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "896:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 608, + "nodeType": "RevertStatement", + "src": "889:29:17" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "943:24:17", + "subExpression": { + "expression": { + "id": 611, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "944:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "944:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "id": 615, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "996:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 614, + "name": "_implementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "971:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", + "typeString": "function (address) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "971:43:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "943:71:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 623, + "nodeType": "IfStatement", + "src": "939:151:17", + "trueBody": { + "id": 622, + "nodeType": "Block", + "src": "1016:74:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 619, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1061:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 618, + "name": "ImplementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "1037:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1037:42:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 621, + "nodeType": "RevertStatement", + "src": "1030:49:17" + } + ] + } + }, + { + "expression": { + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 624, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "1100:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 626, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1100:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 627, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1123:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1100:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 629, + "nodeType": "ExpressionStatement", + "src": "1100:40:17" + }, + { + "eventCall": { + "arguments": [ + { + "id": 631, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1165:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 630, + "name": "Upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "1156:8:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1156:27:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 633, + "nodeType": "EmitStatement", + "src": "1151:32:17" + } + ] + }, + "id": 635, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_upgradeTo", + "nameLocation": "473:10:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 565, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "492:17:17", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "484:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "484:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "483:27:17" + }, + "returnParameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [], + "src": "528:0:17" + }, + "scope": 756, + "src": "464:726:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 678, + "nodeType": "Block", + "src": "1295:370:17", + "statements": [ + { + "assignments": [ + 643, + 645 + ], + "declarations": [ + { + "constant": false, + "id": 643, + "mutability": "mutable", + "name": "simulationReverted", + "nameLocation": "1311:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1306:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1306:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 645, + "mutability": "mutable", + "name": "simulationResponse", + "nameLocation": "1344:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1331:31:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 644, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1331:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 659, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 653, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1421:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "simulateUpgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "1421:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 655, + "name": "candidateImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "1446:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 656, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1445:25:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 651, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1406:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "1406:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1406:65:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 648, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1374:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + ], + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1366:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1366:7:17", + "typeDescriptions": {} + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1366:26:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:115:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1305:176:17" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1511:19:17", + "subExpression": { + "id": 660, + "name": "simulationReverted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "1512:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 665, + "name": "simulationResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "1573:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 663, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1556:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1556:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1556:36:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 662, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1546:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:47:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 671, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "1624:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1624:32:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "id": 669, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1607:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1607:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1607:50:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1597:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:61:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1546:112:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1511:147:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 641, + "id": 677, + "nodeType": "Return", + "src": "1492:166:17" + } + ] + }, + "id": 679, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_implementationIsSterile", + "nameLocation": "1205:24:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 637, + "mutability": "mutable", + "name": "candidateImplementation", + "nameLocation": "1238:23:17", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1230:31:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 636, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1230:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1229:33:17" + }, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1289:4:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 639, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1289:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1288:6:17" + }, + "scope": 756, + "src": "1196:469:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 232 + ], + "body": { + "id": 743, + "nodeType": "Block", + "src": "1741:622:17", + "statements": [ + { + "assignments": [ + 687 + ], + "declarations": [ + { + "constant": false, + "id": 687, + "mutability": "mutable", + "name": "store", + "nameLocation": "1770:5:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1751:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 686, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 685, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "1751:10:17" + }, + "referencedDeclaration": 533, + "src": "1751:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 690, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 688, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "1778:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1778:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1751:40:17" + }, + { + "expression": { + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 691, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1802:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1802:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1828:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1802:30:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 696, + "nodeType": "ExpressionStatement", + "src": "1802:30:17" + }, + { + "assignments": [ + 698 + ], + "declarations": [ + { + "constant": false, + "id": 698, + "mutability": "mutable", + "name": "currentImplementation", + "nameLocation": "1851:21:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1843:29:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1843:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 701, + "initialValue": { + "expression": { + "id": 699, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1875:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 700, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1875:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1843:52:17" + }, + { + "expression": { + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 702, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1905:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1905:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 705, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1928:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1905:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 707, + "nodeType": "ExpressionStatement", + "src": "1905:40:17" + }, + { + "assignments": [ + 709, + null + ], + "declarations": [ + { + "constant": false, + "id": 709, + "mutability": "mutable", + "name": "rollbackSuccessful", + "nameLocation": "1962:18:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1957:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 708, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1957:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 720, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 714, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2045:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 227, + "src": "2045:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 716, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2062:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 717, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2061:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 712, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2030:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "2030:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2030:55:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 710, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1986:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1986:30:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:109:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1956:139:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2110:19:17", + "subExpression": { + "id": 721, + "name": "rollbackSuccessful", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "2111:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 723, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2133:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2133:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 726, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2165:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2133:53:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2110:76:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 733, + "nodeType": "IfStatement", + "src": "2106:139:17", + "trueBody": { + "id": 732, + "nodeType": "Block", + "src": "2188:57:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 729, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "2209:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2209:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "RevertStatement", + "src": "2202:32:17" + } + ] + } + }, + { + "expression": { + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 734, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "2255:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "2255:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2281:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2255:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "2255:31:17" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 740, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "2348:6:17", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2348:8:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 742, + "nodeType": "ExpressionStatement", + "src": "2348:8:17" + } + ] + }, + "functionSelector": "c7f62cda", + "id": 744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "1680:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 683, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1732:8:17" + }, + "parameters": { + "id": 682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 681, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1706:17:17", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "1698:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1698:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1697:27:17" + }, + "returnParameters": { + "id": 684, + "nodeType": "ParameterList", + "parameters": [], + "src": "1741:0:17" + }, + "scope": 756, + "src": "1671:692:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 237 + ], + "body": { + "id": 754, + "nodeType": "Block", + "src": "2439:52:17", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 750, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2456:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2456:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2456:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 749, + "id": 753, + "nodeType": "Return", + "src": "2449:35:17" + } + ] + }, + "functionSelector": "aaf10f42", + "id": 755, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "2378:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 746, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2412:8:17" + }, + "parameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [], + "src": "2395:2:17" + }, + "returnParameters": { + "id": 749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 748, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 755, + "src": "2430:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2430:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2429:9:17" + }, + "scope": 756, + "src": "2369:122:17", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 757, + "src": "242:2251:17", + "usedErrors": [ + 561, + 563 + ] + } + ], + "src": "31:2463:17" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUUPSImplementation {\n function upgradeTo(address newImplementation) external;\n\n function simulateUpgradeTo(address newImplementation) external;\n\n function getImplementation() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "exportedSymbols": { + "IUUPSImplementation": [ + 238 + ] + }, + "id": 239, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 222, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:11" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUUPSImplementation", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 238, + "linearizedBaseContracts": [ + 238 + ], + "name": "IUUPSImplementation", + "nameLocation": "66:19:11", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "3659cfe6", + "id": 227, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeTo", + "nameLocation": "101:9:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 224, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "119:17:11", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "111:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 223, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "111:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "110:27:11" + }, + "returnParameters": { + "id": 226, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:11" + }, + "scope": 238, + "src": "92:55:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c7f62cda", + "id": 232, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "162:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "188:17:11", + "nodeType": "VariableDeclaration", + "scope": 232, + "src": "180:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "180:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "179:27:11" + }, + "returnParameters": { + "id": 231, + "nodeType": "ParameterList", + "parameters": [], + "src": "215:0:11" + }, + "scope": 238, + "src": "153:63:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "aaf10f42", + "id": 237, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "231:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 233, + "nodeType": "ParameterList", + "parameters": [], + "src": "248:2:11" + }, + "returnParameters": { + "id": 236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 235, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 237, + "src": "274:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "273:9:11" + }, + "scope": 238, + "src": "222:61:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 239, + "src": "56:229:11", + "usedErrors": [] + } + ], + "src": "31:255:11" + } + }, + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ProxyStorage {\n struct ProxyStore {\n address implementation;\n bool simulatingUpgrade;\n }\n\n function _proxyStore() internal pure returns (ProxyStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.v3.proxy\")) - 1)\n store.slot := 0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "exportedSymbols": { + "ProxyStorage": [ + 542 + ] + }, + "id": 543, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 528, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:16" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ProxyStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 542, + "linearizedBaseContracts": [ + 542 + ], + "name": "ProxyStorage", + "nameLocation": "65:12:16", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ProxyStorage.ProxyStore", + "id": 533, + "members": [ + { + "constant": false, + "id": 530, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "120:14:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "112:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "112:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 532, + "mutability": "mutable", + "name": "simulatingUpgrade", + "nameLocation": "149:17:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "144:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 531, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "144:4:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "name": "ProxyStore", + "nameLocation": "91:10:16", + "nodeType": "StructDefinition", + "scope": 542, + "src": "84:89:16", + "visibility": "public" + }, + { + "body": { + "id": 540, + "nodeType": "Block", + "src": "251:198:16", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "270:173:16", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "353:80:16", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "367:66:16", + "type": "", + "value": "0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "353:10:16" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 537, + "isOffset": false, + "isSlot": true, + "src": "353:10:16", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 539, + "nodeType": "InlineAssembly", + "src": "261:182:16" + } + ] + }, + "id": 541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_proxyStore", + "nameLocation": "188:11:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:16" + }, + "returnParameters": { + "id": 538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 537, + "mutability": "mutable", + "name": "store", + "nameLocation": "244:5:16", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "225:24:16", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 536, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 535, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "225:10:16" + }, + "referencedDeclaration": 533, + "src": "225:10:16", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "src": "224:26:16" + }, + "scope": 542, + "src": "179:270:16", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 543, + "src": "56:395:16", + "usedErrors": [] + } + ], + "src": "31:421:16" + } + }, + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\n\ncontract UpgradeModule is UUPSImplementation, OwnableMixin {\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ], + "UpgradeModule": [ + 4218 + ] + }, + "id": 4219, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:32" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 4199, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 757, + "src": "56:76:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 4200, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 477, + "src": "133:74:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4201, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "235:18:32" + }, + "id": 4202, + "nodeType": "InheritanceSpecifier", + "src": "235:18:32" + }, + { + "baseName": { + "id": 4203, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "255:12:32" + }, + "id": 4204, + "nodeType": "InheritanceSpecifier", + "src": "255:12:32" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4218, + "linearizedBaseContracts": [ + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "218:13:32", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 4216, + "nodeType": "Block", + "src": "346:46:32", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4213, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "367:17:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4212, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "356:10:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "356:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "356:29:32" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 4217, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4210, + "kind": "modifierInvocation", + "modifierName": { + "id": 4209, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "336:9:32" + }, + "nodeType": "ModifierInvocation", + "src": "336:9:32" + } + ], + "name": "upgradeTo", + "nameLocation": "283:9:32", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "327:8:32" + }, + "parameters": { + "id": 4207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4206, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "301:17:32", + "nodeType": "VariableDeclaration", + "scope": 4217, + "src": "293:25:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "293:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "292:27:32" + }, + "returnParameters": { + "id": 4211, + "nodeType": "ParameterList", + "parameters": [], + "src": "346:0:32" + }, + "scope": 4218, + "src": "274:118:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 4219, + "src": "209:185:32", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:364:32" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IElectionModule.sol\";\nimport \"../submodules/election/ElectionSchedule.sol\";\nimport \"../submodules/election/ElectionCredentials.sol\";\nimport \"../submodules/election/ElectionVotes.sol\";\nimport \"../submodules/election/ElectionTally.sol\";\n\ncontract ElectionModule is\n IElectionModule,\n ElectionSchedule,\n ElectionCredentials,\n ElectionVotes,\n ElectionTally,\n OwnableMixin,\n InitializableMixin\n{\n using SetUtil for SetUtil.AddressSet;\n\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external virtual override onlyOwner onlyIfNotInitialized {\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n function _initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n ElectionStore storage store = _electionStore();\n\n uint8 seatCount = uint8(firstCouncil.length);\n if (minimumActiveMembers == 0 || minimumActiveMembers > seatCount) {\n revert InvalidMinimumActiveMembers();\n }\n\n ElectionSettings storage settings = _electionSettings();\n settings.minNominationPeriodDuration = 2 days;\n settings.minVotingPeriodDuration = 2 days;\n settings.minEpochDuration = 7 days;\n settings.maxDateAdjustmentTolerance = 7 days;\n settings.nextEpochSeatCount = uint8(firstCouncil.length);\n settings.minimumActiveMembers = minimumActiveMembers;\n settings.defaultBallotEvaluationBatchSize = 500;\n\n _createNewEpoch();\n\n EpochData storage firstEpoch = _getEpochAtIndex(0);\n uint64 epochStartDate = uint64(block.timestamp);\n _configureEpochSchedule(firstEpoch, epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n _createCouncilToken(councilTokenName, councilTokenSymbol);\n _addCouncilMembers(firstCouncil, 0);\n\n store.initialized = true;\n\n emit ElectionModuleInitialized();\n emit EpochStarted(0);\n }\n\n function isElectionModuleInitialized() public view override returns (bool) {\n return _isInitialized();\n }\n\n function _isInitialized() internal view override returns (bool) {\n return _electionStore().initialized;\n }\n\n function upgradeCouncilToken(address newCouncilTokenImplementation) external override onlyOwner onlyIfInitialized {\n CouncilToken(_electionStore().councilToken).upgradeTo(newCouncilTokenImplementation);\n\n emit CouncilTokenUpgraded(newCouncilTokenImplementation);\n }\n\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n true /*ensureChangesAreSmall = true*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n false /*!ensureChangesAreSmall = false*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external override onlyOwner {\n _setMinEpochDurations(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n\n emit MinimumEpochDurationsChanged(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n }\n\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external override onlyOwner {\n if (newMaxDateAdjustmentTolerance == 0) revert InvalidElectionSettings();\n\n _electionSettings().maxDateAdjustmentTolerance = newMaxDateAdjustmentTolerance;\n\n emit MaxDateAdjustmentToleranceChanged(newMaxDateAdjustmentTolerance);\n }\n\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external override onlyOwner {\n if (newDefaultBallotEvaluationBatchSize == 0) revert InvalidElectionSettings();\n\n _electionSettings().defaultBallotEvaluationBatchSize = newDefaultBallotEvaluationBatchSize;\n\n emit DefaultBallotEvaluationBatchSizeChanged(newDefaultBallotEvaluationBatchSize);\n }\n\n function setNextEpochSeatCount(uint8 newSeatCount)\n external\n override\n onlyOwner\n onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination)\n {\n if (newSeatCount == 0) revert InvalidElectionSettings();\n\n _electionSettings().nextEpochSeatCount = newSeatCount;\n\n emit NextEpochSeatCountChanged(newSeatCount);\n }\n\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external override onlyOwner {\n if (newMinimumActiveMembers == 0) revert InvalidMinimumActiveMembers();\n\n _electionSettings().minimumActiveMembers = newMinimumActiveMembers;\n\n emit MinimumActiveMembersChanged(newMinimumActiveMembers);\n }\n\n function dismissMembers(address[] calldata membersToDismiss) external override onlyOwner {\n uint epochIndex = _getCurrentEpochIndex();\n\n _removeCouncilMembers(membersToDismiss, epochIndex);\n\n emit CouncilMembersDismissed(membersToDismiss, epochIndex);\n\n // Don't immediately jump to an election if the council still has enough members\n if (_getCurrentPeriod() != ElectionPeriod.Administration) return;\n if (_electionStore().councilMembers.length() >= _electionSettings().minimumActiveMembers) return;\n\n _jumpToNominationPeriod();\n\n emit EmergencyElectionStarted(epochIndex);\n }\n\n function nominate() public virtual override onlyInPeriods(ElectionPeriod.Nomination, ElectionPeriod.Vote) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (nominees.contains(msg.sender)) revert AlreadyNominated();\n\n nominees.add(msg.sender);\n\n emit CandidateNominated(msg.sender, _getCurrentEpochIndex());\n }\n\n function withdrawNomination() external override onlyInPeriod(ElectionPeriod.Nomination) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (!nominees.contains(msg.sender)) revert NotNominated();\n\n nominees.remove(msg.sender);\n\n emit NominationWithdrawn(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionVotes needs to be extended to specify what determines voting power\n function cast(address[] calldata candidates) public virtual override onlyInPeriod(ElectionPeriod.Vote) {\n _cast(msg.sender, candidates);\n }\n\n function _cast(address user, address[] calldata candidates) internal virtual {\n uint votePower = _getVotePower(user);\n\n if (votePower == 0) revert NoVotePower();\n\n _validateCandidates(candidates);\n\n bytes32 ballotId;\n\n uint epochIndex = _getCurrentEpochIndex();\n\n if (hasVoted(user)) {\n _withdrawCastedVote(user, epochIndex);\n }\n\n ballotId = _recordVote(user, votePower, candidates);\n\n emit VoteRecorded(user, ballotId, epochIndex, votePower);\n }\n\n function withdrawVote() external override onlyInPeriod(ElectionPeriod.Vote) {\n if (!hasVoted(msg.sender)) {\n revert VoteNotCasted();\n }\n\n _withdrawCastedVote(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionTally needs to be extended to specify how votes are counted\n function evaluate(uint numBallots) external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (election.evaluated) revert ElectionAlreadyEvaluated();\n\n _evaluateNextBallotBatch(numBallots);\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n\n uint totalBallots = election.ballotIds.length;\n if (election.numEvaluatedBallots < totalBallots) {\n emit ElectionBatchEvaluated(currentEpochIndex, election.numEvaluatedBallots, totalBallots);\n } else {\n election.evaluated = true;\n\n emit ElectionEvaluated(currentEpochIndex, totalBallots);\n }\n }\n\n /// @dev Burns previous NFTs and mints new ones\n function resolve() external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (!election.evaluated) revert ElectionNotEvaluated();\n\n uint newEpochIndex = _getCurrentEpochIndex() + 1;\n\n _removeAllCouncilMembers(newEpochIndex);\n _addCouncilMembers(election.winners.values(), newEpochIndex);\n\n election.resolved = true;\n\n _createNewEpoch();\n _copyScheduleFromPreviousEpoch();\n\n emit EpochStarted(newEpochIndex);\n }\n\n function getMinEpochDurations()\n external\n view\n override\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n )\n {\n ElectionSettings storage settings = _electionSettings();\n\n return (settings.minNominationPeriodDuration, settings.minVotingPeriodDuration, settings.minEpochDuration);\n }\n\n function getMaxDateAdjustmentTolerance() external view override returns (uint64) {\n return _electionSettings().maxDateAdjustmentTolerance;\n }\n\n function getDefaultBallotEvaluationBatchSize() external view override returns (uint) {\n return _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n function getNextEpochSeatCount() external view override returns (uint8) {\n return _electionSettings().nextEpochSeatCount;\n }\n\n function getMinimumActiveMembers() external view override returns (uint8) {\n return _electionSettings().minimumActiveMembers;\n }\n\n function getEpochIndex() external view override returns (uint) {\n return _getCurrentEpochIndex();\n }\n\n function getEpochStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().startDate;\n }\n\n function getEpochEndDate() external view override returns (uint64) {\n return _getCurrentEpoch().endDate;\n }\n\n function getNominationPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().votingPeriodStartDate;\n }\n\n function getCurrentPeriod() external view override returns (uint) {\n return uint(_getCurrentPeriod());\n }\n\n function isNominated(address candidate) external view override returns (bool) {\n return _getCurrentElection().nominees.contains(candidate);\n }\n\n function getNominees() external view override returns (address[] memory) {\n return _getCurrentElection().nominees.values();\n }\n\n function calculateBallotId(address[] calldata candidates) external pure override returns (bytes32) {\n return _calculateBallotId(candidates);\n }\n\n function getBallotVoted(address user) public view override returns (bytes32) {\n return _getBallotVoted(user);\n }\n\n function hasVoted(address user) public view override returns (bool) {\n return _getBallotVoted(user) != bytes32(0);\n }\n\n function getVotePower(address user) external view override returns (uint) {\n return _getVotePower(user);\n }\n\n function getBallotVotes(bytes32 ballotId) external view override returns (uint) {\n return _getBallot(ballotId).votes;\n }\n\n function getBallotCandidates(bytes32 ballotId) external view override returns (address[] memory) {\n return _getBallot(ballotId).candidates;\n }\n\n function isElectionEvaluated() public view override returns (bool) {\n return _getCurrentElection().evaluated;\n }\n\n function getCandidateVotes(address candidate) external view override returns (uint) {\n return _getCurrentElection().candidateVotes[candidate];\n }\n\n function getElectionWinners() external view override returns (address[] memory) {\n return _getCurrentElection().winners.values();\n }\n\n function getCouncilToken() public view override returns (address) {\n return _electionStore().councilToken;\n }\n\n function getCouncilMembers() external view override returns (address[] memory) {\n return _electionStore().councilMembers.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionModule": [ + 4141 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "ElectionVotes": [ + 6279 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IElectionModule": [ + 2778 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "MathUtil": [ + 1708 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 4142, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3007, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:30" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 3008, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 33, + "src": "56:68:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 3009, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 477, + "src": "125:74:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 3010, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 69, + "src": "200:84:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "../interfaces/IElectionModule.sol", + "id": 3011, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 2779, + "src": "285:43:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "file": "../submodules/election/ElectionSchedule.sol", + "id": 3012, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5631, + "src": "329:53:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "file": "../submodules/election/ElectionCredentials.sol", + "id": 3013, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5066, + "src": "383:56:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "file": "../submodules/election/ElectionVotes.sol", + "id": 3014, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 6280, + "src": "440:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "file": "../submodules/election/ElectionTally.sol", + "id": 3015, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5962, + "src": "491:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 3016, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "574:15:30" + }, + "id": 3017, + "nodeType": "InheritanceSpecifier", + "src": "574:15:30" + }, + { + "baseName": { + "id": 3018, + "name": "ElectionSchedule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5630, + "src": "595:16:30" + }, + "id": 3019, + "nodeType": "InheritanceSpecifier", + "src": "595:16:30" + }, + { + "baseName": { + "id": 3020, + "name": "ElectionCredentials", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5065, + "src": "617:19:30" + }, + "id": 3021, + "nodeType": "InheritanceSpecifier", + "src": "617:19:30" + }, + { + "baseName": { + "id": 3022, + "name": "ElectionVotes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6279, + "src": "642:13:30" + }, + "id": 3023, + "nodeType": "InheritanceSpecifier", + "src": "642:13:30" + }, + { + "baseName": { + "id": 3024, + "name": "ElectionTally", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5961, + "src": "661:13:30" + }, + "id": 3025, + "nodeType": "InheritanceSpecifier", + "src": "661:13:30" + }, + { + "baseName": { + "id": 3026, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "680:12:30" + }, + "id": 3027, + "nodeType": "InheritanceSpecifier", + "src": "680:12:30" + }, + { + "baseName": { + "id": 3028, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "698:18:30" + }, + "id": 3029, + "nodeType": "InheritanceSpecifier", + "src": "698:18:30" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 6379 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4141, + "linearizedBaseContracts": [ + 4141, + 68, + 476, + 494, + 5961, + 6279, + 5065, + 5630, + 4683, + 4331, + 2778 + ], + "name": "ElectionModule", + "nameLocation": "552:14:30", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3033, + "libraryName": { + "id": 3030, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "729:7:30" + }, + "nodeType": "UsingForDirective", + "src": "723:37:30", + "typeName": { + "id": 3032, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3031, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "741:18:30" + }, + "referencedDeclaration": 1788, + "src": "741:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2506 + ], + "body": { + "id": 3066, + "nodeType": "Block", + "src": "1129:274:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3057, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3035, + "src": "1178:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3058, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "1208:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3059, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3040, + "src": "1240:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3060, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3042, + "src": "1266:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3061, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3044, + "src": "1300:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3062, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "1339:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3063, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "1374:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3056, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "1139:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 3064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1139:257:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3065, + "nodeType": "ExpressionStatement", + "src": "1139:257:30" + } + ] + }, + "functionSelector": "ee695137", + "id": 3067, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3052, + "kind": "modifierInvocation", + "modifierName": { + "id": 3051, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1098:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "1098:9:30" + }, + { + "id": 3054, + "kind": "modifierInvocation", + "modifierName": { + "id": 3053, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1108:20:30" + }, + "nodeType": "ModifierInvocation", + "src": "1108:20:30" + } + ], + "name": "initializeElectionModule", + "nameLocation": "775:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1089:8:30" + }, + "parameters": { + "id": 3049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3035, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "823:16:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "809:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3034, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3037, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "863:18:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "849:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "849:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3040, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "908:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "891:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3039, + "nodeType": "ArrayTypeName", + "src": "891:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3042, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "936:20:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "930:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3041, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "930:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3044, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "973:25:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "966:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3043, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "966:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3046, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1015:21:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1008:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3045, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1008:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3048, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1053:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1046:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3047, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1046:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "799:272:30" + }, + "returnParameters": { + "id": 3055, + "nodeType": "ParameterList", + "parameters": [], + "src": "1129:0:30" + }, + "scope": 4141, + "src": "766:637:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 3212, + "nodeType": "Block", + "src": "1725:1202:30", + "statements": [ + { + "assignments": [ + 3087 + ], + "declarations": [ + { + "constant": false, + "id": 3087, + "mutability": "mutable", + "name": "store", + "nameLocation": "1757:5:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1735:27:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 3086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3085, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "1735:13:30" + }, + "referencedDeclaration": 4246, + "src": "1735:13:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 3090, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3088, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1765:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1765:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1735:46:30" + }, + { + "assignments": [ + 3092 + ], + "declarations": [ + { + "constant": false, + "id": 3092, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "1798:9:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1792:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3091, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1792:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3098, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3095, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "1816:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1816:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1810:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3093, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1810:5:30", + "typeDescriptions": {} + } + }, + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1810:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1792:44:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3099, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1850:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1874:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1850:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3102, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1879:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3103, + "name": "seatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3092, + "src": "1902:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1879:32:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1850:61:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3110, + "nodeType": "IfStatement", + "src": "1846:128:30", + "trueBody": { + "id": 3109, + "nodeType": "Block", + "src": "1913:61:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3106, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "1934:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3108, + "nodeType": "RevertStatement", + "src": "1927:36:30" + } + ] + } + }, + { + "assignments": [ + 3113 + ], + "declarations": [ + { + "constant": false, + "id": 3113, + "mutability": "mutable", + "name": "settings", + "nameLocation": "2009:8:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1984:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3112, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3111, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1984:16:30" + }, + "referencedDeclaration": 4261, + "src": "1984:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3116, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3114, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "2020:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2020:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1984:55:30" + }, + { + "expression": { + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3117, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2049:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "2049:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2088:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2049:45:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3122, + "nodeType": "ExpressionStatement", + "src": "2049:45:30" + }, + { + "expression": { + "id": 3127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3123, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2104:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3125, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "2104:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2139:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2104:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3128, + "nodeType": "ExpressionStatement", + "src": "2104:41:30" + }, + { + "expression": { + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3129, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2155:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "2155:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2183:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2155:34:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3134, + "nodeType": "ExpressionStatement", + "src": "2155:34:30" + }, + { + "expression": { + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3135, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2199:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "2199:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2237:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2199:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3140, + "nodeType": "ExpressionStatement", + "src": "2199:44:30" + }, + { + "expression": { + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3141, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2253:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "2253:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3146, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2289:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2289:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2283:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3144, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2283:5:30", + "typeDescriptions": {} + } + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2283:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2253:56:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3150, + "nodeType": "ExpressionStatement", + "src": "2253:56:30" + }, + { + "expression": { + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3151, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2319:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "2319:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3154, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "2351:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2319:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3156, + "nodeType": "ExpressionStatement", + "src": "2319:52:30" + }, + { + "expression": { + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3157, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2381:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3159, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "2381:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "353030", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2425:3:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_500_by_1", + "typeString": "int_const 500" + }, + "value": "500" + }, + "src": "2381:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "2381:47:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3163, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "2439:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2439:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "2439:17:30" + }, + { + "assignments": [ + 3168 + ], + "declarations": [ + { + "constant": false, + "id": 3168, + "mutability": "mutable", + "name": "firstEpoch", + "nameLocation": "2485:10:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2467:28:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 3167, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3166, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "2467:9:30" + }, + "referencedDeclaration": 4270, + "src": "2467:9:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 3172, + "initialValue": { + "arguments": [ + { + "hexValue": "30", + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2515:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3169, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "2498:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2498:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2467:50:30" + }, + { + "assignments": [ + 3174 + ], + "declarations": [ + { + "constant": false, + "id": 3174, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2534:14:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2527:21:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3173, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2527:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 3180, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3177, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2558:5:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2558:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2551:6:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 3175, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2551:6:30", + "typeDescriptions": {} + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2527:47:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3182, + "name": "firstEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3168, + "src": "2608:10:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3183, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3174, + "src": "2620:14:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3184, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "2636:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3185, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3080, + "src": "2663:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3186, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "2686:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3181, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "2584:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2584:115:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "2584:115:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3190, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "2730:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3191, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "2748:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3189, + "name": "_createCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2710:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2710:57:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3193, + "nodeType": "ExpressionStatement", + "src": "2710:57:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3195, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2796:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "hexValue": "30", + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3194, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "2777:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2777:35:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3198, + "nodeType": "ExpressionStatement", + "src": "2777:35:30" + }, + { + "expression": { + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3199, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "2823:5:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "2823:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2843:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2823:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "2823:24:30" + }, + { + "eventCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3205, + "name": "ElectionModuleInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4380, + "src": "2863:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2863:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3207, + "nodeType": "EmitStatement", + "src": "2858:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "30", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2918:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3208, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2905:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3211, + "nodeType": "EmitStatement", + "src": "2900:20:30" + } + ] + }, + "id": 3213, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initializeElectionModule", + "nameLocation": "1418:25:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3069, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1467:16:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1453:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1453:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3071, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1507:18:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1493:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3070, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1493:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "1552:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1535:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1535:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3073, + "nodeType": "ArrayTypeName", + "src": "1535:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3076, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1580:20:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1574:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3075, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1574:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3078, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1617:25:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1610:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3077, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1610:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3080, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1659:21:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1652:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3079, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1652:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1697:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1690:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3081, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1690:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1443:272:30" + }, + "returnParameters": { + "id": 3084, + "nodeType": "ParameterList", + "parameters": [], + "src": "1725:0:30" + }, + "scope": 4141, + "src": "1409:1518:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2512 + ], + "body": { + "id": 3222, + "nodeType": "Block", + "src": "3008:40:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3219, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3234 + ], + "referencedDeclaration": 3234, + "src": "3025:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3025:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3218, + "id": 3221, + "nodeType": "Return", + "src": "3018:23:30" + } + ] + }, + "functionSelector": "c5798523", + "id": 3223, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "2942:27:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3215, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2984:8:30" + }, + "parameters": { + "id": 3214, + "nodeType": "ParameterList", + "parameters": [], + "src": "2969:2:30" + }, + "returnParameters": { + "id": 3218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3223, + "src": "3002:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3216, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3002:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3001:6:30" + }, + "scope": 4141, + "src": "2933:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 3233, + "nodeType": "Block", + "src": "3118:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3229, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3135:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3135:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "3135:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3228, + "id": 3232, + "nodeType": "Return", + "src": "3128:35:30" + } + ] + }, + "id": 3234, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "3063:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3225, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3094:8:30" + }, + "parameters": { + "id": 3224, + "nodeType": "ParameterList", + "parameters": [], + "src": "3077:2:30" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3234, + "src": "3112:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3226, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3112:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3111:6:30" + }, + "scope": 4141, + "src": "3054:116:30", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2518 + ], + "body": { + "id": 3257, + "nodeType": "Block", + "src": "3290:168:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3250, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3354:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3245, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3313:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3247, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3313:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3244, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3300:12:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:43:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6321, + "src": "3300:53:30", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:84:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3252, + "nodeType": "ExpressionStatement", + "src": "3300:84:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3254, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3421:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3253, + "name": "CouncilTokenUpgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "3400:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3256, + "nodeType": "EmitStatement", + "src": "3395:56:30" + } + ] + }, + "functionSelector": "54520478", + "id": 3258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3240, + "kind": "modifierInvocation", + "modifierName": { + "id": 3239, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3262:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3262:9:30" + }, + { + "id": 3242, + "kind": "modifierInvocation", + "modifierName": { + "id": 3241, + "name": "onlyIfInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 49, + "src": "3272:17:30" + }, + "nodeType": "ModifierInvocation", + "src": "3272:17:30" + } + ], + "name": "upgradeCouncilToken", + "nameLocation": "3185:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3238, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3253:8:30" + }, + "parameters": { + "id": 3237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3236, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "3213:29:30", + "nodeType": "VariableDeclaration", + "scope": 3258, + "src": "3205:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3204:39:30" + }, + "returnParameters": { + "id": 3243, + "nodeType": "ParameterList", + "parameters": [], + "src": "3290:0:30" + }, + "scope": 4141, + "src": "3176:282:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2528 + ], + "body": { + "id": 3291, + "nodeType": "Block", + "src": "3716:348:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3277, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "3760:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3760:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3279, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3792:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3280, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "3834:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3281, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "3872:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "74727565", + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3276, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3726:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3726:222:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3284, + "nodeType": "ExpressionStatement", + "src": "3726:222:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3286, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3985:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3287, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "4015:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3288, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "4041:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3285, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "3964:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3964:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3290, + "nodeType": "EmitStatement", + "src": "3959:98:30" + } + ] + }, + "functionSelector": "8f701997", + "id": 3292, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3268, + "kind": "modifierInvocation", + "modifierName": { + "id": 3267, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3634:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3634:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3270, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3658:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "3658:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3272, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "3689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3274, + "kind": "modifierInvocation", + "modifierName": { + "id": 3269, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "3644:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "3644:71:30" + } + ], + "name": "tweakEpochSchedule", + "nameLocation": "3473:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3266, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3625:8:30" + }, + "parameters": { + "id": 3265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3260, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3508:28:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3501:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3259, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3501:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3262, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3553:24:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3546:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3261, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3546:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3264, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3594:15:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3587:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3263, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3587:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3491:124:30" + }, + "returnParameters": { + "id": 3275, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:0:30" + }, + "scope": 4141, + "src": "3464:600:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2538 + ], + "body": { + "id": 3325, + "nodeType": "Block", + "src": "4323:351:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3311, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "4367:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4367:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3313, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4399:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3314, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4441:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3315, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4479:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "66616c7365", + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4508:5:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3310, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "4333:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4333:225:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3318, + "nodeType": "ExpressionStatement", + "src": "4333:225:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3320, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4595:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3321, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4625:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3322, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4651:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3319, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "4574:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4574:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3324, + "nodeType": "EmitStatement", + "src": "4569:98:30" + } + ] + }, + "functionSelector": "c14d0528", + "id": 3326, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3302, + "kind": "modifierInvocation", + "modifierName": { + "id": 3301, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4241:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4241:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3304, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4265:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "4265:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3306, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4296:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "4296:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3308, + "kind": "modifierInvocation", + "modifierName": { + "id": 3303, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "4251:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "4251:71:30" + } + ], + "name": "modifyEpochSchedule", + "nameLocation": "4079:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3300, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4232:8:30" + }, + "parameters": { + "id": 3299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3294, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "4115:28:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4108:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3293, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4108:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3296, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "4160:24:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4153:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3295, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4153:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3298, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "4201:15:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4194:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3297, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4194:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4098:124:30" + }, + "returnParameters": { + "id": 3309, + "nodeType": "ParameterList", + "parameters": [], + "src": "4323:0:30" + }, + "scope": 4141, + "src": "4070:604:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2548 + ], + "body": { + "id": 3350, + "nodeType": "Block", + "src": "4870:244:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3339, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "4902:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3340, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "4934:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3341, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "4962:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3338, + "name": "_setMinEpochDurations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5563, + "src": "4880:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4880:102:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3343, + "nodeType": "ExpressionStatement", + "src": "4880:102:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3345, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "5027:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3346, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "5059:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3347, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "5087:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3344, + "name": "MinimumEpochDurationsChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4429, + "src": "4998:28:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4998:109:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3349, + "nodeType": "EmitStatement", + "src": "4993:114:30" + } + ] + }, + "functionSelector": "a25a9f3a", + "id": 3351, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3336, + "kind": "modifierInvocation", + "modifierName": { + "id": 3335, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4860:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4860:9:30" + } + ], + "name": "setMinEpochDurations", + "nameLocation": "4689:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3334, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4851:8:30" + }, + "parameters": { + "id": 3333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3328, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "4726:30:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4719:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3327, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4719:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3330, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "4773:26:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4766:33:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3329, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4766:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3332, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "4816:19:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4809:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4709:132:30" + }, + "returnParameters": { + "id": 3337, + "nodeType": "ParameterList", + "parameters": [], + "src": "4870:0:30" + }, + "scope": 4141, + "src": "4680:434:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2554 + ], + "body": { + "id": 3376, + "nodeType": "Block", + "src": "5225:258:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3359, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5239:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5272:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5239:34:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3365, + "nodeType": "IfStatement", + "src": "5235:72:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3362, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5282:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5282:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3364, + "nodeType": "RevertStatement", + "src": "5275:32:30" + } + }, + { + "expression": { + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3366, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5318:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5318:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3368, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "5318:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3369, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5367:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5318:78:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3371, + "nodeType": "ExpressionStatement", + "src": "5318:78:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3373, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5446:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3372, + "name": "MaxDateAdjustmentToleranceChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4433, + "src": "5412:33:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$returns$__$", + "typeString": "function (uint64)" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:64:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3375, + "nodeType": "EmitStatement", + "src": "5407:69:30" + } + ] + }, + "functionSelector": "3ac1c5fe", + "id": 3377, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3357, + "kind": "modifierInvocation", + "modifierName": { + "id": 3356, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5215:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5215:9:30" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "5129:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3355, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5206:8:30" + }, + "parameters": { + "id": 3354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3353, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "5166:29:30", + "nodeType": "VariableDeclaration", + "scope": 3377, + "src": "5159:36:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3352, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5159:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5158:38:30" + }, + "returnParameters": { + "id": 3358, + "nodeType": "ParameterList", + "parameters": [], + "src": "5225:0:30" + }, + "scope": 4141, + "src": "5120:363:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2560 + ], + "body": { + "id": 3402, + "nodeType": "Block", + "src": "5604:288:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3385, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5618:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5657:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5618:40:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3391, + "nodeType": "IfStatement", + "src": "5614:78:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3388, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5667:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5667:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3390, + "nodeType": "RevertStatement", + "src": "5660:32:30" + } + }, + { + "expression": { + "id": 3396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3392, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5703:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "5703:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3395, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5758:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5703:90:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3397, + "nodeType": "ExpressionStatement", + "src": "5703:90:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3399, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5849:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3398, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4437, + "src": "5809:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5809:76:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3401, + "nodeType": "EmitStatement", + "src": "5804:81:30" + } + ] + }, + "functionSelector": "64deab73", + "id": 3403, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3383, + "kind": "modifierInvocation", + "modifierName": { + "id": 3382, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5594:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5594:9:30" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "5498:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3381, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5585:8:30" + }, + "parameters": { + "id": 3380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3379, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "5539:35:30", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "5534:40:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3378, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5534:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5533:42:30" + }, + "returnParameters": { + "id": 3384, + "nodeType": "ParameterList", + "parameters": [], + "src": "5604:0:30" + }, + "scope": 4141, + "src": "5489:403:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2566 + ], + "body": { + "id": 3434, + "nodeType": "Block", + "src": "6085:191:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3417, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6099:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6115:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6099:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3423, + "nodeType": "IfStatement", + "src": "6095:55:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3420, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "6125:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6125:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "RevertStatement", + "src": "6118:32:30" + } + }, + { + "expression": { + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3424, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6161:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6161:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "6161:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3427, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6202:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6161:53:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3429, + "nodeType": "ExpressionStatement", + "src": "6161:53:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3431, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6256:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3430, + "name": "NextEpochSeatCountChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4441, + "src": "6230:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6230:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3433, + "nodeType": "EmitStatement", + "src": "6225:44:30" + } + ] + }, + "functionSelector": "4b5dacac", + "id": 3435, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3409, + "kind": "modifierInvocation", + "modifierName": { + "id": 3408, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5991:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5991:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6023:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "6023:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3413, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6054:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "6054:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3415, + "kind": "modifierInvocation", + "modifierName": { + "id": 3410, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "6009:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "6009:71:30" + } + ], + "name": "setNextEpochSeatCount", + "nameLocation": "5907:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3407, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5974:8:30" + }, + "parameters": { + "id": 3406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3405, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "5935:12:30", + "nodeType": "VariableDeclaration", + "scope": 3435, + "src": "5929:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3404, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5929:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "5928:20:30" + }, + "returnParameters": { + "id": 3416, + "nodeType": "ParameterList", + "parameters": [], + "src": "6085:0:30" + }, + "scope": 4141, + "src": "5898:378:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2572 + ], + "body": { + "id": 3460, + "nodeType": "Block", + "src": "6374:232:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3443, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6388:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6415:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6388:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3449, + "nodeType": "IfStatement", + "src": "6384:70:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3446, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "6425:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6425:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3448, + "nodeType": "RevertStatement", + "src": "6418:36:30" + } + }, + { + "expression": { + "id": 3454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3450, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6465:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6465:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3452, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "6465:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3453, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6508:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6465:66:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3455, + "nodeType": "ExpressionStatement", + "src": "6465:66:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3457, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6575:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3456, + "name": "MinimumActiveMembersChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "6547:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:52:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3459, + "nodeType": "EmitStatement", + "src": "6542:57:30" + } + ] + }, + "functionSelector": "0438d06e", + "id": 3461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3441, + "kind": "modifierInvocation", + "modifierName": { + "id": 3440, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6364:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6364:9:30" + } + ], + "name": "setMinimumActiveMembers", + "nameLocation": "6291:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3439, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6355:8:30" + }, + "parameters": { + "id": 3438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3437, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "6321:23:30", + "nodeType": "VariableDeclaration", + "scope": 3461, + "src": "6315:29:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3436, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6315:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6314:31:30" + }, + "returnParameters": { + "id": 3442, + "nodeType": "ParameterList", + "parameters": [], + "src": "6374:0:30" + }, + "scope": 4141, + "src": "6282:324:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2579 + ], + "body": { + "id": 3510, + "nodeType": "Block", + "src": "6701:547:30", + "statements": [ + { + "assignments": [ + 3471 + ], + "declarations": [ + { + "constant": false, + "id": 3471, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "6716:10:30", + "nodeType": "VariableDeclaration", + "scope": 3510, + "src": "6711:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3470, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6711:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3474, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3472, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "6729:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6729:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6711:41:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3476, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6785:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3477, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6803:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3475, + "name": "_removeCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4900, + "src": "6763:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6763:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3479, + "nodeType": "ExpressionStatement", + "src": "6763:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3481, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6854:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3482, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6872:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3480, + "name": "CouncilMembersDismissed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4413, + "src": "6830:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6830:53:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3484, + "nodeType": "EmitStatement", + "src": "6825:58:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3485, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "6987:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6987:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 3487, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7010:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "7010:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "6987:52:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3491, + "nodeType": "IfStatement", + "src": "6983:65:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3490, + "nodeType": "Return", + "src": "7041:7:30" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3492, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "7061:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "7061:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "7061:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3497, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7105:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7105:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "7105:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "7061:84:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3502, + "nodeType": "IfStatement", + "src": "7057:97:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3501, + "nodeType": "Return", + "src": "7147:7:30" + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3503, + "name": "_jumpToNominationPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "7164:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7164:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3505, + "nodeType": "ExpressionStatement", + "src": "7164:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3507, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "7230:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3506, + "name": "EmergencyElectionStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4495, + "src": "7205:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7205:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3509, + "nodeType": "EmitStatement", + "src": "7200:41:30" + } + ] + }, + "functionSelector": "9a25eaf3", + "id": 3511, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3468, + "kind": "modifierInvocation", + "modifierName": { + "id": 3467, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6691:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6691:9:30" + } + ], + "name": "dismissMembers", + "nameLocation": "6621:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3466, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6682:8:30" + }, + "parameters": { + "id": 3465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3464, + "mutability": "mutable", + "name": "membersToDismiss", + "nameLocation": "6655:16:30", + "nodeType": "VariableDeclaration", + "scope": 3511, + "src": "6636:35:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3462, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6636:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3463, + "nodeType": "ArrayTypeName", + "src": "6636:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6635:37:30" + }, + "returnParameters": { + "id": 3469, + "nodeType": "ParameterList", + "parameters": [], + "src": "6701:0:30" + }, + "scope": 4141, + "src": "6612:636:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2583 + ], + "body": { + "id": 3553, + "nodeType": "Block", + "src": "7360:262:30", + "statements": [ + { + "assignments": [ + 3525 + ], + "declarations": [ + { + "constant": false, + "id": 3525, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7397:8:30", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "7370:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3524, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3523, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7370:18:30" + }, + "referencedDeclaration": 1788, + "src": "7370:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3529, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3526, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7408:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7408:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7408:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7370:68:30" + }, + { + "condition": { + "arguments": [ + { + "expression": { + "id": 3532, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7471:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7471:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3530, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7453:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7453:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7453:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3538, + "nodeType": "IfStatement", + "src": "7449:60:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3535, + "name": "AlreadyNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4348, + "src": "7491:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7491:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3537, + "nodeType": "RevertStatement", + "src": "7484:25:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7533:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7533:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3539, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7520:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "7520:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7520:24:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3545, + "nodeType": "ExpressionStatement", + "src": "7520:24:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3547, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7579:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7579:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3549, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7591:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7591:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3546, + "name": "CandidateNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4451, + "src": "7560:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7560:55:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3552, + "nodeType": "EmitStatement", + "src": "7555:60:30" + } + ] + }, + "functionSelector": "fcd7e1d7", + "id": 3554, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3515, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7312:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7312:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3517, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7339:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "7339:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3519, + "kind": "modifierInvocation", + "modifierName": { + "id": 3514, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "7298:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "7298:61:30" + } + ], + "name": "nominate", + "nameLocation": "7263:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3513, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7289:8:30" + }, + "parameters": { + "id": 3512, + "nodeType": "ParameterList", + "parameters": [], + "src": "7271:2:30" + }, + "returnParameters": { + "id": 3520, + "nodeType": "ParameterList", + "parameters": [], + "src": "7360:0:30" + }, + "scope": 4141, + "src": "7254:368:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 2587 + ], + "body": { + "id": 3595, + "nodeType": "Block", + "src": "7716:263:30", + "statements": [ + { + "assignments": [ + 3566 + ], + "declarations": [ + { + "constant": false, + "id": 3566, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7753:8:30", + "nodeType": "VariableDeclaration", + "scope": 3595, + "src": "7726:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3565, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3564, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7726:18:30" + }, + "referencedDeclaration": 1788, + "src": "7726:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3570, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3567, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7764:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7764:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7764:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7726:68:30" + }, + { + "condition": { + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7809:30:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7828:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7828:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3571, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7810:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7810:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7810:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3580, + "nodeType": "IfStatement", + "src": "7805:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3577, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "7848:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7848:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3579, + "nodeType": "RevertStatement", + "src": "7841:21:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3584, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7889:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7889:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3581, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7873:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "7873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7873:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3587, + "nodeType": "ExpressionStatement", + "src": "7873:27:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3589, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7936:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7936:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3591, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7948:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7948:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3588, + "name": "NominationWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "7916:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7916:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3594, + "nodeType": "EmitStatement", + "src": "7911:61:30" + } + ] + }, + "functionSelector": "d11801cf", + "id": 3596, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3558, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3560, + "kind": "modifierInvocation", + "modifierName": { + "id": 3557, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "7676:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "7676:39:30" + } + ], + "name": "withdrawNomination", + "nameLocation": "7637:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3556, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7667:8:30" + }, + "parameters": { + "id": 3555, + "nodeType": "ParameterList", + "parameters": [], + "src": "7655:2:30" + }, + "returnParameters": { + "id": 3561, + "nodeType": "ParameterList", + "parameters": [], + "src": "7716:0:30" + }, + "scope": 4141, + "src": "7628:351:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2594 + ], + "body": { + "id": 3614, + "nodeType": "Block", + "src": "8176:46:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3609, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8192:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8192:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3611, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3600, + "src": "8204:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3608, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3674, + "src": "8186:5:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 3612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8186:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3613, + "nodeType": "ExpressionStatement", + "src": "8186:29:30" + } + ] + }, + "documentation": { + "id": 3597, + "nodeType": "StructuredDocumentation", + "src": "7985:83:30", + "text": "@dev ElectionVotes needs to be extended to specify what determines voting power" + }, + "functionSelector": "84ae670c", + "id": 3615, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3604, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8155:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8155:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3606, + "kind": "modifierInvocation", + "modifierName": { + "id": 3603, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8142:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8142:33:30" + } + ], + "name": "cast", + "nameLocation": "8082:4:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3602, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8133:8:30" + }, + "parameters": { + "id": 3601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3600, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8106:10:30", + "nodeType": "VariableDeclaration", + "scope": 3615, + "src": "8087:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8087:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3599, + "nodeType": "ArrayTypeName", + "src": "8087:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8086:31:30" + }, + "returnParameters": { + "id": 3607, + "nodeType": "ParameterList", + "parameters": [], + "src": "8176:0:30" + }, + "scope": 4141, + "src": "8073:149:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 3673, + "nodeType": "Block", + "src": "8305:446:30", + "statements": [ + { + "assignments": [ + 3624 + ], + "declarations": [ + { + "constant": false, + "id": 3624, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8320:9:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8315:14:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3623, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8315:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3628, + "initialValue": { + "arguments": [ + { + "id": 3626, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8346:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3625, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "8332:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8332:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8315:36:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3629, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8366:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8379:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8366:14:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3635, + "nodeType": "IfStatement", + "src": "8362:40:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3632, + "name": "NoVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "8389:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8389:13:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3634, + "nodeType": "RevertStatement", + "src": "8382:20:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3637, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8433:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3636, + "name": "_validateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6067, + "src": "8413:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 3638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8413:31:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3639, + "nodeType": "ExpressionStatement", + "src": "8413:31:30" + }, + { + "assignments": [ + 3641 + ], + "declarations": [ + { + "constant": false, + "id": 3641, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "8463:8:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8455:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3640, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8455:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3642, + "nodeType": "VariableDeclarationStatement", + "src": "8455:16:30" + }, + { + "assignments": [ + 3644 + ], + "declarations": [ + { + "constant": false, + "id": 3644, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "8487:10:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8482:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3643, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8482:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3647, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3645, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8500:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8500:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8482:41:30" + }, + { + "condition": { + "arguments": [ + { + "id": 3649, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8547:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3648, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8538:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8538:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3657, + "nodeType": "IfStatement", + "src": "8534:82:30", + "trueBody": { + "id": 3656, + "nodeType": "Block", + "src": "8554:62:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3652, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8588:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3653, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8594:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3651, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8568:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8568:37:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "8568:37:30" + } + ] + } + }, + { + "expression": { + "id": 3664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3658, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8626:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3660, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8649:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3661, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8655:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3662, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8666:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3659, + "name": "_recordVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6150, + "src": "8637:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_address_$dyn_calldata_ptr_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,address[] calldata) returns (bytes32)" + } + }, + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8637:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "8626:51:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 3665, + "nodeType": "ExpressionStatement", + "src": "8626:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3667, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8706:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3668, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8712:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3669, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8722:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3670, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8734:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3666, + "name": "VoteRecorded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4467, + "src": "8693:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8693:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3672, + "nodeType": "EmitStatement", + "src": "8688:56:30" + } + ] + }, + "id": 3674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_cast", + "nameLocation": "8237:5:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3617, + "mutability": "mutable", + "name": "user", + "nameLocation": "8251:4:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8243:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8243:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3620, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8276:10:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8257:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3618, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8257:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3619, + "nodeType": "ArrayTypeName", + "src": "8257:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8242:45:30" + }, + "returnParameters": { + "id": 3622, + "nodeType": "ParameterList", + "parameters": [], + "src": "8305:0:30" + }, + "scope": 4141, + "src": "8228:523:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2598 + ], + "body": { + "id": 3699, + "nodeType": "Block", + "src": "8833:157:30", + "statements": [ + { + "condition": { + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8847:21:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3683, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8857:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8857:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3682, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8848:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8848:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3691, + "nodeType": "IfStatement", + "src": "8843:74:30", + "trueBody": { + "id": 3690, + "nodeType": "Block", + "src": "8870:47:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3687, + "name": "VoteNotCasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4356, + "src": "8891:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8891:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3689, + "nodeType": "RevertStatement", + "src": "8884:22:30" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3693, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8947:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8947:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3695, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8959:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8959:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3692, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8927:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8927:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3698, + "nodeType": "ExpressionStatement", + "src": "8927:56:30" + } + ] + }, + "functionSelector": "d83eb231", + "id": 3700, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3678, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8812:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8812:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3680, + "kind": "modifierInvocation", + "modifierName": { + "id": 3677, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8799:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8799:33:30" + } + ], + "name": "withdrawVote", + "nameLocation": "8766:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3676, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8790:8:30" + }, + "parameters": { + "id": 3675, + "nodeType": "ParameterList", + "parameters": [], + "src": "8778:2:30" + }, + "returnParameters": { + "id": 3681, + "nodeType": "ParameterList", + "parameters": [], + "src": "8833:0:30" + }, + "scope": 4141, + "src": "8757:233:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2604 + ], + "body": { + "id": 3763, + "nodeType": "Block", + "src": "9170:599:30", + "statements": [ + { + "assignments": [ + 3713 + ], + "declarations": [ + { + "constant": false, + "id": 3713, + "mutability": "mutable", + "name": "election", + "nameLocation": "9201:8:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9180:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3711, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9180:12:30" + }, + "referencedDeclaration": 4299, + "src": "9180:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3716, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3714, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9212:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9212:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9180:53:30" + }, + { + "condition": { + "expression": { + "id": 3717, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9248:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9248:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3722, + "nodeType": "IfStatement", + "src": "9244:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3719, + "name": "ElectionAlreadyEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4346, + "src": "9275:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9275:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3721, + "nodeType": "RevertStatement", + "src": "9268:33:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3724, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3703, + "src": "9337:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3723, + "name": "_evaluateNextBallotBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5695, + "src": "9312:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9312:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3726, + "nodeType": "ExpressionStatement", + "src": "9312:36:30" + }, + { + "assignments": [ + 3728 + ], + "declarations": [ + { + "constant": false, + "id": 3728, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "9364:17:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9359:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3727, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9359:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3731, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3729, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "9384:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9384:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9359:48:30" + }, + { + "assignments": [ + 3733 + ], + "declarations": [ + { + "constant": false, + "id": 3733, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "9423:12:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9418:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3732, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9418:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3737, + "initialValue": { + "expression": { + "expression": { + "id": 3734, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9438:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3735, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "9438:18:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 3736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9438:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9418:45:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3738, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9477:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3739, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9477:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 3740, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9508:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9477:43:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3761, + "nodeType": "Block", + "src": "9643:120:30", + "statements": [ + { + "expression": { + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3750, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9657:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9657:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9678:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "9657:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3755, + "nodeType": "ExpressionStatement", + "src": "9657:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3757, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9720:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3758, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9739:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3756, + "name": "ElectionEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4483, + "src": "9702:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9702:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3760, + "nodeType": "EmitStatement", + "src": "9697:55:30" + } + ] + }, + "id": 3762, + "nodeType": "IfStatement", + "src": "9473:290:30", + "trueBody": { + "id": 3749, + "nodeType": "Block", + "src": "9522:115:30", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "id": 3743, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9564:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3744, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9583:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9583:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3746, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9613:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3742, + "name": "ElectionBatchEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "9541:22:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9541:85:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3748, + "nodeType": "EmitStatement", + "src": "9536:90:30" + } + ] + } + } + ] + }, + "documentation": { + "id": 3701, + "nodeType": "StructuredDocumentation", + "src": "8996:76:30", + "text": "@dev ElectionTally needs to be extended to specify how votes are counted" + }, + "functionSelector": "37143233", + "id": 3764, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3707, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9143:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9143:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3709, + "kind": "modifierInvocation", + "modifierName": { + "id": 3706, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9130:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9130:39:30" + } + ], + "name": "evaluate", + "nameLocation": "9086:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3705, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9121:8:30" + }, + "parameters": { + "id": 3704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3703, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "9100:10:30", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "9095:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3702, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9095:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9094:17:30" + }, + "returnParameters": { + "id": 3710, + "nodeType": "ParameterList", + "parameters": [], + "src": "9170:0:30" + }, + "scope": 4141, + "src": "9077:692:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2608 + ], + "body": { + "id": 3821, + "nodeType": "Block", + "src": "9904:462:30", + "statements": [ + { + "assignments": [ + 3775 + ], + "declarations": [ + { + "constant": false, + "id": 3775, + "mutability": "mutable", + "name": "election", + "nameLocation": "9935:8:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "9914:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3774, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3773, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9914:12:30" + }, + "referencedDeclaration": 4299, + "src": "9914:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3778, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3776, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9946:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9946:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9914:53:30" + }, + { + "condition": { + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9982:19:30", + "subExpression": { + "expression": { + "id": 3779, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "9983:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9983:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3785, + "nodeType": "IfStatement", + "src": "9978:54:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3782, + "name": "ElectionNotEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4344, + "src": "10010:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10010:22:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3784, + "nodeType": "RevertStatement", + "src": "10003:29:30" + } + }, + { + "assignments": [ + 3787 + ], + "declarations": [ + { + "constant": false, + "id": 3787, + "mutability": "mutable", + "name": "newEpochIndex", + "nameLocation": "10048:13:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "10043:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10043:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3792, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3788, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "10064:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10064:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10090:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10064:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10043:48:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3794, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10127:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3793, + "name": "_removeAllCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "10102:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3796, + "nodeType": "ExpressionStatement", + "src": "10102:39:30" + }, + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 3798, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10170:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "10170:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "10170:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10170:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3802, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10197:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3797, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "10151:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10151:60:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3804, + "nodeType": "ExpressionStatement", + "src": "10151:60:30" + }, + { + "expression": { + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3805, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10222:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "resolved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4274, + "src": "10222:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10242:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10222:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3810, + "nodeType": "ExpressionStatement", + "src": "10222:24:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3811, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "10257:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10257:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3813, + "nodeType": "ExpressionStatement", + "src": "10257:17:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3814, + "name": "_copyScheduleFromPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5512, + "src": "10284:30:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10284:32:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3816, + "nodeType": "ExpressionStatement", + "src": "10284:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3818, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10345:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3817, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "10332:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10332:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3820, + "nodeType": "EmitStatement", + "src": "10327:32:30" + } + ] + }, + "documentation": { + "id": 3765, + "nodeType": "StructuredDocumentation", + "src": "9775:47:30", + "text": "@dev Burns previous NFTs and mints new ones" + }, + "functionSelector": "2810e1d6", + "id": 3822, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3769, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9877:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9877:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3771, + "kind": "modifierInvocation", + "modifierName": { + "id": 3768, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9864:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9864:39:30" + } + ], + "name": "resolve", + "nameLocation": "9836:7:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3767, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9855:8:30" + }, + "parameters": { + "id": 3766, + "nodeType": "ParameterList", + "parameters": [], + "src": "9843:2:30" + }, + "returnParameters": { + "id": 3772, + "nodeType": "ParameterList", + "parameters": [], + "src": "9904:0:30" + }, + "scope": 4141, + "src": "9827:539:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2618 + ], + "body": { + "id": 3846, + "nodeType": "Block", + "src": "10611:189:30", + "statements": [ + { + "assignments": [ + 3834 + ], + "declarations": [ + { + "constant": false, + "id": 3834, + "mutability": "mutable", + "name": "settings", + "nameLocation": "10646:8:30", + "nodeType": "VariableDeclaration", + "scope": 3846, + "src": "10621:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3833, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3832, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "10621:16:30" + }, + "referencedDeclaration": 4261, + "src": "10621:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3837, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3835, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10657:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10657:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10621:55:30" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 3838, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10695:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3839, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "10695:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3840, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10733:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3841, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "10733:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3842, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10767:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3843, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "10767:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "id": 3844, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10694:99:30", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint64_$_t_uint64_$_t_uint64_$", + "typeString": "tuple(uint64,uint64,uint64)" + } + }, + "functionReturnParameters": 3831, + "id": 3845, + "nodeType": "Return", + "src": "10687:106:30" + } + ] + }, + "functionSelector": "8625c053", + "id": 3847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "10381:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3824, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10442:8:30" + }, + "parameters": { + "id": 3823, + "nodeType": "ParameterList", + "parameters": [], + "src": "10401:2:30" + }, + "returnParameters": { + "id": 3831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3826, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "10488:27:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10481:34:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3825, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10481:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3828, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "10536:23:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10529:30:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3827, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10529:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3830, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "10580:16:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10573:23:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3829, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10573:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10467:139:30" + }, + "scope": 4141, + "src": "10372:428:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2624 + ], + "body": { + "id": 3857, + "nodeType": "Block", + "src": "10887:70:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3853, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10904:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10904:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "10904:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3852, + "id": 3856, + "nodeType": "Return", + "src": "10897:53:30" + } + ] + }, + "functionSelector": "e9544a51", + "id": 3858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "10815:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10861:8:30" + }, + "parameters": { + "id": 3848, + "nodeType": "ParameterList", + "parameters": [], + "src": "10844:2:30" + }, + "returnParameters": { + "id": 3852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "10879:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10879:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10878:8:30" + }, + "scope": 4141, + "src": "10806:151:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2630 + ], + "body": { + "id": 3868, + "nodeType": "Block", + "src": "11048:76:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3864, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11065:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3866, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "11065:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3863, + "id": 3867, + "nodeType": "Return", + "src": "11058:59:30" + } + ] + }, + "functionSelector": "0f98dfba", + "id": 3869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "10972:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11024:8:30" + }, + "parameters": { + "id": 3859, + "nodeType": "ParameterList", + "parameters": [], + "src": "11007:2:30" + }, + "returnParameters": { + "id": 3863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3862, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3869, + "src": "11042:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3861, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11042:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11041:6:30" + }, + "scope": 4141, + "src": "10963:161:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2636 + ], + "body": { + "id": 3879, + "nodeType": "Block", + "src": "11202:62:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3875, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11219:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11219:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "11219:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3874, + "id": 3878, + "nodeType": "Return", + "src": "11212:45:30" + } + ] + }, + "functionSelector": "447068ef", + "id": 3880, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "11139:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3871, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11177:8:30" + }, + "parameters": { + "id": 3870, + "nodeType": "ParameterList", + "parameters": [], + "src": "11160:2:30" + }, + "returnParameters": { + "id": 3874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3873, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3880, + "src": "11195:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3872, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11195:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11194:7:30" + }, + "scope": 4141, + "src": "11130:134:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2642 + ], + "body": { + "id": 3890, + "nodeType": "Block", + "src": "11344:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3886, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11361:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3888, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "11361:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3885, + "id": 3889, + "nodeType": "Return", + "src": "11354:47:30" + } + ] + }, + "functionSelector": "85160425", + "id": 3891, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "11279:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11319:8:30" + }, + "parameters": { + "id": 3881, + "nodeType": "ParameterList", + "parameters": [], + "src": "11302:2:30" + }, + "returnParameters": { + "id": 3885, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3884, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3891, + "src": "11337:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3883, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11337:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11336:7:30" + }, + "scope": 4141, + "src": "11270:138:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2648 + ], + "body": { + "id": 3900, + "nodeType": "Block", + "src": "11477:47:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3897, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "11494:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11494:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3896, + "id": 3899, + "nodeType": "Return", + "src": "11487:30:30" + } + ] + }, + "functionSelector": "ffe7f643", + "id": 3901, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "11423:13:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3893, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11453:8:30" + }, + "parameters": { + "id": 3892, + "nodeType": "ParameterList", + "parameters": [], + "src": "11436:2:30" + }, + "returnParameters": { + "id": 3896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3895, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3901, + "src": "11471:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3894, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11471:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11470:6:30" + }, + "scope": 4141, + "src": "11414:110:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2654 + ], + "body": { + "id": 3911, + "nodeType": "Block", + "src": "11599:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3907, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11616:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11616:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "11616:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3906, + "id": 3910, + "nodeType": "Return", + "src": "11609:35:30" + } + ] + }, + "functionSelector": "ce04e44c", + "id": 3912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "11539:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3903, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11573:8:30" + }, + "parameters": { + "id": 3902, + "nodeType": "ParameterList", + "parameters": [], + "src": "11556:2:30" + }, + "returnParameters": { + "id": 3906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3905, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3912, + "src": "11591:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3904, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11591:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11590:8:30" + }, + "scope": 4141, + "src": "11530:121:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2660 + ], + "body": { + "id": 3922, + "nodeType": "Block", + "src": "11724:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3918, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11741:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3920, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "11741:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3917, + "id": 3921, + "nodeType": "Return", + "src": "11734:33:30" + } + ] + }, + "functionSelector": "362c906d", + "id": 3923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "11666:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3914, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11698:8:30" + }, + "parameters": { + "id": 3913, + "nodeType": "ParameterList", + "parameters": [], + "src": "11681:2:30" + }, + "returnParameters": { + "id": 3917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3916, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3923, + "src": "11716:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3915, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11716:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11715:8:30" + }, + "scope": 4141, + "src": "11657:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2666 + ], + "body": { + "id": 3933, + "nodeType": "Block", + "src": "11860:68:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3929, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11877:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11877:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "11877:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3928, + "id": 3932, + "nodeType": "Return", + "src": "11870:51:30" + } + ] + }, + "functionSelector": "e420d7f9", + "id": 3934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "11789:28:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3925, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11834:8:30" + }, + "parameters": { + "id": 3924, + "nodeType": "ParameterList", + "parameters": [], + "src": "11817:2:30" + }, + "returnParameters": { + "id": 3928, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3927, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3934, + "src": "11852:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3926, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11852:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11851:8:30" + }, + "scope": 4141, + "src": "11780:148:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2672 + ], + "body": { + "id": 3944, + "nodeType": "Block", + "src": "12010:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3940, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "12027:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "12027:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3939, + "id": 3943, + "nodeType": "Return", + "src": "12020:47:30" + } + ] + }, + "functionSelector": "e1509015", + "id": 3945, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "11943:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3936, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11984:8:30" + }, + "parameters": { + "id": 3935, + "nodeType": "ParameterList", + "parameters": [], + "src": "11967:2:30" + }, + "returnParameters": { + "id": 3939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3938, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3945, + "src": "12002:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3937, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "12002:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "12001:8:30" + }, + "scope": 4141, + "src": "11934:140:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2678 + ], + "body": { + "id": 3957, + "nodeType": "Block", + "src": "12146:49:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3953, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "12168:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12168:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12163:4:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3951, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12163:4:30", + "typeDescriptions": {} + } + }, + "id": 3955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3950, + "id": 3956, + "nodeType": "Return", + "src": "12156:32:30" + } + ] + }, + "functionSelector": "086146d2", + "id": 3958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "12089:16:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3947, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12122:8:30" + }, + "parameters": { + "id": 3946, + "nodeType": "ParameterList", + "parameters": [], + "src": "12105:2:30" + }, + "returnParameters": { + "id": 3950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3949, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3958, + "src": "12140:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3948, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12140:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12139:6:30" + }, + "scope": 4141, + "src": "12080:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2686 + ], + "body": { + "id": 3973, + "nodeType": "Block", + "src": "12279:74:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3970, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3960, + "src": "12336:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3966, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12296:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12296:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3969, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "12296:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3965, + "id": 3972, + "nodeType": "Return", + "src": "12289:57:30" + } + ] + }, + "functionSelector": "3a3e6c81", + "id": 3974, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "12210:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3962, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12255:8:30" + }, + "parameters": { + "id": 3961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3960, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "12230:9:30", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12222:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12222:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12221:19:30" + }, + "returnParameters": { + "id": 3965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3964, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12273:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3963, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12273:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12272:6:30" + }, + "scope": 4141, + "src": "12201:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2693 + ], + "body": { + "id": 3987, + "nodeType": "Block", + "src": "12432:63:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3981, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12449:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3983, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12449:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3984, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "12449:37:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 3980, + "id": 3986, + "nodeType": "Return", + "src": "12442:46:30" + } + ] + }, + "functionSelector": "9636f67c", + "id": 3988, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "12368:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3976, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12396:8:30" + }, + "parameters": { + "id": 3975, + "nodeType": "ParameterList", + "parameters": [], + "src": "12379:2:30" + }, + "returnParameters": { + "id": 3980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3979, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3988, + "src": "12414:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12414:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3978, + "nodeType": "ArrayTypeName", + "src": "12414:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12413:18:30" + }, + "scope": 4141, + "src": "12359:136:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2702 + ], + "body": { + "id": 4001, + "nodeType": "Block", + "src": "12600:54:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3998, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3991, + "src": "12636:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3997, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "12617:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12617:30:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3996, + "id": 4000, + "nodeType": "Return", + "src": "12610:37:30" + } + ] + }, + "functionSelector": "edc968ba", + "id": 4002, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "12510:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3993, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12573:8:30" + }, + "parameters": { + "id": 3992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3991, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "12547:10:30", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12528:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3989, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12528:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3990, + "nodeType": "ArrayTypeName", + "src": "12528:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12527:31:30" + }, + "returnParameters": { + "id": 3996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3995, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12591:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3994, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12591:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12590:9:30" + }, + "scope": 4141, + "src": "12501:153:30", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2710 + ], + "body": { + "id": 4014, + "nodeType": "Block", + "src": "12737:45:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4011, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4004, + "src": "12770:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4010, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12754:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4009, + "id": 4013, + "nodeType": "Return", + "src": "12747:28:30" + } + ] + }, + "functionSelector": "95ff6584", + "id": 4015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "12669:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4006, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12710:8:30" + }, + "parameters": { + "id": 4005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4004, + "mutability": "mutable", + "name": "user", + "nameLocation": "12692:4:30", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12684:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12684:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12683:14:30" + }, + "returnParameters": { + "id": 4009, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4008, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12728:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4007, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12728:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12727:9:30" + }, + "scope": 4141, + "src": "12660:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2718 + ], + "body": { + "id": 4032, + "nodeType": "Block", + "src": "12856:59:30", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4024, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4017, + "src": "12889:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4023, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12873:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12906:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12898:7:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4026, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12898:7:30", + "typeDescriptions": {} + } + }, + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12898:10:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12873:35:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4022, + "id": 4031, + "nodeType": "Return", + "src": "12866:42:30" + } + ] + }, + "functionSelector": "09eef43e", + "id": 4033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "12797:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4019, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12832:8:30" + }, + "parameters": { + "id": 4018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4017, + "mutability": "mutable", + "name": "user", + "nameLocation": "12814:4:30", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12806:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4016, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12806:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12805:14:30" + }, + "returnParameters": { + "id": 4022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12850:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12850:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12849:6:30" + }, + "scope": 4141, + "src": "12788:127:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2726 + ], + "body": { + "id": 4045, + "nodeType": "Block", + "src": "12995:43:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4042, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "13026:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4041, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "13012:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 4043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13012:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4040, + "id": 4044, + "nodeType": "Return", + "src": "13005:26:30" + } + ] + }, + "functionSelector": "bb9c0920", + "id": 4046, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "12930:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4037, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12971:8:30" + }, + "parameters": { + "id": 4036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "user", + "nameLocation": "12951:4:30", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12943:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12943:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12942:14:30" + }, + "returnParameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4039, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12989:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12989:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12988:6:30" + }, + "scope": 4141, + "src": "12921:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2734 + ], + "body": { + "id": 4059, + "nodeType": "Block", + "src": "13124:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4055, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4048, + "src": "13152:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4054, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13141:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13141:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "13141:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4053, + "id": 4058, + "nodeType": "Return", + "src": "13134:33:30" + } + ] + }, + "functionSelector": "7a3bc0ee", + "id": 4060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "13053:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13100:8:30" + }, + "parameters": { + "id": 4049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4048, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13076:8:30", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13068:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13068:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13067:18:30" + }, + "returnParameters": { + "id": 4053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4052, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13118:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13118:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13117:6:30" + }, + "scope": 4141, + "src": "13044:130:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2743 + ], + "body": { + "id": 4074, + "nodeType": "Block", + "src": "13277:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4070, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4062, + "src": "13305:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4069, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13294:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13294:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "13294:31:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 4068, + "id": 4073, + "nodeType": "Return", + "src": "13287:38:30" + } + ] + }, + "functionSelector": "655aaaca", + "id": 4075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "13189:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4064, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13241:8:30" + }, + "parameters": { + "id": 4063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4062, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13217:8:30", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13209:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4061, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13209:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13208:18:30" + }, + "returnParameters": { + "id": 4068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13259:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4065, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13259:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4066, + "nodeType": "ArrayTypeName", + "src": "13259:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13258:18:30" + }, + "scope": 4141, + "src": "13180:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2749 + ], + "body": { + "id": 4085, + "nodeType": "Block", + "src": "13405:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4081, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13422:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13422:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4083, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "13422:31:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4080, + "id": 4084, + "nodeType": "Return", + "src": "13415:38:30" + } + ] + }, + "functionSelector": "e327b585", + "id": 4086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "13347:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4077, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13381:8:30" + }, + "parameters": { + "id": 4076, + "nodeType": "ParameterList", + "parameters": [], + "src": "13366:2:30" + }, + "returnParameters": { + "id": 4080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "13399:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4078, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13399:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "13398:6:30" + }, + "scope": 4141, + "src": "13338:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2757 + ], + "body": { + "id": 4100, + "nodeType": "Block", + "src": "13550:71:30", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4094, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13567:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13567:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4096, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "13567:36:30", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4098, + "indexExpression": { + "id": 4097, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4088, + "src": "13604:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13567:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4093, + "id": 4099, + "nodeType": "Return", + "src": "13560:54:30" + } + ] + }, + "functionSelector": "d82f25f0", + "id": 4101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "13475:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4090, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13526:8:30" + }, + "parameters": { + "id": 4089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4088, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "13501:9:30", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13493:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13492:19:30" + }, + "returnParameters": { + "id": 4093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4092, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13544:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13544:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13543:6:30" + }, + "scope": 4141, + "src": "13466:155:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2764 + ], + "body": { + "id": 4114, + "nodeType": "Block", + "src": "13707:62:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4108, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13724:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4110, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "13724:29:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13724:36:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:38:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4107, + "id": 4113, + "nodeType": "Return", + "src": "13717:45:30" + } + ] + }, + "functionSelector": "f2516dbf", + "id": 4115, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "13636:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4103, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13671:8:30" + }, + "parameters": { + "id": 4102, + "nodeType": "ParameterList", + "parameters": [], + "src": "13654:2:30" + }, + "returnParameters": { + "id": 4107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4106, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4115, + "src": "13689:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13689:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4105, + "nodeType": "ArrayTypeName", + "src": "13689:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13688:18:30" + }, + "scope": 4141, + "src": "13627:142:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2770 + ], + "body": { + "id": 4125, + "nodeType": "Block", + "src": "13841:53:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4121, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13858:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13858:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "13858:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4120, + "id": 4124, + "nodeType": "Return", + "src": "13851:36:30" + } + ] + }, + "functionSelector": "c07de0d3", + "id": 4126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "13784:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4117, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13814:8:30" + }, + "parameters": { + "id": 4116, + "nodeType": "ParameterList", + "parameters": [], + "src": "13799:2:30" + }, + "returnParameters": { + "id": 4120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4119, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4126, + "src": "13832:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13832:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13831:9:30" + }, + "scope": 4141, + "src": "13775:119:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2777 + ], + "body": { + "id": 4139, + "nodeType": "Block", + "src": "13979:64:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4133, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13996:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "13996:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4136, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13996:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4132, + "id": 4138, + "nodeType": "Return", + "src": "13989:47:30" + } + ] + }, + "functionSelector": "606a6b76", + "id": 4140, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "13909:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4128, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13943:8:30" + }, + "parameters": { + "id": 4127, + "nodeType": "ParameterList", + "parameters": [], + "src": "13926:2:30" + }, + "returnParameters": { + "id": 4132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4131, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4140, + "src": "13961:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13961:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4130, + "nodeType": "ArrayTypeName", + "src": "13961:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13960:18:30" + }, + "scope": 4141, + "src": "13900:143:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4142, + "src": "543:13502:30", + "usedErrors": [ + 5, + 19, + 29, + 31, + 1995, + 1997, + 1999, + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:14015:30" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module for electing a council, represented by a set of NFT holders\ninterface IElectionModule {\n // ---------------------------------------\n // Initialization\n // ---------------------------------------\n\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external;\n\n /// @notice Shows whether the module has been initialized\n function isElectionModuleInitialized() external view returns (bool);\n\n // ---------------------------------------\n // Owner write functions\n // ---------------------------------------\n\n /// @notice Upgrades the implementation of the existing council NFT token\n function upgradeCouncilToken(address newCouncilTokenImplementation) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Determines minimum values for epoch schedule adjustments\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external;\n\n /// @notice Determines adjustment size for tweakEpochSchedule\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external;\n\n /// @notice Determines batch size when evaluate() is called with numBallots = 0\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external;\n\n /// @notice Determines the number of council members in the next epoch\n function setNextEpochSeatCount(uint8 newSeatCount) external;\n\n /// @notice Determines the minimum number of council members before triggering an emergency election\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external;\n\n /// @notice Allows the owner to remove one or more council members, triggering an election if a threshold is met\n function dismissMembers(address[] calldata members) external;\n\n // ---------------------------------------\n // User write functions\n // ---------------------------------------\n\n /// @notice Allows anyone to self-nominate during the Nomination period\n function nominate() external;\n\n /// @notice Self-withdrawal of nominations during the Nomination period\n function withdrawNomination() external;\n\n /// @notice Allows anyone with vote power to vote on nominated candidates during the Voting period\n function cast(address[] calldata candidates) external;\n\n /// @notice Allows votes to be withdraw\n function withdrawVote() external;\n\n /// @notice Processes ballots in batches during the Evaluation period (after epochEndDate)\n function evaluate(uint numBallots) external;\n\n /// @notice Shuffles NFTs and resolves an election after it has been evaluated\n function resolve() external;\n\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Exposes minimum durations required when adjusting epoch schedules\n function getMinEpochDurations()\n external\n view\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n\n /// @notice Exposes maximum size of adjustments when calling tweakEpochSchedule\n function getMaxDateAdjustmentTolerance() external view returns (uint64);\n\n /// @notice Shows the default batch size when calling evaluate() with numBallots = 0\n function getDefaultBallotEvaluationBatchSize() external view returns (uint);\n\n /// @notice Shows the number of council members that the next epoch will have\n function getNextEpochSeatCount() external view returns (uint8);\n\n /// @notice Returns the minimum active members that the council needs to avoid an emergency election\n function getMinimumActiveMembers() external view returns (uint8);\n\n /// @notice Returns the index of the current epoch. The first epoch's index is 1\n function getEpochIndex() external view returns (uint);\n\n /// @notice Returns the date in which the current epoch started\n function getEpochStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the current epoch will end\n function getEpochEndDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the current epoch will start\n function getNominationPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the current epoch will start\n function getVotingPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the current period type: Administration, Nomination, Voting, Evaluation\n function getCurrentPeriod() external view returns (uint);\n\n /// @notice Shows if a candidate has been nominated in the current epoch\n function isNominated(address candidate) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the current epoch\n function getNominees() external view returns (address[] memory);\n\n /// @notice Hashes a list of candidates (used for identifying and storing ballots)\n function calculateBallotId(address[] calldata candidates) external pure returns (bytes32);\n\n /// @notice Returns the ballot id that user voted on in the current election\n function getBallotVoted(address user) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the current election\n function hasVoted(address user) external view returns (bool);\n\n /// @notice Returns the vote power of user in the current election\n function getVotePower(address user) external view returns (uint);\n\n /// @notice Returns the number of votes given to a particular ballot\n function getBallotVotes(bytes32 ballotId) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has\n function getBallotCandidates(bytes32 ballotId) external view returns (address[] memory);\n\n /// @notice Returns whether all ballots in the current election have been counted\n function isElectionEvaluated() external view returns (bool);\n\n /// @notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated\n function getCandidateVotes(address candidate) external view returns (uint);\n\n /// @notice Returns the winners of the current election. Requires the election to be partially or totally evaluated\n function getElectionWinners() external view returns (address[] memory);\n\n /// @notice Returns the address of the council NFT token\n function getCouncilToken() external view returns (address);\n\n /// @notice Returns the current NFT token holders\n function getCouncilMembers() external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "exportedSymbols": { + "IElectionModule": [ + 2778 + ] + }, + "id": 2779, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2486, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:27" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2487, + "nodeType": "StructuredDocumentation", + "src": "56:78:27", + "text": "@title Module for electing a council, represented by a set of NFT holders" + }, + "fullyImplemented": false, + "id": 2778, + "linearizedBaseContracts": [ + 2778 + ], + "name": "IElectionModule", + "nameLocation": "144:15:27", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2488, + "nodeType": "StructuredDocumentation", + "src": "283:73:27", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "ee695137", + "id": 2506, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "370:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2490, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "418:16:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "404:30:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2489, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "404:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2492, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "458:18:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "444:32:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2491, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "444:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2495, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "503:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "486:29:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2493, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "486:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2494, + "nodeType": "ArrayTypeName", + "src": "486:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2497, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "531:20:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "525:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2496, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "525:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2499, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "568:25:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "561:32:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2498, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "561:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2501, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "610:21:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "603:28:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2500, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "603:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2503, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "648:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "641:19:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2502, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "641:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "394:272:27" + }, + "returnParameters": { + "id": 2505, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:0:27" + }, + "scope": 2778, + "src": "361:315:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2507, + "nodeType": "StructuredDocumentation", + "src": "682:57:27", + "text": "@notice Shows whether the module has been initialized" + }, + "functionSelector": "c5798523", + "id": 2512, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "753:27:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2508, + "nodeType": "ParameterList", + "parameters": [], + "src": "780:2:27" + }, + "returnParameters": { + "id": 2511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2510, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "806:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2509, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "806:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "805:6:27" + }, + "scope": 2778, + "src": "744:68:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2513, + "nodeType": "StructuredDocumentation", + "src": "942:73:27", + "text": "@notice Upgrades the implementation of the existing council NFT token" + }, + "functionSelector": "54520478", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeCouncilToken", + "nameLocation": "1029:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2515, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "1057:29:27", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "1049:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2514, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1049:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1048:39:27" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [], + "src": "1096:0:27" + }, + "scope": 2778, + "src": "1020:77:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2519, + "nodeType": "StructuredDocumentation", + "src": "1103:167:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)" + }, + "functionSelector": "8f701997", + "id": 2528, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tweakEpochSchedule", + "nameLocation": "1284:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2521, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1319:28:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1312:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2520, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1312:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1364:24:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1357:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2522, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1357:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1405:15:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1398:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2524, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1398:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1302:124:27" + }, + "returnParameters": { + "id": 2527, + "nodeType": "ParameterList", + "parameters": [], + "src": "1435:0:27" + }, + "scope": 2778, + "src": "1275:161:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2529, + "nodeType": "StructuredDocumentation", + "src": "1442:103:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration" + }, + "functionSelector": "c14d0528", + "id": 2538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "modifyEpochSchedule", + "nameLocation": "1559:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1595:28:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1588:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2530, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1588:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2533, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1640:24:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1633:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2532, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2535, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1681:15:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1674:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2534, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1674:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1578:124:27" + }, + "returnParameters": { + "id": 2537, + "nodeType": "ParameterList", + "parameters": [], + "src": "1711:0:27" + }, + "scope": 2778, + "src": "1550:162:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2539, + "nodeType": "StructuredDocumentation", + "src": "1718:68:27", + "text": "@notice Determines minimum values for epoch schedule adjustments" + }, + "functionSelector": "a25a9f3a", + "id": 2548, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinEpochDurations", + "nameLocation": "1800:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2541, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "1837:30:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1830:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2540, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1830:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2543, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "1884:26:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1877:33:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2542, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1877:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2545, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "1927:19:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1920:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2544, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1920:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1820:132:27" + }, + "returnParameters": { + "id": 2547, + "nodeType": "ParameterList", + "parameters": [], + "src": "1961:0:27" + }, + "scope": 2778, + "src": "1791:171:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2549, + "nodeType": "StructuredDocumentation", + "src": "1968:61:27", + "text": "@notice Determines adjustment size for tweakEpochSchedule" + }, + "functionSelector": "3ac1c5fe", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "2043:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "2080:29:27", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "2073:36:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2550, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2073:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2072:38:27" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "2119:0:27" + }, + "scope": 2778, + "src": "2034:86:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "2126:79:27", + "text": "@notice Determines batch size when evaluate() is called with numBallots = 0" + }, + "functionSelector": "64deab73", + "id": 2560, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "2219:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2557, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "2260:35:27", + "nodeType": "VariableDeclaration", + "scope": 2560, + "src": "2255:40:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2556, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2255:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2254:42:27" + }, + "returnParameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [], + "src": "2305:0:27" + }, + "scope": 2778, + "src": "2210:96:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2561, + "nodeType": "StructuredDocumentation", + "src": "2312:70:27", + "text": "@notice Determines the number of council members in the next epoch" + }, + "functionSelector": "4b5dacac", + "id": 2566, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setNextEpochSeatCount", + "nameLocation": "2396:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "2424:12:27", + "nodeType": "VariableDeclaration", + "scope": 2566, + "src": "2418:18:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2562, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2418:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2417:20:27" + }, + "returnParameters": { + "id": 2565, + "nodeType": "ParameterList", + "parameters": [], + "src": "2446:0:27" + }, + "scope": 2778, + "src": "2387:60:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2567, + "nodeType": "StructuredDocumentation", + "src": "2453:100:27", + "text": "@notice Determines the minimum number of council members before triggering an emergency election" + }, + "functionSelector": "0438d06e", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinimumActiveMembers", + "nameLocation": "2567:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "2597:23:27", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "2591:29:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2568, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2591:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2590:31:27" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "2630:0:27" + }, + "scope": 2778, + "src": "2558:73:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2573, + "nodeType": "StructuredDocumentation", + "src": "2637:112:27", + "text": "@notice Allows the owner to remove one or more council members, triggering an election if a threshold is met" + }, + "functionSelector": "9a25eaf3", + "id": 2579, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "dismissMembers", + "nameLocation": "2763:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2576, + "mutability": "mutable", + "name": "members", + "nameLocation": "2797:7:27", + "nodeType": "VariableDeclaration", + "scope": 2579, + "src": "2778:26:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2778:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2575, + "nodeType": "ArrayTypeName", + "src": "2778:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2777:28:27" + }, + "returnParameters": { + "id": 2578, + "nodeType": "ParameterList", + "parameters": [], + "src": "2814:0:27" + }, + "scope": 2778, + "src": "2754:61:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2580, + "nodeType": "StructuredDocumentation", + "src": "2944:71:27", + "text": "@notice Allows anyone to self-nominate during the Nomination period" + }, + "functionSelector": "fcd7e1d7", + "id": 2583, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominate", + "nameLocation": "3029:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "3037:2:27" + }, + "returnParameters": { + "id": 2582, + "nodeType": "ParameterList", + "parameters": [], + "src": "3048:0:27" + }, + "scope": 2778, + "src": "3020:29:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2584, + "nodeType": "StructuredDocumentation", + "src": "3055:71:27", + "text": "@notice Self-withdrawal of nominations during the Nomination period" + }, + "functionSelector": "d11801cf", + "id": 2587, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawNomination", + "nameLocation": "3140:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2585, + "nodeType": "ParameterList", + "parameters": [], + "src": "3158:2:27" + }, + "returnParameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [], + "src": "3169:0:27" + }, + "scope": 2778, + "src": "3131:39:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2588, + "nodeType": "StructuredDocumentation", + "src": "3176:98:27", + "text": "@notice Allows anyone with vote power to vote on nominated candidates during the Voting period" + }, + "functionSelector": "84ae670c", + "id": 2594, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "cast", + "nameLocation": "3288:4:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2591, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3312:10:27", + "nodeType": "VariableDeclaration", + "scope": 2594, + "src": "3293:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3293:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2590, + "nodeType": "ArrayTypeName", + "src": "3293:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3292:31:27" + }, + "returnParameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [], + "src": "3332:0:27" + }, + "scope": 2778, + "src": "3279:54:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2595, + "nodeType": "StructuredDocumentation", + "src": "3339:39:27", + "text": "@notice Allows votes to be withdraw" + }, + "functionSelector": "d83eb231", + "id": 2598, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawVote", + "nameLocation": "3392:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [], + "src": "3404:2:27" + }, + "returnParameters": { + "id": 2597, + "nodeType": "ParameterList", + "parameters": [], + "src": "3415:0:27" + }, + "scope": 2778, + "src": "3383:33:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2599, + "nodeType": "StructuredDocumentation", + "src": "3422:90:27", + "text": "@notice Processes ballots in batches during the Evaluation period (after epochEndDate)" + }, + "functionSelector": "37143233", + "id": 2604, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "evaluate", + "nameLocation": "3526:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2601, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "3540:10:27", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "3535:15:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2600, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3535:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3534:17:27" + }, + "returnParameters": { + "id": 2603, + "nodeType": "ParameterList", + "parameters": [], + "src": "3560:0:27" + }, + "scope": 2778, + "src": "3517:44:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2605, + "nodeType": "StructuredDocumentation", + "src": "3567:78:27", + "text": "@notice Shuffles NFTs and resolves an election after it has been evaluated" + }, + "functionSelector": "2810e1d6", + "id": 2608, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "resolve", + "nameLocation": "3659:7:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2606, + "nodeType": "ParameterList", + "parameters": [], + "src": "3666:2:27" + }, + "returnParameters": { + "id": 2607, + "nodeType": "ParameterList", + "parameters": [], + "src": "3677:0:27" + }, + "scope": 2778, + "src": "3650:28:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2609, + "nodeType": "StructuredDocumentation", + "src": "3801:77:27", + "text": "@notice Exposes minimum durations required when adjusting epoch schedules" + }, + "functionSelector": "8625c053", + "id": 2618, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "3892:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2610, + "nodeType": "ParameterList", + "parameters": [], + "src": "3912:2:27" + }, + "returnParameters": { + "id": 2617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2612, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "3982:27:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "3975:34:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2611, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3975:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2614, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "4030:23:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4023:30:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2613, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4023:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2616, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "4074:16:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4067:23:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2615, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4067:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3961:139:27" + }, + "scope": 2778, + "src": "3883:218:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2619, + "nodeType": "StructuredDocumentation", + "src": "4107:79:27", + "text": "@notice Exposes maximum size of adjustments when calling tweakEpochSchedule" + }, + "functionSelector": "e9544a51", + "id": 2624, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "4200:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2620, + "nodeType": "ParameterList", + "parameters": [], + "src": "4229:2:27" + }, + "returnParameters": { + "id": 2623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2622, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2624, + "src": "4255:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2621, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4255:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4254:8:27" + }, + "scope": 2778, + "src": "4191:72:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2625, + "nodeType": "StructuredDocumentation", + "src": "4269:84:27", + "text": "@notice Shows the default batch size when calling evaluate() with numBallots = 0" + }, + "functionSelector": "0f98dfba", + "id": 2630, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "4367:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "4402:2:27" + }, + "returnParameters": { + "id": 2629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2630, + "src": "4428:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2627, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4428:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4427:6:27" + }, + "scope": 2778, + "src": "4358:76:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2631, + "nodeType": "StructuredDocumentation", + "src": "4440:77:27", + "text": "@notice Shows the number of council members that the next epoch will have" + }, + "functionSelector": "447068ef", + "id": 2636, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "4531:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2632, + "nodeType": "ParameterList", + "parameters": [], + "src": "4552:2:27" + }, + "returnParameters": { + "id": 2635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2634, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "4578:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2633, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4578:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4577:7:27" + }, + "scope": 2778, + "src": "4522:63:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2637, + "nodeType": "StructuredDocumentation", + "src": "4591:100:27", + "text": "@notice Returns the minimum active members that the council needs to avoid an emergency election" + }, + "functionSelector": "85160425", + "id": 2642, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "4705:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2638, + "nodeType": "ParameterList", + "parameters": [], + "src": "4728:2:27" + }, + "returnParameters": { + "id": 2641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "4754:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2639, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4754:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4753:7:27" + }, + "scope": 2778, + "src": "4696:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2643, + "nodeType": "StructuredDocumentation", + "src": "4767:80:27", + "text": "@notice Returns the index of the current epoch. The first epoch's index is 1" + }, + "functionSelector": "ffe7f643", + "id": 2648, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "4861:13:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2644, + "nodeType": "ParameterList", + "parameters": [], + "src": "4874:2:27" + }, + "returnParameters": { + "id": 2647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2646, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2648, + "src": "4900:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2645, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4900:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4899:6:27" + }, + "scope": 2778, + "src": "4852:54:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2649, + "nodeType": "StructuredDocumentation", + "src": "4912:63:27", + "text": "@notice Returns the date in which the current epoch started" + }, + "functionSelector": "ce04e44c", + "id": 2654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "4989:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2650, + "nodeType": "ParameterList", + "parameters": [], + "src": "5006:2:27" + }, + "returnParameters": { + "id": 2653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2652, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2654, + "src": "5032:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2651, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5032:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5031:8:27" + }, + "scope": 2778, + "src": "4980:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2655, + "nodeType": "StructuredDocumentation", + "src": "5046:64:27", + "text": "@notice Returns the date in which the current epoch will end" + }, + "functionSelector": "362c906d", + "id": 2660, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "5124:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2656, + "nodeType": "ParameterList", + "parameters": [], + "src": "5139:2:27" + }, + "returnParameters": { + "id": 2659, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2658, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2660, + "src": "5165:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2657, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5165:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5164:8:27" + }, + "scope": 2778, + "src": "5115:58:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2661, + "nodeType": "StructuredDocumentation", + "src": "5179:91:27", + "text": "@notice Returns the date in which the Nomination period in the current epoch will start" + }, + "functionSelector": "e420d7f9", + "id": 2666, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "5284:28:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2662, + "nodeType": "ParameterList", + "parameters": [], + "src": "5312:2:27" + }, + "returnParameters": { + "id": 2665, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2664, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2666, + "src": "5338:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2663, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5338:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5337:8:27" + }, + "scope": 2778, + "src": "5275:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2667, + "nodeType": "StructuredDocumentation", + "src": "5352:87:27", + "text": "@notice Returns the date in which the Voting period in the current epoch will start" + }, + "functionSelector": "e1509015", + "id": 2672, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "5453:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2668, + "nodeType": "ParameterList", + "parameters": [], + "src": "5477:2:27" + }, + "returnParameters": { + "id": 2671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2670, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2672, + "src": "5503:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2669, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5503:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5502:8:27" + }, + "scope": 2778, + "src": "5444:67:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2673, + "nodeType": "StructuredDocumentation", + "src": "5517:91:27", + "text": "@notice Returns the current period type: Administration, Nomination, Voting, Evaluation" + }, + "functionSelector": "086146d2", + "id": 2678, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "5622:16:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2674, + "nodeType": "ParameterList", + "parameters": [], + "src": "5638:2:27" + }, + "returnParameters": { + "id": 2677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2678, + "src": "5664:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2675, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5664:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5663:6:27" + }, + "scope": 2778, + "src": "5613:57:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2679, + "nodeType": "StructuredDocumentation", + "src": "5676:72:27", + "text": "@notice Shows if a candidate has been nominated in the current epoch" + }, + "functionSelector": "3a3e6c81", + "id": 2686, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "5762:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2681, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "5782:9:27", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5774:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5774:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5773:19:27" + }, + "returnParameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5816:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5816:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5815:6:27" + }, + "scope": 2778, + "src": "5753:69:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2687, + "nodeType": "StructuredDocumentation", + "src": "5828:75:27", + "text": "@notice Returns a list of all nominated candidates in the current epoch" + }, + "functionSelector": "9636f67c", + "id": 2693, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "5917:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2688, + "nodeType": "ParameterList", + "parameters": [], + "src": "5928:2:27" + }, + "returnParameters": { + "id": 2692, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2691, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2693, + "src": "5954:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2689, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5954:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ArrayTypeName", + "src": "5954:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5953:18:27" + }, + "scope": 2778, + "src": "5908:64:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2694, + "nodeType": "StructuredDocumentation", + "src": "5978:82:27", + "text": "@notice Hashes a list of candidates (used for identifying and storing ballots)" + }, + "functionSelector": "edc968ba", + "id": 2702, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "6074:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2697, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6111:10:27", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6092:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6092:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2696, + "nodeType": "ArrayTypeName", + "src": "6092:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6091:31:27" + }, + "returnParameters": { + "id": 2701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2700, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6146:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2699, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6146:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6145:9:27" + }, + "scope": 2778, + "src": "6065:90:27", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2703, + "nodeType": "StructuredDocumentation", + "src": "6161:76:27", + "text": "@notice Returns the ballot id that user voted on in the current election" + }, + "functionSelector": "95ff6584", + "id": 2710, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "6251:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2706, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "user", + "nameLocation": "6274:4:27", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6266:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6266:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6265:14:27" + }, + "returnParameters": { + "id": 2709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2708, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6303:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2707, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6303:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6302:9:27" + }, + "scope": 2778, + "src": "6242:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2711, + "nodeType": "StructuredDocumentation", + "src": "6318:61:27", + "text": "@notice Returns if user has voted in the current election" + }, + "functionSelector": "09eef43e", + "id": 2718, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "6393:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2713, + "mutability": "mutable", + "name": "user", + "nameLocation": "6410:4:27", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6402:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6402:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6401:14:27" + }, + "returnParameters": { + "id": 2717, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2716, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6439:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6439:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "6438:6:27" + }, + "scope": 2778, + "src": "6384:61:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2719, + "nodeType": "StructuredDocumentation", + "src": "6451:66:27", + "text": "@notice Returns the vote power of user in the current election" + }, + "functionSelector": "bb9c0920", + "id": 2726, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "6531:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "user", + "nameLocation": "6552:4:27", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6544:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2720, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6544:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6543:14:27" + }, + "returnParameters": { + "id": 2725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2724, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6581:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2723, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6581:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6580:6:27" + }, + "scope": 2778, + "src": "6522:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2727, + "nodeType": "StructuredDocumentation", + "src": "6593:68:27", + "text": "@notice Returns the number of votes given to a particular ballot" + }, + "functionSelector": "7a3bc0ee", + "id": 2734, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "6675:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2729, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6698:8:27", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6690:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2728, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6690:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6689:18:27" + }, + "returnParameters": { + "id": 2733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2732, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6731:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2731, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6731:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6730:6:27" + }, + "scope": 2778, + "src": "6666:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2735, + "nodeType": "StructuredDocumentation", + "src": "6743:71:27", + "text": "@notice Returns the list of candidates that a particular ballot has" + }, + "functionSelector": "655aaaca", + "id": 2743, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "6828:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2738, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2737, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6856:8:27", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6848:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2736, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6848:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6847:18:27" + }, + "returnParameters": { + "id": 2742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2741, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6889:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6889:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2740, + "nodeType": "ArrayTypeName", + "src": "6889:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6888:18:27" + }, + "scope": 2778, + "src": "6819:88:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2744, + "nodeType": "StructuredDocumentation", + "src": "6913:81:27", + "text": "@notice Returns whether all ballots in the current election have been counted" + }, + "functionSelector": "e327b585", + "id": 2749, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "7008:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2745, + "nodeType": "ParameterList", + "parameters": [], + "src": "7027:2:27" + }, + "returnParameters": { + "id": 2748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2747, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2749, + "src": "7053:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2746, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7053:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7052:6:27" + }, + "scope": 2778, + "src": "6999:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2750, + "nodeType": "StructuredDocumentation", + "src": "7065:120:27", + "text": "@notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "d82f25f0", + "id": 2757, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "7199:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2752, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "7225:9:27", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7217:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7217:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7216:19:27" + }, + "returnParameters": { + "id": 2756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2755, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7259:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2754, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7259:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7258:6:27" + }, + "scope": 2778, + "src": "7190:75:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2758, + "nodeType": "StructuredDocumentation", + "src": "7271:115:27", + "text": "@notice Returns the winners of the current election. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "f2516dbf", + "id": 2764, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "7400:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2759, + "nodeType": "ParameterList", + "parameters": [], + "src": "7418:2:27" + }, + "returnParameters": { + "id": 2763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2762, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7444:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7444:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2761, + "nodeType": "ArrayTypeName", + "src": "7444:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7443:18:27" + }, + "scope": 2778, + "src": "7391:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2765, + "nodeType": "StructuredDocumentation", + "src": "7468:56:27", + "text": "@notice Returns the address of the council NFT token" + }, + "functionSelector": "c07de0d3", + "id": 2770, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "7538:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2766, + "nodeType": "ParameterList", + "parameters": [], + "src": "7553:2:27" + }, + "returnParameters": { + "id": 2769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2768, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2770, + "src": "7579:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7579:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7578:9:27" + }, + "scope": 2778, + "src": "7529:59:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2771, + "nodeType": "StructuredDocumentation", + "src": "7594:49:27", + "text": "@notice Returns the current NFT token holders" + }, + "functionSelector": "606a6b76", + "id": 2777, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "7657:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2772, + "nodeType": "ParameterList", + "parameters": [], + "src": "7674:2:27" + }, + "returnParameters": { + "id": 2776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2775, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2777, + "src": "7700:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7700:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2774, + "nodeType": "ArrayTypeName", + "src": "7700:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7699:18:27" + }, + "scope": 2778, + "src": "7648:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2779, + "src": "134:7586:27", + "usedErrors": [] + } + ], + "src": "31:7690:27" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\n\n/// @dev Provides core schedule functionality. I.e. dates, periods, etc\ncontract ElectionSchedule is ElectionBase {\n /// @dev Used to allow certain functions to only operate within a given period\n modifier onlyInPeriod(ElectionPeriod period) {\n _onlyInPeriod(period);\n\n _;\n }\n\n function _onlyInPeriod(ElectionPeriod period) private view {\n if (_getCurrentPeriod() != period) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Only allow to run in any of the given two periods\n modifier onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) {\n _onlyInPeriods(period1, period2);\n\n _;\n }\n\n function _onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) private view {\n ElectionPeriod currentPeriod = _getCurrentPeriod();\n\n if (currentPeriod != period1 && currentPeriod != period2) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Determines the current period type according to the current time and the epoch's dates\n function _getCurrentPeriod() internal view returns (ElectionPeriod) {\n if (!_electionStore().initialized) {\n revert InitError.NotInitialized();\n }\n\n EpochData storage epoch = _getCurrentEpoch();\n\n uint64 currentTime = uint64(block.timestamp);\n\n if (currentTime >= epoch.endDate) {\n return ElectionPeriod.Evaluation;\n }\n\n if (currentTime >= epoch.votingPeriodStartDate) {\n return ElectionPeriod.Vote;\n }\n\n if (currentTime >= epoch.nominationPeriodStartDate) {\n return ElectionPeriod.Nomination;\n }\n\n return ElectionPeriod.Administration;\n }\n\n /// @dev Sets dates within an epoch, with validations\n function _configureEpochSchedule(\n EpochData storage epoch,\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n _validateEpochSchedule(epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n epoch.startDate = epochStartDate;\n epoch.nominationPeriodStartDate = nominationPeriodStartDate;\n epoch.votingPeriodStartDate = votingPeriodStartDate;\n epoch.endDate = epochEndDate;\n }\n\n /// @dev Ensures epoch dates are in the correct order, durations are above minimums, etc\n function _validateEpochSchedule(\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) private view {\n if (\n epochEndDate <= votingPeriodStartDate ||\n votingPeriodStartDate <= nominationPeriodStartDate ||\n nominationPeriodStartDate <= epochStartDate\n ) {\n revert InvalidEpochConfiguration();\n }\n\n uint64 epochDuration = epochEndDate - epochStartDate;\n uint64 votingPeriodDuration = epochEndDate - votingPeriodStartDate;\n uint64 nominationPeriodDuration = votingPeriodStartDate - nominationPeriodStartDate;\n\n ElectionSettings storage settings = _electionSettings();\n\n if (\n epochDuration < settings.minEpochDuration ||\n nominationPeriodDuration < settings.minNominationPeriodDuration ||\n votingPeriodDuration < settings.minVotingPeriodDuration\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n /// @dev Changes epoch dates, with validations\n function _adjustEpochSchedule(\n EpochData storage epoch,\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate,\n bool ensureChangesAreSmall\n ) internal {\n uint64 maxDateAdjustmentTolerance = _electionSettings().maxDateAdjustmentTolerance;\n ElectionPeriod initialPeriod = _getCurrentPeriod();\n\n if (ensureChangesAreSmall) {\n if (\n _uint64AbsDifference(newEpochEndDate, epoch.endDate) > maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newNominationPeriodStartDate, epoch.nominationPeriodStartDate) >\n maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newVotingPeriodStartDate, epoch.votingPeriodStartDate) > maxDateAdjustmentTolerance\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n _configureEpochSchedule(\n epoch,\n epoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n\n if (_getCurrentPeriod() != initialPeriod) {\n revert ChangesCurrentPeriod();\n }\n }\n\n /// @dev Moves schedule forward to immediately jump to the nomination period\n function _jumpToNominationPeriod() internal {\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 nominationPeriodDuration = _getNominationPeriodDuration(currentEpoch);\n uint64 votingPeriodDuration = _getVotingPeriodDuration(currentEpoch);\n\n // Keep the previous durations, but shift everything back\n // so that nominations start now\n uint64 newNominationPeriodStartDate = uint64(block.timestamp);\n uint64 newVotingPeriodStartDate = newNominationPeriodStartDate + nominationPeriodDuration;\n uint64 newEpochEndDate = newVotingPeriodStartDate + votingPeriodDuration;\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n }\n\n /// @dev Copies the current epoch schedule to the next epoch, maintaining durations\n function _copyScheduleFromPreviousEpoch() internal {\n EpochData storage previousEpoch = _getPreviousEpoch();\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 currentEpochStartDate = uint64(block.timestamp);\n uint64 currentEpochEndDate = currentEpochStartDate + _getEpochDuration(previousEpoch);\n uint64 currentVotingPeriodStartDate = currentEpochEndDate - _getVotingPeriodDuration(previousEpoch);\n uint64 currentNominationPeriodStartDate = currentVotingPeriodStartDate - _getNominationPeriodDuration(previousEpoch);\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpochStartDate,\n currentNominationPeriodStartDate,\n currentVotingPeriodStartDate,\n currentEpochEndDate\n );\n }\n\n /// @dev Sets the minimum epoch durations, with validations\n function _setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) internal {\n ElectionSettings storage settings = _electionSettings();\n\n if (newMinNominationPeriodDuration == 0 || newMinVotingPeriodDuration == 0 || newMinEpochDuration == 0) {\n revert InvalidElectionSettings();\n }\n\n settings.minNominationPeriodDuration = newMinNominationPeriodDuration;\n settings.minVotingPeriodDuration = newMinVotingPeriodDuration;\n settings.minEpochDuration = newMinEpochDuration;\n }\n\n function _uint64AbsDifference(uint64 valueA, uint64 valueB) private pure returns (uint64) {\n return valueA > valueB ? valueA - valueB : valueB - valueA;\n }\n\n function _getEpochDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.startDate;\n }\n\n function _getVotingPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.votingPeriodStartDate;\n }\n\n function _getNominationPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.votingPeriodStartDate - epoch.nominationPeriodStartDate;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "InitError": [ + 32 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5631, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5067, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:36" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5068, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 4684, + "src": "56:28:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 5069, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 33, + "src": "85:68:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5071, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "256:12:36" + }, + "id": 5072, + "nodeType": "InheritanceSpecifier", + "src": "256:12:36" + } + ], + "canonicalName": "ElectionSchedule", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5070, + "nodeType": "StructuredDocumentation", + "src": "155:72:36", + "text": "@dev Provides core schedule functionality. I.e. dates, periods, etc" + }, + "fullyImplemented": true, + "id": 5630, + "linearizedBaseContracts": [ + 5630, + 4683, + 4331 + ], + "name": "ElectionSchedule", + "nameLocation": "236:16:36", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 5083, + "nodeType": "Block", + "src": "403:50:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5079, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5076, + "src": "427:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5078, + "name": "_onlyInPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "413:13:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "413:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5081, + "nodeType": "ExpressionStatement", + "src": "413:21:36" + }, + { + "id": 5082, + "nodeType": "PlaceholderStatement", + "src": "445:1:36" + } + ] + }, + "documentation": { + "id": 5073, + "nodeType": "StructuredDocumentation", + "src": "275:78:36", + "text": "@dev Used to allow certain functions to only operate within a given period" + }, + "id": 5084, + "name": "onlyInPeriod", + "nameLocation": "367:12:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5076, + "mutability": "mutable", + "name": "period", + "nameLocation": "395:6:36", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "380:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5074, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "380:14:36" + }, + "referencedDeclaration": 4342, + "src": "380:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "379:23:36" + }, + "src": "358:95:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5099, + "nodeType": "Block", + "src": "518:111:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5090, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "532:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "532:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5092, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "532:29:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5098, + "nodeType": "IfStatement", + "src": "528:95:36", + "trueBody": { + "id": 5097, + "nodeType": "Block", + "src": "563:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5094, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "584:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "584:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5096, + "nodeType": "RevertStatement", + "src": "577:35:36" + } + ] + } + } + ] + }, + "id": 5100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriod", + "nameLocation": "468:13:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5087, + "mutability": "mutable", + "name": "period", + "nameLocation": "497:6:36", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "482:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5085, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "482:14:36" + }, + "referencedDeclaration": 4342, + "src": "482:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "481:23:36" + }, + "returnParameters": { + "id": 5089, + "nodeType": "ParameterList", + "parameters": [], + "src": "518:0:36" + }, + "scope": 5630, + "src": "459:170:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5115, + "nodeType": "Block", + "src": "769:61:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5110, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "794:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "id": 5111, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5107, + "src": "803:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5109, + "name": "_onlyInPeriods", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5144, + "src": "779:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod,enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "779:32:36" + }, + { + "id": 5114, + "nodeType": "PlaceholderStatement", + "src": "822:1:36" + } + ] + }, + "documentation": { + "id": 5101, + "nodeType": "StructuredDocumentation", + "src": "635:58:36", + "text": "@dev Only allow to run in any of the given two periods" + }, + "id": 5116, + "name": "onlyInPeriods", + "nameLocation": "707:13:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5104, + "mutability": "mutable", + "name": "period1", + "nameLocation": "736:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "721:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5103, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5102, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "721:14:36" + }, + "referencedDeclaration": 4342, + "src": "721:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5107, + "mutability": "mutable", + "name": "period2", + "nameLocation": "760:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "745:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5106, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5105, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "745:14:36" + }, + "referencedDeclaration": 4342, + "src": "745:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "720:48:36" + }, + "src": "698:132:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5143, + "nodeType": "Block", + "src": "921:195:36", + "statements": [ + { + "assignments": [ + 5127 + ], + "declarations": [ + { + "constant": false, + "id": 5127, + "mutability": "mutable", + "name": "currentPeriod", + "nameLocation": "946:13:36", + "nodeType": "VariableDeclaration", + "scope": 5143, + "src": "931:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5126, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5125, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "931:14:36" + }, + "referencedDeclaration": 4342, + "src": "931:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5130, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5128, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "962:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "962:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "931:50:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5131, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "996:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5132, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "1013:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "996:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5134, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "1024:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5135, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5122, + "src": "1041:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "1024:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "996:52:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5142, + "nodeType": "IfStatement", + "src": "992:118:36", + "trueBody": { + "id": 5141, + "nodeType": "Block", + "src": "1050:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5138, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "1071:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1071:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5140, + "nodeType": "RevertStatement", + "src": "1064:35:36" + } + ] + } + } + ] + }, + "id": 5144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriods", + "nameLocation": "845:14:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "period1", + "nameLocation": "875:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "860:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5118, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5117, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "860:14:36" + }, + "referencedDeclaration": 4342, + "src": "860:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5122, + "mutability": "mutable", + "name": "period2", + "nameLocation": "899:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "884:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5121, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5120, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "884:14:36" + }, + "referencedDeclaration": 4342, + "src": "884:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "859:48:36" + }, + "returnParameters": { + "id": 5124, + "nodeType": "ParameterList", + "parameters": [], + "src": "921:0:36" + }, + "scope": 5630, + "src": "836:280:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5206, + "nodeType": "Block", + "src": "1290:595:36", + "statements": [ + { + "condition": { + "id": 5154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1304:29:36", + "subExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5151, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1305:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1305:16:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "1305:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5161, + "nodeType": "IfStatement", + "src": "1300:93:36", + "trueBody": { + "id": 5160, + "nodeType": "Block", + "src": "1335:58:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5155, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1356:9:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 5157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "1356:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1356:26:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5159, + "nodeType": "RevertStatement", + "src": "1349:33:36" + } + ] + } + }, + { + "assignments": [ + 5164 + ], + "declarations": [ + { + "constant": false, + "id": 5164, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "1421:5:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1403:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5163, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5162, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1403:9:36" + }, + "referencedDeclaration": 4270, + "src": "1403:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5167, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5165, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "1429:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1403:44:36" + }, + { + "assignments": [ + 5169 + ], + "declarations": [ + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "currentTime", + "nameLocation": "1465:11:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1458:18:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5168, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1458:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5175, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5172, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1486:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1486:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1479:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5170, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1479:6:36", + "typeDescriptions": {} + } + }, + "id": 5174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1479:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1458:44:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5176, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1517:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5177, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1532:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "1532:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1517:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5184, + "nodeType": "IfStatement", + "src": "1513:91:36", + "trueBody": { + "id": 5183, + "nodeType": "Block", + "src": "1547:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5180, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1568:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "1568:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5182, + "nodeType": "Return", + "src": "1561:32:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5185, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1618:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5186, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1633:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "1633:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1618:42:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5193, + "nodeType": "IfStatement", + "src": "1614:99:36", + "trueBody": { + "id": 5192, + "nodeType": "Block", + "src": "1662:51:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5189, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1683:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "1683:19:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5191, + "nodeType": "Return", + "src": "1676:26:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5194, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1727:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5195, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1742:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "1742:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1727:46:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5202, + "nodeType": "IfStatement", + "src": "1723:109:36", + "trueBody": { + "id": 5201, + "nodeType": "Block", + "src": "1775:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5198, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1796:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "1796:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5200, + "nodeType": "Return", + "src": "1789:32:36" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 5203, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1849:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "1849:29:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5205, + "nodeType": "Return", + "src": "1842:36:36" + } + ] + }, + "documentation": { + "id": 5145, + "nodeType": "StructuredDocumentation", + "src": "1122:95:36", + "text": "@dev Determines the current period type according to the current time and the epoch's dates" + }, + "id": 5207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentPeriod", + "nameLocation": "1231:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5146, + "nodeType": "ParameterList", + "parameters": [], + "src": "1248:2:36" + }, + "returnParameters": { + "id": 5150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5149, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5207, + "src": "1274:14:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5148, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5147, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "1274:14:36" + }, + "referencedDeclaration": 4342, + "src": "1274:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "1273:16:36" + }, + "scope": 5630, + "src": "1222:663:36", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5253, + "nodeType": "Block", + "src": "2170:330:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5223, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2203:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5224, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2219:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5225, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2246:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5226, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2269:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5222, + "name": "_validateEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "2180:22:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64,uint64) view" + } + }, + "id": 5227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2180:102:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5228, + "nodeType": "ExpressionStatement", + "src": "2180:102:36" + }, + { + "expression": { + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5229, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2293:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "2293:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5232, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2311:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2293:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5234, + "nodeType": "ExpressionStatement", + "src": "2293:32:36" + }, + { + "expression": { + "id": 5239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5235, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2335:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "2335:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5238, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2369:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2335:59:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5240, + "nodeType": "ExpressionStatement", + "src": "2335:59:36" + }, + { + "expression": { + "id": 5245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5241, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2404:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "2404:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5244, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2434:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2404:51:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5246, + "nodeType": "ExpressionStatement", + "src": "2404:51:36" + }, + { + "expression": { + "id": 5251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5247, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2465:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "2465:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5250, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2481:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2465:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5252, + "nodeType": "ExpressionStatement", + "src": "2465:28:36" + } + ] + }, + "documentation": { + "id": 5208, + "nodeType": "StructuredDocumentation", + "src": "1891:53:36", + "text": "@dev Sets dates within an epoch, with validations" + }, + "id": 5254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_configureEpochSchedule", + "nameLocation": "1958:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5211, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "2009:5:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "1991:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5210, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5209, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1991:9:36" + }, + "referencedDeclaration": 4270, + "src": "1991:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5213, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2031:14:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2024:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5212, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2024:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5215, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2062:25:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2055:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5214, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2055:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5217, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2104:21:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2097:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5216, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2097:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5219, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2142:12:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2135:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2135:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1981:179:36" + }, + "returnParameters": { + "id": 5221, + "nodeType": "ParameterList", + "parameters": [], + "src": "2170:0:36" + }, + "scope": 5630, + "src": "1949:551:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5325, + "nodeType": "Block", + "src": "2790:851:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5266, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "2817:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5267, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2833:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2817:37:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5269, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2870:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5270, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2895:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2870:50:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:103:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5273, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2936:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5274, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "2965:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2936:43:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:162:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5281, + "nodeType": "IfStatement", + "src": "2800:249:36", + "trueBody": { + "id": 5280, + "nodeType": "Block", + "src": "2990:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5277, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3011:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3011:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5279, + "nodeType": "RevertStatement", + "src": "3004:34:36" + } + ] + } + }, + { + "assignments": [ + 5283 + ], + "declarations": [ + { + "constant": false, + "id": 5283, + "mutability": "mutable", + "name": "epochDuration", + "nameLocation": "3066:13:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3059:20:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5282, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3059:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5284, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3082:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5285, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "3097:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3082:29:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3059:52:36" + }, + { + "assignments": [ + 5289 + ], + "declarations": [ + { + "constant": false, + "id": 5289, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "3128:20:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3121:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5288, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3121:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5293, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5290, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3151:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5291, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3166:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3151:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3121:66:36" + }, + { + "assignments": [ + 5295 + ], + "declarations": [ + { + "constant": false, + "id": 5295, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "3204:24:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3197:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5294, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3197:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5299, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5296, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3231:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5297, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "3255:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3231:49:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3197:83:36" + }, + { + "assignments": [ + 5302 + ], + "declarations": [ + { + "constant": false, + "id": 5302, + "mutability": "mutable", + "name": "settings", + "nameLocation": "3316:8:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3291:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5301, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5300, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3291:16:36" + }, + "referencedDeclaration": 4261, + "src": "3291:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5305, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5303, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3327:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3327:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3291:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5306, + "name": "epochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3374:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5307, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3390:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "3390:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3374:41:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5310, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5295, + "src": "3431:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5311, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3458:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "3458:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3431:63:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:120:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5315, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "3510:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5316, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3533:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "3533:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3510:55:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:191:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5324, + "nodeType": "IfStatement", + "src": "3357:278:36", + "trueBody": { + "id": 5323, + "nodeType": "Block", + "src": "3576:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5320, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3597:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3597:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5322, + "nodeType": "RevertStatement", + "src": "3590:34:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5255, + "nodeType": "StructuredDocumentation", + "src": "2506:88:36", + "text": "@dev Ensures epoch dates are in the correct order, durations are above minimums, etc" + }, + "id": 5326, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateEpochSchedule", + "nameLocation": "2608:22:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5257, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2647:14:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2640:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5256, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2640:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5259, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2678:25:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2671:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5258, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2671:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5261, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2720:21:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2713:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5260, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2713:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5263, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2758:12:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2751:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2751:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2630:146:36" + }, + "returnParameters": { + "id": 5265, + "nodeType": "ParameterList", + "parameters": [], + "src": "2790:0:36" + }, + "scope": 5630, + "src": "2599:1042:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5402, + "nodeType": "Block", + "src": "3930:983:36", + "statements": [ + { + "assignments": [ + 5342 + ], + "declarations": [ + { + "constant": false, + "id": 5342, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "3947:26:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "3940:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5341, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3940:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5346, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5343, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3976:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3976:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "3976:46:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3940:82:36" + }, + { + "assignments": [ + 5349 + ], + "declarations": [ + { + "constant": false, + "id": 5349, + "mutability": "mutable", + "name": "initialPeriod", + "nameLocation": "4047:13:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "4032:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5348, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5347, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "4032:14:36" + }, + "referencedDeclaration": 4342, + "src": "4032:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5352, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5350, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4063:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4063:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4032:50:36" + }, + { + "condition": { + "id": 5353, + "name": "ensureChangesAreSmall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5338, + "src": "4097:21:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5383, + "nodeType": "IfStatement", + "src": "4093:507:36", + "trueBody": { + "id": 5382, + "nodeType": "Block", + "src": "4120:480:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5355, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4176:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5356, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4193:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5357, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "4193:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5354, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4155:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4155:52:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5359, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4210:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4155:81:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5362, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4277:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5363, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4307:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5364, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "4307:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5361, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4256:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4256:83:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5366, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4358:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4256:128:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:229:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5370, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4425:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5371, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4451:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "4451:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5369, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4404:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4404:75:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5374, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4482:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4404:104:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:353:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5381, + "nodeType": "IfStatement", + "src": "4134:456:36", + "trueBody": { + "id": 5380, + "nodeType": "Block", + "src": "4523:67:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5377, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "4548:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4548:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5379, + "nodeType": "RevertStatement", + "src": "4541:34:36" + } + ] + } + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5385, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4647:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5386, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4666:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5387, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "4666:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5388, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4695:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5389, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4737:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5390, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4775:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5384, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "4610:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4610:190:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5392, + "nodeType": "ExpressionStatement", + "src": "4610:190:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5393, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4815:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4815:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5395, + "name": "initialPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5349, + "src": "4838:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "4815:36:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5401, + "nodeType": "IfStatement", + "src": "4811:96:36", + "trueBody": { + "id": 5400, + "nodeType": "Block", + "src": "4853:54:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5397, + "name": "ChangesCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4366, + "src": "4874:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4874:22:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5399, + "nodeType": "RevertStatement", + "src": "4867:29:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5327, + "nodeType": "StructuredDocumentation", + "src": "3647:46:36", + "text": "@dev Changes epoch dates, with validations" + }, + "id": 5403, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_adjustEpochSchedule", + "nameLocation": "3707:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5330, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "3755:5:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3737:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5329, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5328, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3737:9:36" + }, + "referencedDeclaration": 4270, + "src": "3737:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3777:28:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3770:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3770:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5334, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3822:24:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3815:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5333, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3815:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5336, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3863:15:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3856:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5335, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3856:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5338, + "mutability": "mutable", + "name": "ensureChangesAreSmall", + "nameLocation": "3893:21:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3888:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5337, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3888:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3727:193:36" + }, + "returnParameters": { + "id": 5340, + "nodeType": "ParameterList", + "parameters": [], + "src": "3930:0:36" + }, + "scope": 5630, + "src": "3698:1215:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5454, + "nodeType": "Block", + "src": "5044:808:36", + "statements": [ + { + "assignments": [ + 5409 + ], + "declarations": [ + { + "constant": false, + "id": 5409, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "5072:12:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5054:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5408, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5407, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "5054:9:36" + }, + "referencedDeclaration": 4270, + "src": "5054:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5412, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5410, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "5087:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5054:51:36" + }, + { + "assignments": [ + 5414 + ], + "declarations": [ + { + "constant": false, + "id": 5414, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "5123:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5116:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5413, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5116:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5418, + "initialValue": { + "arguments": [ + { + "id": 5416, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5179:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5415, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "5150:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5150:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5116:76:36" + }, + { + "assignments": [ + 5420 + ], + "declarations": [ + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "5209:20:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5202:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5419, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5202:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5424, + "initialValue": { + "arguments": [ + { + "id": 5422, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5257:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5421, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "5232:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:38:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5202:68:36" + }, + { + "assignments": [ + 5426 + ], + "declarations": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "5395:28:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5388:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5425, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5388:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5432, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5429, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "5433:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "5433:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5426:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5427, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5426:6:36", + "typeDescriptions": {} + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5426:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5388:61:36" + }, + { + "assignments": [ + 5434 + ], + "declarations": [ + { + "constant": false, + "id": 5434, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "5466:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5459:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5433, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5459:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5438, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5435, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5493:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5436, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5414, + "src": "5524:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5493:55:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5459:89:36" + }, + { + "assignments": [ + 5440 + ], + "declarations": [ + { + "constant": false, + "id": 5440, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "5565:15:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5558:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5439, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5558:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5444, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5441, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5583:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5442, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "5610:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5583:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5558:72:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5446, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5678:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5447, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5704:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5448, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "5704:22:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5449, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5740:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5450, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5782:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5451, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5440, + "src": "5820:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5445, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "5641:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5641:204:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5453, + "nodeType": "ExpressionStatement", + "src": "5641:204:36" + } + ] + }, + "documentation": { + "id": 5404, + "nodeType": "StructuredDocumentation", + "src": "4919:76:36", + "text": "@dev Moves schedule forward to immediately jump to the nomination period" + }, + "id": 5455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_jumpToNominationPeriod", + "nameLocation": "5009:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5405, + "nodeType": "ParameterList", + "parameters": [], + "src": "5032:2:36" + }, + "returnParameters": { + "id": 5406, + "nodeType": "ParameterList", + "parameters": [], + "src": "5044:0:36" + }, + "scope": 5630, + "src": "5000:852:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5511, + "nodeType": "Block", + "src": "5997:752:36", + "statements": [ + { + "assignments": [ + 5461 + ], + "declarations": [ + { + "constant": false, + "id": 5461, + "mutability": "mutable", + "name": "previousEpoch", + "nameLocation": "6025:13:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6007:31:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5460, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5459, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6007:9:36" + }, + "referencedDeclaration": 4270, + "src": "6007:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5464, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5462, + "name": "_getPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4562, + "src": "6041:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6041:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6007:53:36" + }, + { + "assignments": [ + 5467 + ], + "declarations": [ + { + "constant": false, + "id": 5467, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "6088:12:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6070:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5466, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5465, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6070:9:36" + }, + "referencedDeclaration": 4270, + "src": "6070:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5470, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5468, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "6103:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6103:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6070:51:36" + }, + { + "assignments": [ + 5472 + ], + "declarations": [ + { + "constant": false, + "id": 5472, + "mutability": "mutable", + "name": "currentEpochStartDate", + "nameLocation": "6139:21:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6132:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5471, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6132:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5478, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6170:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "6170:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6163:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5473, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6163:6:36", + "typeDescriptions": {} + } + }, + "id": 5477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6132:54:36" + }, + { + "assignments": [ + 5480 + ], + "declarations": [ + { + "constant": false, + "id": 5480, + "mutability": "mutable", + "name": "currentEpochEndDate", + "nameLocation": "6203:19:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6196:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5479, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6196:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5486, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5481, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6225:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 5483, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6267:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5482, + "name": "_getEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5599, + "src": "6249:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6249:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6225:56:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6196:85:36" + }, + { + "assignments": [ + 5488 + ], + "declarations": [ + { + "constant": false, + "id": 5488, + "mutability": "mutable", + "name": "currentVotingPeriodStartDate", + "nameLocation": "6298:28:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6291:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5487, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6291:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5494, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5489, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6329:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5491, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6376:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5490, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "6351:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:39:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6329:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6291:99:36" + }, + { + "assignments": [ + 5496 + ], + "declarations": [ + { + "constant": false, + "id": 5496, + "mutability": "mutable", + "name": "currentNominationPeriodStartDate", + "nameLocation": "6407:32:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6400:39:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5495, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6400:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5502, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5497, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6442:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5499, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6502:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5498, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "6473:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6473:43:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6442:74:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6400:116:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5504, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5467, + "src": "6564:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 5505, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6590:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5506, + "name": "currentNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "6625:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5507, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6671:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5508, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6713:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5503, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "6527:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6527:215:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5510, + "nodeType": "ExpressionStatement", + "src": "6527:215:36" + } + ] + }, + "documentation": { + "id": 5456, + "nodeType": "StructuredDocumentation", + "src": "5858:83:36", + "text": "@dev Copies the current epoch schedule to the next epoch, maintaining durations" + }, + "id": 5512, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_copyScheduleFromPreviousEpoch", + "nameLocation": "5955:30:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5985:2:36" + }, + "returnParameters": { + "id": 5458, + "nodeType": "ParameterList", + "parameters": [], + "src": "5997:0:36" + }, + "scope": 5630, + "src": "5946:803:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5562, + "nodeType": "Block", + "src": "6991:451:36", + "statements": [ + { + "assignments": [ + 5524 + ], + "declarations": [ + { + "constant": false, + "id": 5524, + "mutability": "mutable", + "name": "settings", + "nameLocation": "7026:8:36", + "nodeType": "VariableDeclaration", + "scope": 5562, + "src": "7001:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5523, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5522, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "7001:16:36" + }, + "referencedDeclaration": 4261, + "src": "7001:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5527, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5525, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7037:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7001:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5528, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7071:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7105:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7071:35:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5531, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7110:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7110:31:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:70:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5535, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7145:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7168:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7145:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:98:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5543, + "nodeType": "IfStatement", + "src": "7067:161:36", + "trueBody": { + "id": 5542, + "nodeType": "Block", + "src": "7171:57:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5539, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "7192:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5541, + "nodeType": "RevertStatement", + "src": "7185:32:36" + } + ] + } + }, + { + "expression": { + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5544, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7238:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "7238:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5547, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7277:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7238:69:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5549, + "nodeType": "ExpressionStatement", + "src": "7238:69:36" + }, + { + "expression": { + "id": 5554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5550, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7317:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5552, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "7317:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5553, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7352:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7317:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5555, + "nodeType": "ExpressionStatement", + "src": "7317:61:36" + }, + { + "expression": { + "id": 5560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5556, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7388:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "7388:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5559, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7416:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7388:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5561, + "nodeType": "ExpressionStatement", + "src": "7388:47:36" + } + ] + }, + "documentation": { + "id": 5513, + "nodeType": "StructuredDocumentation", + "src": "6755:59:36", + "text": "@dev Sets the minimum epoch durations, with validations" + }, + "id": 5563, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setMinEpochDurations", + "nameLocation": "6828:21:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5515, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "6866:30:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6859:37:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5514, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6859:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "6913:26:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6906:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5516, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6906:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5519, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "6956:19:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6949:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5518, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6949:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "6849:132:36" + }, + "returnParameters": { + "id": 5521, + "nodeType": "ParameterList", + "parameters": [], + "src": "6991:0:36" + }, + "scope": 5630, + "src": "6819:623:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5583, + "nodeType": "Block", + "src": "7538:75:36", + "statements": [ + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5572, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5573, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7564:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7555:15:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5578, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7591:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5579, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7600:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7591:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "7555:51:36", + "trueExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5575, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7573:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5576, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7582:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7573:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5571, + "id": 5582, + "nodeType": "Return", + "src": "7548:58:36" + } + ] + }, + "id": 5584, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_uint64AbsDifference", + "nameLocation": "7457:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5565, + "mutability": "mutable", + "name": "valueA", + "nameLocation": "7485:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7478:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5564, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7478:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5567, + "mutability": "mutable", + "name": "valueB", + "nameLocation": "7500:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7493:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5566, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7493:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7477:30:36" + }, + "returnParameters": { + "id": 5571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5570, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7530:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5569, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7530:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7529:8:36" + }, + "scope": 5630, + "src": "7448:165:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5598, + "nodeType": "Block", + "src": "7701:55:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5592, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7718:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7718:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5594, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7734:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "7734:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7718:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5591, + "id": 5597, + "nodeType": "Return", + "src": "7711:38:36" + } + ] + }, + "id": 5599, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochDuration", + "nameLocation": "7628:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5587, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7664:5:36", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7646:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5586, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5585, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7646:9:36" + }, + "referencedDeclaration": 4270, + "src": "7646:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7645:25:36" + }, + "returnParameters": { + "id": 5591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5590, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7693:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5589, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7693:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7692:8:36" + }, + "scope": 5630, + "src": "7619:137:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5613, + "nodeType": "Block", + "src": "7851:67:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5607, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7868:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7868:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5609, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7884:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "7884:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7868:43:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5606, + "id": 5612, + "nodeType": "Return", + "src": "7861:50:36" + } + ] + }, + "id": 5614, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotingPeriodDuration", + "nameLocation": "7771:24:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5602, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7814:5:36", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7796:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5601, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5600, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7796:9:36" + }, + "referencedDeclaration": 4270, + "src": "7796:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7795:25:36" + }, + "returnParameters": { + "id": 5606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5605, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7843:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5604, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7843:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7842:8:36" + }, + "scope": 5630, + "src": "7762:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5628, + "nodeType": "Block", + "src": "8017:85:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5622, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8034:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5623, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "8034:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5624, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8064:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "8064:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "8034:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5621, + "id": 5627, + "nodeType": "Return", + "src": "8027:68:36" + } + ] + }, + "id": 5629, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getNominationPeriodDuration", + "nameLocation": "7933:28:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5617, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7980:5:36", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "7962:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5616, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5615, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7962:9:36" + }, + "referencedDeclaration": 4270, + "src": "7962:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7961:25:36" + }, + "returnParameters": { + "id": 5621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5620, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "8009:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5619, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8009:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "8008:8:36" + }, + "scope": 5630, + "src": "7924:178:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5631, + "src": "227:7877:36", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:8074:36" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ArrayError.sol\";\nimport \"../../tokens/CouncilToken.sol\";\nimport \"./ElectionBase.sol\";\n\n/// @dev Core functionality for keeping track of council members with an NFT token\ncontract ElectionCredentials is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _createCouncilToken(string memory tokenName, string memory tokenSymbol) internal {\n CouncilToken implementation = new CouncilToken();\n\n UUPSProxy proxy = new UUPSProxy(address(implementation));\n\n CouncilToken token = CouncilToken(address(proxy));\n\n token.nominateNewOwner(address(this));\n token.acceptOwnership();\n\n token.initialize(tokenName, tokenSymbol);\n\n _electionStore().councilToken = address(token);\n\n emit CouncilTokenCreated(address(proxy), address(implementation));\n }\n\n function _removeAllCouncilMembers(uint epochIndex) internal {\n SetUtil.AddressSet storage members = _electionStore().councilMembers;\n\n uint numMembers = members.length();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n // Always removes the first element in the array\n // until none are left.\n _removeCouncilMember(members.valueAt(1), epochIndex);\n }\n }\n\n function _addCouncilMembers(address[] memory membersToAdd, uint epochIndex) internal {\n uint numMembers = membersToAdd.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _addCouncilMember(membersToAdd[memberIndex], epochIndex);\n }\n }\n\n function _removeCouncilMembers(address[] memory membersToRemove, uint epochIndex) internal {\n uint numMembers = membersToRemove.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _removeCouncilMember(membersToRemove[memberIndex], epochIndex);\n }\n }\n\n function _addCouncilMember(address newMember, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (members.contains(newMember)) {\n revert AlreadyACouncilMember();\n }\n\n members.add(newMember);\n\n // Note that tokenId = 0 will not be used.\n uint tokenId = members.length();\n _getCouncilToken().mint(newMember, tokenId);\n\n store.councilTokenIds[newMember] = tokenId;\n\n emit CouncilMemberAdded(newMember, epochIndex);\n }\n\n function _removeCouncilMember(address member, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (!members.contains(member)) {\n revert NotACouncilMember();\n }\n\n members.remove(member);\n\n uint tokenId = _getCouncilMemberTokenId(member);\n _getCouncilToken().burn(tokenId);\n\n // tokenId = 0 means no associated token.\n store.councilTokenIds[member] = 0;\n\n emit CouncilMemberRemoved(member, epochIndex);\n }\n\n function _getCouncilToken() private view returns (CouncilToken) {\n return CouncilToken(_electionStore().councilToken);\n }\n\n function _getCouncilMemberTokenId(address member) private view returns (uint) {\n uint tokenId = _electionStore().councilTokenIds[member];\n\n if (tokenId == 0) revert NotACouncilMember();\n\n return tokenId;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionStorage": [ + 4331 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 5066, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4685, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:35" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 4686, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 817, + "src": "56:67:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "id": 4687, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 21, + "src": "124:69:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "file": "../../tokens/CouncilToken.sol", + "id": 4688, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 6380, + "src": "194:39:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 4689, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 4684, + "src": "234:28:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4691, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "379:12:35" + }, + "id": 4692, + "nodeType": "InheritanceSpecifier", + "src": "379:12:35" + } + ], + "canonicalName": "ElectionCredentials", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4690, + "nodeType": "StructuredDocumentation", + "src": "264:83:35", + "text": "@dev Core functionality for keeping track of council members with an NFT token" + }, + "fullyImplemented": true, + "id": 5065, + "linearizedBaseContracts": [ + 5065, + 4683, + 4331 + ], + "name": "ElectionCredentials", + "nameLocation": "356:19:35", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4696, + "libraryName": { + "id": 4693, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "404:7:35" + }, + "nodeType": "UsingForDirective", + "src": "398:37:35", + "typeName": { + "id": 4695, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4694, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "416:18:35" + }, + "referencedDeclaration": 1788, + "src": "416:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 4774, + "nodeType": "Block", + "src": "531:457:35", + "statements": [ + { + "assignments": [ + 4705 + ], + "declarations": [ + { + "constant": false, + "id": 4705, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "554:14:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "541:27:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4704, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4703, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "541:12:35" + }, + "referencedDeclaration": 6379, + "src": "541:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "571:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () returns (contract CouncilToken)" + }, + "typeName": { + "id": 4707, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4706, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "575:12:35" + }, + "referencedDeclaration": 6379, + "src": "575:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + }, + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "571:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "541:48:35" + }, + { + "assignments": [ + 4713 + ], + "declarations": [ + { + "constant": false, + "id": 4713, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "610:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "600:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + }, + "typeName": { + "id": 4712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4711, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "600:9:35" + }, + "referencedDeclaration": 816, + "src": "600:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "visibility": "internal" + } + ], + "id": 4722, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4719, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "640:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "632:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:35", + "typeDescriptions": {} + } + }, + "id": 4720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "618:13:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_UUPSProxy_$816_$", + "typeString": "function (address) returns (contract UUPSProxy)" + }, + "typeName": { + "id": 4715, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4714, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "622:9:35" + }, + "referencedDeclaration": 816, + "src": "622:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + }, + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "618:38:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "600:56:35" + }, + { + "assignments": [ + 4725 + ], + "declarations": [ + { + "constant": false, + "id": 4725, + "mutability": "mutable", + "name": "token", + "nameLocation": "680:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "667:18:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4724, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4723, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "667:12:35" + }, + "referencedDeclaration": 6379, + "src": "667:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4732, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4729, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "709:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "701:7:35", + "typeDescriptions": {} + } + }, + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4726, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "688:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 4731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "688:28:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "667:49:35" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4738, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "758:4:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + ], + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "750:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "750:7:35", + "typeDescriptions": {} + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "750:13:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4733, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "727:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "nominateNewOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 359, + "src": "727:22:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "727:37:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4741, + "nodeType": "ExpressionStatement", + "src": "727:37:35" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4742, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "774:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 310, + "src": "774:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "774:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4746, + "nodeType": "ExpressionStatement", + "src": "774:23:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4750, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4698, + "src": "825:9:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 4751, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4700, + "src": "836:11:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 4747, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "808:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 6308, + "src": "808:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory) external" + } + }, + "id": 4752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "808:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4753, + "nodeType": "ExpressionStatement", + "src": "808:40:35" + }, + { + "expression": { + "id": 4761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4754, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "859:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "859:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "859:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4759, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "899:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "891:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:35", + "typeDescriptions": {} + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "891:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "859:46:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4762, + "nodeType": "ExpressionStatement", + "src": "859:46:35" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 4766, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "949:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "941:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "941:7:35", + "typeDescriptions": {} + } + }, + "id": 4767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "941:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 4770, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "965:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "957:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "957:7:35", + "typeDescriptions": {} + } + }, + "id": 4771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "957:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4763, + "name": "CouncilTokenCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4390, + "src": "921:19:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:60:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4773, + "nodeType": "EmitStatement", + "src": "916:65:35" + } + ] + }, + "id": 4775, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createCouncilToken", + "nameLocation": "450:19:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4698, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "484:9:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "470:23:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "470:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4700, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "509:11:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "495:25:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4699, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "495:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "469:52:35" + }, + "returnParameters": { + "id": 4702, + "nodeType": "ParameterList", + "parameters": [], + "src": "531:0:35" + }, + "scope": 5065, + "src": "441:547:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4815, + "nodeType": "Block", + "src": "1054:382:35", + "statements": [ + { + "assignments": [ + 4784 + ], + "declarations": [ + { + "constant": false, + "id": 4784, + "mutability": "mutable", + "name": "members", + "nameLocation": "1091:7:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1064:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4783, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4782, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1064:18:35" + }, + "referencedDeclaration": 1788, + "src": "1064:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4788, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4785, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1101:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1101:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "1101:31:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1064:68:35" + }, + { + "assignments": [ + 4790 + ], + "declarations": [ + { + "constant": false, + "id": 4790, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1148:10:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1143:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1143:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4794, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1161:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "1161:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1161:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1143:34:35" + }, + { + "body": { + "id": 4813, + "nodeType": "Block", + "src": "1256:174:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "31", + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1404:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 4806, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1388:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "1388:15:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1388:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4810, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4777, + "src": "1408:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4805, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "1367:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1367:52:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4812, + "nodeType": "ExpressionStatement", + "src": "1367:52:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4799, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1215:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4800, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4790, + "src": "1229:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1215:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4814, + "initializationExpression": { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1198:11:35", + "nodeType": "VariableDeclaration", + "scope": 4814, + "src": "1193:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4795, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1193:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4798, + "initialValue": { + "hexValue": "30", + "id": 4797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1212:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1193:20:35" + }, + "loopExpression": { + "expression": { + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1241:13:35", + "subExpression": { + "id": 4802, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1241:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4804, + "nodeType": "ExpressionStatement", + "src": "1241:13:35" + }, + "nodeType": "ForStatement", + "src": "1188:242:35" + } + ] + }, + "id": 4816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeAllCouncilMembers", + "nameLocation": "1003:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4777, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1033:10:35", + "nodeType": "VariableDeclaration", + "scope": 4816, + "src": "1028:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1028:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1027:17:35" + }, + "returnParameters": { + "id": 4779, + "nodeType": "ParameterList", + "parameters": [], + "src": "1054:0:35" + }, + "scope": 5065, + "src": "994:442:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4857, + "nodeType": "Block", + "src": "1527:274:35", + "statements": [ + { + "assignments": [ + 4825 + ], + "declarations": [ + { + "constant": false, + "id": 4825, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1542:10:35", + "nodeType": "VariableDeclaration", + "scope": 4857, + "src": "1537:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1537:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4828, + "initialValue": { + "expression": { + "id": 4826, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1555:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1555:19:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1537:37:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4829, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1588:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1602:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1588:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4837, + "nodeType": "IfStatement", + "src": "1584:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4832, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1612:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1612:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1612:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4836, + "nodeType": "RevertStatement", + "src": "1605:30:35" + } + }, + { + "body": { + "id": 4855, + "nodeType": "Block", + "src": "1714:81:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4849, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1746:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4851, + "indexExpression": { + "id": 4850, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1759:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1746:25:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4852, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4821, + "src": "1773:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4848, + "name": "_addCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4963, + "src": "1728:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:56:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4854, + "nodeType": "ExpressionStatement", + "src": "1728:56:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4842, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1673:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4843, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1687:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1673:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4856, + "initializationExpression": { + "assignments": [ + 4839 + ], + "declarations": [ + { + "constant": false, + "id": 4839, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1656:11:35", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "1651:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1651:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4841, + "initialValue": { + "hexValue": "30", + "id": 4840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1670:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1651:20:35" + }, + "loopExpression": { + "expression": { + "id": 4846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1699:13:35", + "subExpression": { + "id": 4845, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1699:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4847, + "nodeType": "ExpressionStatement", + "src": "1699:13:35" + }, + "nodeType": "ForStatement", + "src": "1646:149:35" + } + ] + }, + "id": 4858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMembers", + "nameLocation": "1451:18:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4819, + "mutability": "mutable", + "name": "membersToAdd", + "nameLocation": "1487:12:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1470:29:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1470:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4818, + "nodeType": "ArrayTypeName", + "src": "1470:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4821, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1506:10:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1501:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4820, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1501:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1469:48:35" + }, + "returnParameters": { + "id": 4823, + "nodeType": "ParameterList", + "parameters": [], + "src": "1527:0:35" + }, + "scope": 5065, + "src": "1442:359:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4899, + "nodeType": "Block", + "src": "1898:283:35", + "statements": [ + { + "assignments": [ + 4867 + ], + "declarations": [ + { + "constant": false, + "id": 4867, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1913:10:35", + "nodeType": "VariableDeclaration", + "scope": 4899, + "src": "1908:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4866, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4870, + "initialValue": { + "expression": { + "id": 4868, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "1926:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1926:22:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1908:40:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4871, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "1962:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1962:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4879, + "nodeType": "IfStatement", + "src": "1958:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4874, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1986:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1986:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4878, + "nodeType": "RevertStatement", + "src": "1979:30:35" + } + }, + { + "body": { + "id": 4897, + "nodeType": "Block", + "src": "2088:87:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4891, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "2123:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4893, + "indexExpression": { + "id": 4892, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2139:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2123:28:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4894, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4863, + "src": "2153:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4890, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "2102:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:62:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4896, + "nodeType": "ExpressionStatement", + "src": "2102:62:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4884, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2047:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4885, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "2061:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2047:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4898, + "initializationExpression": { + "assignments": [ + 4881 + ], + "declarations": [ + { + "constant": false, + "id": 4881, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "2030:11:35", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "2025:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4880, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2025:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4883, + "initialValue": { + "hexValue": "30", + "id": 4882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2044:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2025:20:35" + }, + "loopExpression": { + "expression": { + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2073:13:35", + "subExpression": { + "id": 4887, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2073:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4889, + "nodeType": "ExpressionStatement", + "src": "2073:13:35" + }, + "nodeType": "ForStatement", + "src": "2020:155:35" + } + ] + }, + "id": 4900, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMembers", + "nameLocation": "1816:21:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4861, + "mutability": "mutable", + "name": "membersToRemove", + "nameLocation": "1855:15:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1838:32:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1838:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4860, + "nodeType": "ArrayTypeName", + "src": "1838:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1877:10:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1872:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1872:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1837:51:35" + }, + "returnParameters": { + "id": 4865, + "nodeType": "ParameterList", + "parameters": [], + "src": "1898:0:35" + }, + "scope": 5065, + "src": "1807:374:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4962, + "nodeType": "Block", + "src": "2259:517:35", + "statements": [ + { + "assignments": [ + 4909 + ], + "declarations": [ + { + "constant": false, + "id": 4909, + "mutability": "mutable", + "name": "store", + "nameLocation": "2291:5:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2269:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4908, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4907, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2269:13:35" + }, + "referencedDeclaration": 4246, + "src": "2269:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4912, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4910, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2299:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2299:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2269:46:35" + }, + { + "assignments": [ + 4917 + ], + "declarations": [ + { + "constant": false, + "id": 4917, + "mutability": "mutable", + "name": "members", + "nameLocation": "2352:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2325:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4916, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4915, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2325:18:35" + }, + "referencedDeclaration": 1788, + "src": "2325:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4920, + "initialValue": { + "expression": { + "id": 4918, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2362:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2362:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2325:57:35" + }, + { + "condition": { + "arguments": [ + { + "id": 4923, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2414:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4921, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2397:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4922, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2397:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:27:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4929, + "nodeType": "IfStatement", + "src": "2393:88:35", + "trueBody": { + "id": 4928, + "nodeType": "Block", + "src": "2426:55:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4925, + "name": "AlreadyACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4368, + "src": "2447:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2447:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4927, + "nodeType": "RevertStatement", + "src": "2440:30:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4933, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2503:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4930, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2491:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4932, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2491:11:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2491:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4935, + "nodeType": "ExpressionStatement", + "src": "2491:22:35" + }, + { + "assignments": [ + 4937 + ], + "declarations": [ + { + "constant": false, + "id": 4937, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2580:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2575:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4936, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2575:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4941, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4938, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2590:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2590:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2590:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2575:31:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4945, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2640:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4946, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2651:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4942, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "2616:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 6336, + "src": "2616:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4948, + "nodeType": "ExpressionStatement", + "src": "2616:43:35" + }, + { + "expression": { + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 4949, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2670:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4952, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "2670:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4953, + "indexExpression": { + "id": 4951, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2692:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2670:32:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4954, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2705:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2670:42:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4956, + "nodeType": "ExpressionStatement", + "src": "2670:42:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4958, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2747:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4959, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4904, + "src": "2758:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4957, + "name": "CouncilMemberAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "2728:18:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2728:41:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4961, + "nodeType": "EmitStatement", + "src": "2723:46:35" + } + ] + }, + "id": 4963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMember", + "nameLocation": "2196:17:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4902, + "mutability": "mutable", + "name": "newMember", + "nameLocation": "2222:9:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2214:17:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4901, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2214:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4904, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2238:10:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2233:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2233:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2213:36:35" + }, + "returnParameters": { + "id": 4906, + "nodeType": "ParameterList", + "parameters": [], + "src": "2259:0:35" + }, + "scope": 5065, + "src": "2187:589:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5025, + "nodeType": "Block", + "src": "2854:505:35", + "statements": [ + { + "assignments": [ + 4972 + ], + "declarations": [ + { + "constant": false, + "id": 4972, + "mutability": "mutable", + "name": "store", + "nameLocation": "2886:5:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2864:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4971, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4970, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2864:13:35" + }, + "referencedDeclaration": 4246, + "src": "2864:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4975, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4973, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2894:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2894:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2864:46:35" + }, + { + "assignments": [ + 4980 + ], + "declarations": [ + { + "constant": false, + "id": 4980, + "mutability": "mutable", + "name": "members", + "nameLocation": "2947:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2920:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4979, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4978, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2920:18:35" + }, + "referencedDeclaration": 1788, + "src": "2920:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4983, + "initialValue": { + "expression": { + "id": 4981, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "2957:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2957:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2920:57:35" + }, + { + "condition": { + "id": 4988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2992:25:35", + "subExpression": { + "arguments": [ + { + "id": 4986, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3010:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4984, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "2993:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2993:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:24:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4993, + "nodeType": "IfStatement", + "src": "2988:82:35", + "trueBody": { + "id": 4992, + "nodeType": "Block", + "src": "3019:51:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4989, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3040:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4991, + "nodeType": "RevertStatement", + "src": "3033:26:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4997, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3095:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4994, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "3080:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4996, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "3080:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3080:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4999, + "nodeType": "ExpressionStatement", + "src": "3080:22:35" + }, + { + "assignments": [ + 5001 + ], + "declarations": [ + { + "constant": false, + "id": 5001, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3118:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "3113:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5000, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3113:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5005, + "initialValue": { + "arguments": [ + { + "id": 5003, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3153:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5002, + "name": "_getCouncilMemberTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5064, + "src": "3128:24:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 5004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3128:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3113:47:35" + }, + { + "expression": { + "arguments": [ + { + "id": 5009, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5001, + "src": "3194:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5006, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "3170:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 5008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 6348, + "src": "3170:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5011, + "nodeType": "ExpressionStatement", + "src": "3170:32:35" + }, + { + "expression": { + "id": 5018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5012, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "3263:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5015, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3263:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5016, + "indexExpression": { + "id": 5014, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3285:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3263:29:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 5017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3295:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3263:33:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5019, + "nodeType": "ExpressionStatement", + "src": "3263:33:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5021, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3333:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5022, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4967, + "src": "3341:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5020, + "name": "CouncilMemberRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4406, + "src": "3312:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3312:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5024, + "nodeType": "EmitStatement", + "src": "3307:45:35" + } + ] + }, + "id": 5026, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMember", + "nameLocation": "2791:20:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4965, + "mutability": "mutable", + "name": "member", + "nameLocation": "2820:6:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2812:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4964, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2812:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4967, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2833:10:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2828:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4966, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2828:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2811:33:35" + }, + "returnParameters": { + "id": 4969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2854:0:35" + }, + "scope": 5065, + "src": "2782:577:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5038, + "nodeType": "Block", + "src": "3429:67:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5033, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3459:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3459:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3459:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5032, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3446:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 5036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3446:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "functionReturnParameters": 5031, + "id": 5037, + "nodeType": "Return", + "src": "3439:50:35" + } + ] + }, + "id": 5039, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilToken", + "nameLocation": "3374:16:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5027, + "nodeType": "ParameterList", + "parameters": [], + "src": "3390:2:35" + }, + "returnParameters": { + "id": 5031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5030, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5039, + "src": "3415:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 5029, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5028, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "3415:12:35" + }, + "referencedDeclaration": 6379, + "src": "3415:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "src": "3414:14:35" + }, + "scope": 5065, + "src": "3365:131:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5063, + "nodeType": "Block", + "src": "3580:152:35", + "statements": [ + { + "assignments": [ + 5047 + ], + "declarations": [ + { + "constant": false, + "id": 5047, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3595:7:35", + "nodeType": "VariableDeclaration", + "scope": 5063, + "src": "3590:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3590:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5053, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5048, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3605:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3605:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5050, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3605:32:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5052, + "indexExpression": { + "id": 5051, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5041, + "src": "3638:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3605:40:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3590:55:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5054, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3660:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3660:12:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5060, + "nodeType": "IfStatement", + "src": "3656:44:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5057, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3681:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3681:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5059, + "nodeType": "RevertStatement", + "src": "3674:26:35" + } + }, + { + "expression": { + "id": 5061, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3718:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5045, + "id": 5062, + "nodeType": "Return", + "src": "3711:14:35" + } + ] + }, + "id": 5064, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilMemberTokenId", + "nameLocation": "3511:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5041, + "mutability": "mutable", + "name": "member", + "nameLocation": "3544:6:35", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3536:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3536:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3535:16:35" + }, + "returnParameters": { + "id": 5045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5044, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3574:4:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5043, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3574:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3573:6:35" + }, + "scope": 5065, + "src": "3502:230:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5066, + "src": "347:3387:35", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3704:35" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\n\n/// @dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()\ncontract ElectionTally is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _evaluateNextBallotBatch(uint numBallots) internal {\n if (numBallots == 0) {\n numBallots = _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n ElectionData storage election = _getCurrentElection();\n uint totalBallots = election.ballotIds.length;\n\n uint firstBallotIndex = election.numEvaluatedBallots;\n\n uint lastBallotIndex = firstBallotIndex + numBallots;\n if (lastBallotIndex > totalBallots) {\n lastBallotIndex = totalBallots;\n }\n\n _evaluateBallotRange(election, firstBallotIndex, lastBallotIndex);\n }\n\n function _evaluateBallotRange(\n ElectionData storage election,\n uint fromIndex,\n uint toIndex\n ) private {\n ElectionSettings storage settings = _electionSettings();\n uint numSeats = settings.nextEpochSeatCount;\n\n for (uint ballotIndex = fromIndex; ballotIndex < toIndex; ballotIndex++) {\n bytes32 ballotId = election.ballotIds[ballotIndex];\n BallotData storage ballot = election.ballotsById[ballotId];\n\n _evaluateBallot(election, ballot, numSeats);\n }\n }\n\n function _evaluateBallot(\n ElectionData storage election,\n BallotData storage ballot,\n uint numSeats\n ) internal {\n uint ballotVotes = ballot.votes;\n\n uint numCandidates = ballot.candidates.length;\n for (uint candidateIndex = 0; candidateIndex < numCandidates; candidateIndex++) {\n address candidate = ballot.candidates[candidateIndex];\n\n uint currentCandidateVotes = election.candidateVotes[candidate];\n uint newCandidateVotes = currentCandidateVotes + ballotVotes;\n election.candidateVotes[candidate] = newCandidateVotes;\n\n _updateWinnerSet(election, candidate, newCandidateVotes, numSeats);\n }\n\n election.numEvaluatedBallots += 1;\n }\n\n function _updateWinnerSet(\n ElectionData storage election,\n address candidate,\n uint candidateVotes,\n uint numSeats\n ) private {\n SetUtil.AddressSet storage winners = election.winners;\n\n // Already a winner?\n if (winners.contains(candidate)) {\n return;\n }\n\n // Just take first empty seat if\n // the set is not complete yet.\n if (winners.length() < numSeats) {\n winners.add(candidate);\n\n return;\n }\n\n // Otherwise, replace the winner with the least votes\n // in the set.\n (address leastVotedWinner, uint leastVotes) = _findWinnerWithLeastVotes(election, winners);\n\n if (candidateVotes > leastVotes) {\n winners.replace(leastVotedWinner, candidate);\n }\n }\n\n function _findWinnerWithLeastVotes(ElectionData storage election, SetUtil.AddressSet storage winners)\n private\n view\n returns (address leastVotedWinner, uint leastVotes)\n {\n leastVotes = type(uint).max;\n\n uint numWinners = winners.length();\n\n for (uint8 winnerPosition = 1; winnerPosition <= numWinners; winnerPosition++) {\n address winner = winners.valueAt(winnerPosition);\n uint winnerVotes = election.candidateVotes[winner];\n\n if (winnerVotes < leastVotes) {\n leastVotes = winnerVotes;\n\n leastVotedWinner = winner;\n }\n }\n\n return (leastVotedWinner, leastVotes);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5962, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5632, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:37" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5633, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5962, + "sourceUnit": 4684, + "src": "56:28:37", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5635, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "211:12:37" + }, + "id": 5636, + "nodeType": "InheritanceSpecifier", + "src": "211:12:37" + } + ], + "canonicalName": "ElectionTally", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5634, + "nodeType": "StructuredDocumentation", + "src": "86:99:37", + "text": "@dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()" + }, + "fullyImplemented": true, + "id": 5961, + "linearizedBaseContracts": [ + 5961, + 4683, + 4331 + ], + "name": "ElectionTally", + "nameLocation": "194:13:37", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5640, + "libraryName": { + "id": 5637, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "236:7:37" + }, + "nodeType": "UsingForDirective", + "src": "230:37:37", + "typeName": { + "id": 5639, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5638, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "248:18:37" + }, + "referencedDeclaration": 1788, + "src": "248:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 5694, + "nodeType": "Block", + "src": "333:548:37", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5645, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "347:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "361:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "347:15:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5655, + "nodeType": "IfStatement", + "src": "343:111:37", + "trueBody": { + "id": 5654, + "nodeType": "Block", + "src": "364:90:37", + "statements": [ + { + "expression": { + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5648, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "378:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5649, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "391:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "391:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5651, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "391:52:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "378:65:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5653, + "nodeType": "ExpressionStatement", + "src": "378:65:37" + } + ] + } + }, + { + "assignments": [ + 5658 + ], + "declarations": [ + { + "constant": false, + "id": 5658, + "mutability": "mutable", + "name": "election", + "nameLocation": "485:8:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "464:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5657, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5656, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "464:12:37" + }, + "referencedDeclaration": 4299, + "src": "464:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 5661, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5659, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "496:19:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 5660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "496:21:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "464:53:37" + }, + { + "assignments": [ + 5663 + ], + "declarations": [ + { + "constant": false, + "id": 5663, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "532:12:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "527:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5662, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "527:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5667, + "initialValue": { + "expression": { + "expression": { + "id": 5664, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "547:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "547:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "547:25:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "527:45:37" + }, + { + "assignments": [ + 5669 + ], + "declarations": [ + { + "constant": false, + "id": 5669, + "mutability": "mutable", + "name": "firstBallotIndex", + "nameLocation": "588:16:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "583:21:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5668, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "583:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5672, + "initialValue": { + "expression": { + "id": 5670, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "607:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "607:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "583:52:37" + }, + { + "assignments": [ + 5674 + ], + "declarations": [ + { + "constant": false, + "id": 5674, + "mutability": "mutable", + "name": "lastBallotIndex", + "nameLocation": "651:15:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "646:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5673, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5678, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5675, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "669:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5676, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "688:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "669:29:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "646:52:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5679, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "712:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5680, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "730:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "712:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5687, + "nodeType": "IfStatement", + "src": "708:91:37", + "trueBody": { + "id": 5686, + "nodeType": "Block", + "src": "744:55:37", + "statements": [ + { + "expression": { + "id": 5684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5682, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "758:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5683, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "776:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "758:30:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5685, + "nodeType": "ExpressionStatement", + "src": "758:30:37" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5689, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "830:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5690, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "840:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5691, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "858:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5688, + "name": "_evaluateBallotRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5750, + "src": "809:20:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,uint256,uint256)" + } + }, + "id": 5692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "809:65:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5693, + "nodeType": "ExpressionStatement", + "src": "809:65:37" + } + ] + }, + "id": 5695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateNextBallotBatch", + "nameLocation": "282:24:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5642, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "312:10:37", + "nodeType": "VariableDeclaration", + "scope": 5695, + "src": "307:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "307:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "306:17:37" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [], + "src": "333:0:37" + }, + "scope": 5961, + "src": "273:608:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5749, + "nodeType": "Block", + "src": "1016:413:37", + "statements": [ + { + "assignments": [ + 5707 + ], + "declarations": [ + { + "constant": false, + "id": 5707, + "mutability": "mutable", + "name": "settings", + "nameLocation": "1051:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1026:33:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5706, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5705, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1026:16:37" + }, + "referencedDeclaration": 4261, + "src": "1026:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5708, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "1062:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1062:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1026:55:37" + }, + { + "assignments": [ + 5712 + ], + "declarations": [ + { + "constant": false, + "id": 5712, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1096:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1091:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1091:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5715, + "initialValue": { + "expression": { + "id": 5713, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5707, + "src": "1107:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5714, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "1107:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1091:43:37" + }, + { + "body": { + "id": 5747, + "nodeType": "Block", + "src": "1218:205:37", + "statements": [ + { + "assignments": [ + 5727 + ], + "declarations": [ + { + "constant": false, + "id": 5727, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1240:8:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1232:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5726, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1232:7:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 5732, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5728, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1251:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1251:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5731, + "indexExpression": { + "id": 5730, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1270:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1251:31:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1232:50:37" + }, + { + "assignments": [ + 5735 + ], + "declarations": [ + { + "constant": false, + "id": 5735, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1315:6:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1296:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5734, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5733, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1296:10:37" + }, + "referencedDeclaration": 4309, + "src": "1296:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 5740, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5736, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1324:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5737, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "1324:20:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 5739, + "indexExpression": { + "id": 5738, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5727, + "src": "1345:8:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1324:30:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1296:58:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5742, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1385:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5743, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5735, + "src": "1395:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + { + "id": 5744, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5712, + "src": "1403:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5741, + "name": "_evaluateBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5826, + "src": "1369:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_BallotData_$4309_storage_ptr_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct ElectionStorage.BallotData storage pointer,uint256)" + } + }, + "id": 5745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1369:43:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5746, + "nodeType": "ExpressionStatement", + "src": "1369:43:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5720, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1180:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5721, + "name": "toIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5702, + "src": "1194:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1180:21:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5748, + "initializationExpression": { + "assignments": [ + 5717 + ], + "declarations": [ + { + "constant": false, + "id": 5717, + "mutability": "mutable", + "name": "ballotIndex", + "nameLocation": "1155:11:37", + "nodeType": "VariableDeclaration", + "scope": 5748, + "src": "1150:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5716, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1150:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5719, + "initialValue": { + "id": 5718, + "name": "fromIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5700, + "src": "1169:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1150:28:37" + }, + "loopExpression": { + "expression": { + "id": 5724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1203:13:37", + "subExpression": { + "id": 5723, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1203:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5725, + "nodeType": "ExpressionStatement", + "src": "1203:13:37" + }, + "nodeType": "ForStatement", + "src": "1145:278:37" + } + ] + }, + "id": 5750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallotRange", + "nameLocation": "896:20:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5698, + "mutability": "mutable", + "name": "election", + "nameLocation": "947:8:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "926:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5697, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5696, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "926:12:37" + }, + "referencedDeclaration": 4299, + "src": "926:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5700, + "mutability": "mutable", + "name": "fromIndex", + "nameLocation": "970:9:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "965:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5699, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "965:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5702, + "mutability": "mutable", + "name": "toIndex", + "nameLocation": "994:7:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "989:12:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "989:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "916:91:37" + }, + "returnParameters": { + "id": 5704, + "nodeType": "ParameterList", + "parameters": [], + "src": "1016:0:37" + }, + "scope": 5961, + "src": "887:542:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5825, + "nodeType": "Block", + "src": "1572:616:37", + "statements": [ + { + "assignments": [ + 5762 + ], + "declarations": [ + { + "constant": false, + "id": 5762, + "mutability": "mutable", + "name": "ballotVotes", + "nameLocation": "1587:11:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1582:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5761, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1582:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5765, + "initialValue": { + "expression": { + "id": 5763, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1601:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5764, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1601:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1582:31:37" + }, + { + "assignments": [ + 5767 + ], + "declarations": [ + { + "constant": false, + "id": 5767, + "mutability": "mutable", + "name": "numCandidates", + "nameLocation": "1629:13:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1624:18:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5766, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1624:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5771, + "initialValue": { + "expression": { + "expression": { + "id": 5768, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1645:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1645:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1645:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1624:45:37" + }, + { + "body": { + "id": 5817, + "nodeType": "Block", + "src": "1759:379:37", + "statements": [ + { + "assignments": [ + 5783 + ], + "declarations": [ + { + "constant": false, + "id": 5783, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1781:9:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1773:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1773:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5788, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5784, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1793:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1793:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5787, + "indexExpression": { + "id": 5786, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1811:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1793:33:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1773:53:37" + }, + { + "assignments": [ + 5790 + ], + "declarations": [ + { + "constant": false, + "id": 5790, + "mutability": "mutable", + "name": "currentCandidateVotes", + "nameLocation": "1846:21:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1841:26:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1841:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5795, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5791, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1870:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1870:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5794, + "indexExpression": { + "id": 5793, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "1894:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1870:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1841:63:37" + }, + { + "assignments": [ + 5797 + ], + "declarations": [ + { + "constant": false, + "id": 5797, + "mutability": "mutable", + "name": "newCandidateVotes", + "nameLocation": "1923:17:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1918:22:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5796, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1918:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5801, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5798, + "name": "currentCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5790, + "src": "1943:21:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5799, + "name": "ballotVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5762, + "src": "1967:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1943:35:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1918:60:37" + }, + { + "expression": { + "id": 5808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5802, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1992:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1992:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5806, + "indexExpression": { + "id": 5804, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2016:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1992:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5807, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2029:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1992:54:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5809, + "nodeType": "ExpressionStatement", + "src": "1992:54:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5811, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2078:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5812, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2088:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5813, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2099:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5814, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5758, + "src": "2118:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5810, + "name": "_updateWinnerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "2061:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,address,uint256,uint256)" + } + }, + "id": 5815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2061:66:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5816, + "nodeType": "ExpressionStatement", + "src": "2061:66:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5776, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1709:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5777, + "name": "numCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "1726:13:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1709:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5818, + "initializationExpression": { + "assignments": [ + 5773 + ], + "declarations": [ + { + "constant": false, + "id": 5773, + "mutability": "mutable", + "name": "candidateIndex", + "nameLocation": "1689:14:37", + "nodeType": "VariableDeclaration", + "scope": 5818, + "src": "1684:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1684:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5775, + "initialValue": { + "hexValue": "30", + "id": 5774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1706:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1684:23:37" + }, + "loopExpression": { + "expression": { + "id": 5780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1741:16:37", + "subExpression": { + "id": 5779, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1741:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5781, + "nodeType": "ExpressionStatement", + "src": "1741:16:37" + }, + "nodeType": "ForStatement", + "src": "1679:459:37" + }, + { + "expression": { + "id": 5823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5819, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2148:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "2148:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 5822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2180:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2148:33:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5824, + "nodeType": "ExpressionStatement", + "src": "2148:33:37" + } + ] + }, + "id": 5826, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallot", + "nameLocation": "1444:15:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5753, + "mutability": "mutable", + "name": "election", + "nameLocation": "1490:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1469:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5751, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1469:12:37" + }, + "referencedDeclaration": 4299, + "src": "1469:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5756, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1527:6:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1508:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5755, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5754, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1508:10:37" + }, + "referencedDeclaration": 4309, + "src": "1508:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5758, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1548:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1543:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5757, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1543:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1459:103:37" + }, + "returnParameters": { + "id": 5760, + "nodeType": "ParameterList", + "parameters": [], + "src": "1572:0:37" + }, + "scope": 5961, + "src": "1435:753:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5888, + "nodeType": "Block", + "src": "2352:663:37", + "statements": [ + { + "assignments": [ + 5842 + ], + "declarations": [ + { + "constant": false, + "id": 5842, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2389:7:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2362:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5841, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5840, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2362:18:37" + }, + "referencedDeclaration": 1788, + "src": "2362:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 5845, + "initialValue": { + "expression": { + "id": 5843, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2399:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2399:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2362:53:37" + }, + { + "condition": { + "arguments": [ + { + "id": 5848, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2476:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5846, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2459:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2459:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 5849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2459:27:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5852, + "nodeType": "IfStatement", + "src": "2455:64:37", + "trueBody": { + "id": 5851, + "nodeType": "Block", + "src": "2488:31:37", + "statements": [ + { + "functionReturnParameters": 5837, + "id": 5850, + "nodeType": "Return", + "src": "2502:7:37" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5853, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2614:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5854, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2614:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2614:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5856, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5835, + "src": "2633:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2614:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5866, + "nodeType": "IfStatement", + "src": "2610:101:37", + "trueBody": { + "id": 5865, + "nodeType": "Block", + "src": "2643:68:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5861, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2669:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5858, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2657:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2657:11:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 5862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2657:22:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5863, + "nodeType": "ExpressionStatement", + "src": "2657:22:37" + }, + { + "functionReturnParameters": 5837, + "id": 5864, + "nodeType": "Return", + "src": "2694:7:37" + } + ] + } + }, + { + "assignments": [ + 5868, + 5870 + ], + "declarations": [ + { + "constant": false, + "id": 5868, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "2815:16:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2807:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2807:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5870, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "2838:10:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2833:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2833:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5875, + "initialValue": { + "arguments": [ + { + "id": 5872, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2878:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5873, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2888:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + ], + "id": 5871, + "name": "_findWinnerWithLeastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5960, + "src": "2852:25:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_address_$_t_uint256_$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct SetUtil.AddressSet storage pointer) view returns (address,uint256)" + } + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2852:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2806:90:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5876, + "name": "candidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5833, + "src": "2911:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5877, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5870, + "src": "2928:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2911:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5887, + "nodeType": "IfStatement", + "src": "2907:102:37", + "trueBody": { + "id": 5886, + "nodeType": "Block", + "src": "2940:69:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5882, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5868, + "src": "2970:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5883, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2988:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5879, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2954:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "replace", + "nodeType": "MemberAccess", + "referencedDeclaration": 1872, + "src": "2954:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address,address)" + } + }, + "id": 5884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2954:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5885, + "nodeType": "ExpressionStatement", + "src": "2954:44:37" + } + ] + } + } + ] + }, + "id": 5889, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateWinnerSet", + "nameLocation": "2203:16:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5836, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5829, + "mutability": "mutable", + "name": "election", + "nameLocation": "2250:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2229:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5828, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5827, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2229:12:37" + }, + "referencedDeclaration": 4299, + "src": "2229:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5831, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2276:9:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2268:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2268:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5833, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2300:14:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2295:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2295:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5835, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "2329:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2324:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5834, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2324:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2219:124:37" + }, + "returnParameters": { + "id": 5837, + "nodeType": "ParameterList", + "parameters": [], + "src": "2352:0:37" + }, + "scope": 5961, + "src": "2194:821:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5959, + "nodeType": "Block", + "src": "3216:508:37", + "statements": [ + { + "expression": { + "id": 5908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5902, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3226:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [ + { + "id": 5905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3244:4:37", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5904, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3244:4:37", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 5903, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3239:4:37", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3239:10:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3239:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3226:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5909, + "nodeType": "ExpressionStatement", + "src": "3226:27:37" + }, + { + "assignments": [ + 5911 + ], + "declarations": [ + { + "constant": false, + "id": 5911, + "mutability": "mutable", + "name": "numWinners", + "nameLocation": "3269:10:37", + "nodeType": "VariableDeclaration", + "scope": 5959, + "src": "3264:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5910, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3264:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5915, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5912, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3282:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5913, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "3282:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3282:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3264:34:37" + }, + { + "body": { + "id": 5953, + "nodeType": "Block", + "src": "3388:282:37", + "statements": [ + { + "assignments": [ + 5927 + ], + "declarations": [ + { + "constant": false, + "id": 5927, + "mutability": "mutable", + "name": "winner", + "nameLocation": "3410:6:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3402:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3402:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5932, + "initialValue": { + "arguments": [ + { + "id": 5930, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3435:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 5928, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3419:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "3419:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 5931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:31:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3402:48:37" + }, + { + "assignments": [ + 5934 + ], + "declarations": [ + { + "constant": false, + "id": 5934, + "mutability": "mutable", + "name": "winnerVotes", + "nameLocation": "3469:11:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3464:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5933, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3464:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5939, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5935, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5892, + "src": "3483:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5936, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "3483:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5938, + "indexExpression": { + "id": 5937, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3507:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3483:31:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3464:50:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5940, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3533:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5941, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3547:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3533:24:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5952, + "nodeType": "IfStatement", + "src": "3529:131:37", + "trueBody": { + "id": 5951, + "nodeType": "Block", + "src": "3559:101:37", + "statements": [ + { + "expression": { + "id": 5945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5943, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3577:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5944, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3590:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3577:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5946, + "nodeType": "ExpressionStatement", + "src": "3577:24:37" + }, + { + "expression": { + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5947, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3620:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5948, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3639:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3620:25:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5950, + "nodeType": "ExpressionStatement", + "src": "3620:25:37" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5920, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3340:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5921, + "name": "numWinners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5911, + "src": "3358:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3340:28:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5954, + "initializationExpression": { + "assignments": [ + 5917 + ], + "declarations": [ + { + "constant": false, + "id": 5917, + "mutability": "mutable", + "name": "winnerPosition", + "nameLocation": "3320:14:37", + "nodeType": "VariableDeclaration", + "scope": 5954, + "src": "3314:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5916, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3314:5:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 5919, + "initialValue": { + "hexValue": "31", + "id": 5918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3337:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3314:24:37" + }, + "loopExpression": { + "expression": { + "id": 5924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3370:16:37", + "subExpression": { + "id": 5923, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3370:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5925, + "nodeType": "ExpressionStatement", + "src": "3370:16:37" + }, + "nodeType": "ForStatement", + "src": "3309:361:37" + }, + { + "expression": { + "components": [ + { + "id": 5955, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3688:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5956, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3706:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5957, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3687:30:37", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "functionReturnParameters": 5901, + "id": 5958, + "nodeType": "Return", + "src": "3680:37:37" + } + ] + }, + "id": 5960, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_findWinnerWithLeastVotes", + "nameLocation": "3030:25:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5892, + "mutability": "mutable", + "name": "election", + "nameLocation": "3077:8:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3056:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5891, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5890, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3056:12:37" + }, + "referencedDeclaration": 4299, + "src": "3056:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5895, + "mutability": "mutable", + "name": "winners", + "nameLocation": "3114:7:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3087:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5894, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5893, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "3087:18:37" + }, + "referencedDeclaration": 1788, + "src": "3087:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "3055:67:37" + }, + "returnParameters": { + "id": 5901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5898, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "3177:16:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3169:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3169:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5900, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "3200:10:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3195:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5899, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3195:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3168:43:37" + }, + "scope": 5961, + "src": "3021:703:37", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5962, + "src": "185:3541:37", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3696:37" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./AbstractProxy.sol\";\nimport \"./ProxyStorage.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../utils/AddressUtil.sol\";\n\ncontract UUPSProxy is AbstractProxy, ProxyStorage {\n constructor(address firstImplementation) {\n if (firstImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(firstImplementation)) {\n revert AddressError.NotAContract(firstImplementation);\n }\n\n _proxyStore().implementation = firstImplementation;\n }\n\n function _getImplementation() internal view virtual override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ProxyStorage": [ + 542 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 817, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 758, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:18" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "file": "./AbstractProxy.sol", + "id": 759, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 527, + "src": "56:29:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 760, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 543, + "src": "86:28:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 761, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 16, + "src": "115:36:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 762, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 1697, + "src": "152:34:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 763, + "name": "AbstractProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 526, + "src": "210:13:18" + }, + "id": 764, + "nodeType": "InheritanceSpecifier", + "src": "210:13:18" + }, + { + "baseName": { + "id": 765, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "225:12:18" + }, + "id": 766, + "nodeType": "InheritanceSpecifier", + "src": "225:12:18" + } + ], + "canonicalName": "UUPSProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 816, + "linearizedBaseContracts": [ + 816, + 542, + 526 + ], + "name": "UUPSProxy", + "nameLocation": "197:9:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 803, + "nodeType": "Block", + "src": "285:312:18", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 771, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "299:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "322:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 772, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "322:7:18", + "typeDescriptions": {} + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "322:10:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "299:33:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 783, + "nodeType": "IfStatement", + "src": "295:97:18", + "trueBody": { + "id": 782, + "nodeType": "Block", + "src": "334:58:18", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 777, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "355:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "355:24:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "355:26:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 781, + "nodeType": "RevertStatement", + "src": "348:33:18" + } + ] + } + }, + { + "condition": { + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "406:44:18", + "subExpression": { + "arguments": [ + { + "id": 786, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "430:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 784, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "407:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "407:22:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "407:43:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 796, + "nodeType": "IfStatement", + "src": "402:128:18", + "trueBody": { + "id": 795, + "nodeType": "Block", + "src": "452:78:18", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 792, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "499:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 789, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "473:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "473:25:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:46:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 794, + "nodeType": "RevertStatement", + "src": "466:53:18" + } + ] + } + }, + { + "expression": { + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 797, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "540:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "540:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "540:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 800, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "571:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "540:50:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 802, + "nodeType": "ExpressionStatement", + "src": "540:50:18" + } + ] + }, + "id": 804, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "264:19:18", + "nodeType": "VariableDeclaration", + "scope": 804, + "src": "256:27:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "255:29:18" + }, + "returnParameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [], + "src": "285:0:18" + }, + "scope": 816, + "src": "244:353:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 525 + ], + "body": { + "id": 814, + "nodeType": "Block", + "src": "682:52:18", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 810, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "699:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "699:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 812, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "699:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 809, + "id": 813, + "nodeType": "Return", + "src": "692:35:18" + } + ] + }, + "id": 815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "612:18:18", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 806, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "655:8:18" + }, + "parameters": { + "id": 805, + "nodeType": "ParameterList", + "parameters": [], + "src": "630:2:18" + }, + "returnParameters": { + "id": 809, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 808, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 815, + "src": "673:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "673:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "672:9:18" + }, + "scope": 816, + "src": "603:131:18", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 817, + "src": "188:548:18", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:706:18" + } + }, + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ArrayError {\n error EmptyArray();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "exportedSymbols": { + "ArrayError": [ + 20 + ] + }, + "id": 21, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 17, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:2" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ArrayError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 20, + "linearizedBaseContracts": [ + 20 + ], + "name": "ArrayError", + "nameLocation": "64:10:2", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19, + "name": "EmptyArray", + "nameLocation": "87:10:2", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "97:2:2" + }, + "src": "81:19:2" + } + ], + "scope": 21, + "src": "56:46:2", + "usedErrors": [ + 19 + ] + } + ], + "src": "31:72:2" + } + }, + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/token/ERC721.sol\";\n\ncontract CouncilToken is Ownable, UUPSImplementation, ERC721 {\n error TokenIsNotTransferable();\n\n function initialize(string memory tokenName, string memory tokenSymbol) public onlyOwner {\n _initialize(tokenName, tokenSymbol, \"\");\n }\n\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n\n function mint(address to, uint256 tokenId) public virtual onlyOwner {\n _mint(to, tokenId);\n }\n\n function burn(uint256 tokenId) public virtual onlyOwner {\n _burn(tokenId);\n }\n\n function transferFrom(\n address,\n address,\n uint256\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n\n function safeTransferFrom(\n address,\n address,\n uint256,\n bytes memory\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 6380, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6281, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:39" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 6282, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 757, + "src": "56:76:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 6283, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 415, + "src": "133:69:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "file": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "id": 6284, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 1642, + "src": "203:64:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6285, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "294:7:39" + }, + "id": 6286, + "nodeType": "InheritanceSpecifier", + "src": "294:7:39" + }, + { + "baseName": { + "id": 6287, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "303:18:39" + }, + "id": 6288, + "nodeType": "InheritanceSpecifier", + "src": "303:18:39" + }, + { + "baseName": { + "id": 6289, + "name": "ERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1641, + "src": "323:6:39" + }, + "id": 6290, + "nodeType": "InheritanceSpecifier", + "src": "323:6:39" + } + ], + "canonicalName": "CouncilToken", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6379, + "linearizedBaseContracts": [ + 6379, + 1641, + 1677, + 180, + 157, + 78, + 756, + 542, + 238, + 414, + 476, + 494, + 220 + ], + "name": "CouncilToken", + "nameLocation": "278:12:39", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6292, + "name": "TokenIsNotTransferable", + "nameLocation": "342:22:39", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6291, + "nodeType": "ParameterList", + "parameters": [], + "src": "364:2:39" + }, + "src": "336:31:39" + }, + { + "body": { + "id": 6307, + "nodeType": "Block", + "src": "462:56:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6302, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6294, + "src": "484:9:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6303, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6296, + "src": "495:11:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "", + "id": 6304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "508:2:39", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 6301, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "472:11:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory,string memory)" + } + }, + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "472:39:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6306, + "nodeType": "ExpressionStatement", + "src": "472:39:39" + } + ] + }, + "functionSelector": "4cd88b76", + "id": 6308, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6299, + "kind": "modifierInvocation", + "modifierName": { + "id": 6298, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "452:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "452:9:39" + } + ], + "name": "initialize", + "nameLocation": "382:10:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6294, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "407:9:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "393:23:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6293, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "393:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6296, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "432:11:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "418:25:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6295, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "418:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "392:52:39" + }, + "returnParameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "462:0:39" + }, + "scope": 6379, + "src": "373:145:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 6320, + "nodeType": "Block", + "src": "596:46:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6317, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6310, + "src": "617:17:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6316, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "606:10:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "606:29:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6319, + "nodeType": "ExpressionStatement", + "src": "606:29:39" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 6321, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6314, + "kind": "modifierInvocation", + "modifierName": { + "id": 6313, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "586:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "586:9:39" + } + ], + "name": "upgradeTo", + "nameLocation": "533:9:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6312, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "577:8:39" + }, + "parameters": { + "id": 6311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6310, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "551:17:39", + "nodeType": "VariableDeclaration", + "scope": 6321, + "src": "543:25:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "543:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "542:27:39" + }, + "returnParameters": { + "id": 6315, + "nodeType": "ParameterList", + "parameters": [], + "src": "596:0:39" + }, + "scope": 6379, + "src": "524:118:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 6335, + "nodeType": "Block", + "src": "716:35:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6331, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "732:2:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6332, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6325, + "src": "736:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6330, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1436, + "src": "726:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:18:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6334, + "nodeType": "ExpressionStatement", + "src": "726:18:39" + } + ] + }, + "functionSelector": "40c10f19", + "id": 6336, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6328, + "kind": "modifierInvocation", + "modifierName": { + "id": 6327, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "706:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "706:9:39" + } + ], + "name": "mint", + "nameLocation": "657:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6323, + "mutability": "mutable", + "name": "to", + "nameLocation": "670:2:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "662:10:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6322, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6325, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "682:7:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "674:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "674:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "661:29:39" + }, + "returnParameters": { + "id": 6329, + "nodeType": "ParameterList", + "parameters": [], + "src": "716:0:39" + }, + "scope": 6379, + "src": "648:103:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 6347, + "nodeType": "Block", + "src": "813:31:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6344, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6338, + "src": "829:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6343, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1486, + "src": "823:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:14:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6346, + "nodeType": "ExpressionStatement", + "src": "823:14:39" + } + ] + }, + "functionSelector": "42966c68", + "id": 6348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6341, + "kind": "modifierInvocation", + "modifierName": { + "id": 6340, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "803:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "803:9:39" + } + ], + "name": "burn", + "nameLocation": "766:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6338, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:39", + "nodeType": "VariableDeclaration", + "scope": 6348, + "src": "771:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "770:17:39" + }, + "returnParameters": { + "id": 6342, + "nodeType": "ParameterList", + "parameters": [], + "src": "813:0:39" + }, + "scope": 6379, + "src": "757:87:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1259 + ], + "body": { + "id": 6361, + "nodeType": "Block", + "src": "953:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6358, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "970:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6360, + "nodeType": "RevertStatement", + "src": "963:31:39" + } + ] + }, + "functionSelector": "23b872dd", + "id": 6362, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "859:12:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6356, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "944:8:39" + }, + "parameters": { + "id": 6355, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "881:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "881:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6352, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "898:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "898:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6354, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "915:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "915:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "871:57:39" + }, + "returnParameters": { + "id": 6357, + "nodeType": "ParameterList", + "parameters": [], + "src": "953:0:39" + }, + "scope": 6379, + "src": "850:151:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1324 + ], + "body": { + "id": 6377, + "nodeType": "Block", + "src": "1136:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6374, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "1153:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1153:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6376, + "nodeType": "RevertStatement", + "src": "1146:31:39" + } + ] + }, + "functionSelector": "b88d4fde", + "id": 6378, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "1016:16:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6372, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1127:8:39" + }, + "parameters": { + "id": 6371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6364, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1042:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6363, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1042:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6366, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1059:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1059:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6368, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1076:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6367, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1076:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6370, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1093:12:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6369, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1093:5:39", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1032:79:39" + }, + "returnParameters": { + "id": 6373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1136:0:39" + }, + "scope": 6379, + "src": "1007:177:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 6380, + "src": "269:917:39", + "usedErrors": [ + 5, + 10, + 14, + 24, + 29, + 262, + 561, + 563, + 861, + 865, + 869, + 873, + 6292 + ] + } + ], + "src": "31:1156:39" + } + }, + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nabstract contract AbstractProxy {\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n address implementation = _getImplementation();\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _getImplementation() internal view virtual returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ] + }, + "id": 527, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 496, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:15" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "AbstractProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 526, + "linearizedBaseContracts": [ + 526 + ], + "name": "AbstractProxy", + "nameLocation": "74:13:15", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "122:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 499, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "132:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "132:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "132:10:15" + } + ] + }, + "id": 503, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 497, + "nodeType": "ParameterList", + "parameters": [], + "src": "102:2:15" + }, + "returnParameters": { + "id": 498, + "nodeType": "ParameterList", + "parameters": [], + "src": "122:0:15" + }, + "scope": 526, + "src": "94:55:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "182:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 506, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "192:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "192:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 508, + "nodeType": "ExpressionStatement", + "src": "192:10:15" + } + ] + }, + "id": 510, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 504, + "nodeType": "ParameterList", + "parameters": [], + "src": "162:2:15" + }, + "returnParameters": { + "id": 505, + "nodeType": "ParameterList", + "parameters": [], + "src": "182:0:15" + }, + "scope": 526, + "src": "155:54:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 519, + "nodeType": "Block", + "src": "244:521:15", + "statements": [ + { + "assignments": [ + 514 + ], + "declarations": [ + { + "constant": false, + "id": 514, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "262:14:15", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "254:22:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "254:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 517, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 515, + "name": "_getImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "279:18:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "279:20:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "254:45:15" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "375:384:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "402:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "405:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "408:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "408:14:15" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "389:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "389:34:15" + }, + "nodeType": "YulExpressionStatement", + "src": "389:34:15" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "437:74:15", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "464:3:15" + }, + "nodeType": "YulFunctionCall", + "src": "464:5:15" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "471:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "487:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "490:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "490:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "506:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "509:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "451:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "451:60:15" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "441:6:15", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "540:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "543:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "546:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "546:16:15" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "525:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "525:38:15" + }, + "nodeType": "YulExpressionStatement", + "src": "525:38:15" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "610:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "635:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "638:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "638:16:15" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "628:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "628:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "628:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "603:66:15", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "608:1:15", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "690:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "715:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "718:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "718:16:15" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "708:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "708:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "708:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "682:67:15", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "584:6:15" + }, + "nodeType": "YulSwitch", + "src": "577:172:15" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 514, + "isOffset": false, + "isSlot": false, + "src": "471:14:15", + "valueSize": 1 + } + ], + "id": 518, + "nodeType": "InlineAssembly", + "src": "366:393:15" + } + ] + }, + "id": 520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "224:8:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "232:2:15" + }, + "returnParameters": { + "id": 512, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:0:15" + }, + "scope": 526, + "src": "215:550:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 525, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "780:18:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 521, + "nodeType": "ParameterList", + "parameters": [], + "src": "798:2:15" + }, + "returnParameters": { + "id": 524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 525, + "src": "832:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "832:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "831:9:15" + }, + "scope": 526, + "src": "771:70:15", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 527, + "src": "56:787:15", + "usedErrors": [] + } + ], + "src": "31:813:15" + } + }, + "contracts/SpartanCouncil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\n\ncontract SpartanCouncil is UUPSProxy {\n // solhint-disable-next-line no-empty-blocks\n constructor(address firstImplementation) UUPSProxy(firstImplementation) {}\n}\n", + "ast": { + "absolutePath": "contracts/SpartanCouncil.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ProxyStorage": [ + 542 + ], + "SpartanCouncil": [ + 7144 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 7145, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7131, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:46" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 7132, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7145, + "sourceUnit": 817, + "src": "56:67:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7133, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "152:9:46" + }, + "id": 7134, + "nodeType": "InheritanceSpecifier", + "src": "152:9:46" + } + ], + "canonicalName": "SpartanCouncil", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7144, + "linearizedBaseContracts": [ + 7144, + 816, + 542, + 526 + ], + "name": "SpartanCouncil", + "nameLocation": "134:14:46", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 7142, + "nodeType": "Block", + "src": "289:2:46", + "statements": [] + }, + "id": 7143, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "id": 7139, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7136, + "src": "268:19:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7140, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 7138, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "258:9:46" + }, + "nodeType": "ModifierInvocation", + "src": "258:30:46" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7136, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "237:19:46", + "nodeType": "VariableDeclaration", + "scope": 7143, + "src": "229:27:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "229:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "228:29:46" + }, + "returnParameters": { + "id": 7141, + "nodeType": "ParameterList", + "parameters": [], + "src": "289:0:46" + }, + "scope": 7144, + "src": "217:74:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 7145, + "src": "125:168:46", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:263:46" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IElectionModule as IBaseElectionModule} from \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\n\ninterface ISynthetixElectionModule is IBaseElectionModule {\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external;\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n /// @notice Sets the Synthetix v2 DebtShare contract that determines vote power\n function setDebtShareContract(address newDebtShareContractAddress) external;\n\n /// @notice Returns the Synthetix v2 DebtShare contract that determines vote power\n function getDebtShareContract() external view returns (address);\n\n /// @notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch\n function setDebtShareSnapshotId(uint snapshotId) external;\n\n /// @notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch\n function getDebtShareSnapshotId() external view returns (uint);\n\n /// @notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot\n function getDebtShare(address user) external view returns (uint);\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n /// @notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) external;\n\n /// @notice Returns the current epoch's merkle root for user debt shares on other chains\n function getCrossChainDebtShareMerkleRoot() external view returns (bytes32);\n\n /// @notice Returns the current epoch's merkle root block number\n function getCrossChainDebtShareMerkleRootBlockNumber() external view returns (uint);\n\n /// @notice Allows users to declare their Synthetix v2 debt shares on other chains\n function declareCrossChainDebtShare(\n address account,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) external;\n\n /// @notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains\n function getDeclaredCrossChainDebtShare(address account) external view returns (uint);\n\n /// @notice Declares cross chain debt shares and casts a vote\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Sets the Optimism cross domain messenger on L2.\n function setCrossDomainMessenger(address messenger) external;\n\n /// @notice Returns the Optimism cross domain messenger on L2.\n function getCrossDomainMessenger() external view returns (address);\n\n /// @notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts.\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Allows L1 non-EOA addresses to vote on an election.\n function castRelayed(address user, address[] calldata candidates) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "exportedSymbols": { + "IBaseElectionModule": [ + 2778 + ], + "ISynthetixElectionModule": [ + 6574 + ] + }, + "id": 6575, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6430, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6432, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6575, + "sourceUnit": 2779, + "src": "56:122:42", + "symbolAliases": [ + { + "foreign": { + "id": 6431, + "name": "IElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:15:42", + "typeDescriptions": {} + }, + "local": "IBaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6433, + "name": "IBaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "218:19:42" + }, + "id": 6434, + "nodeType": "InheritanceSpecifier", + "src": "218:19:42" + } + ], + "canonicalName": "ISynthetixElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6574, + "linearizedBaseContracts": [ + 6574, + 2778 + ], + "name": "ISynthetixElectionModule", + "nameLocation": "190:24:42", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 6435, + "nodeType": "StructuredDocumentation", + "src": "244:73:42", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "0166451a", + "id": 6455, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "331:24:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6437, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "379:16:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "365:30:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6436, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "365:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6439, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "419:18:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "405:32:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6438, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "405:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6442, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "464:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "447:29:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "447:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6441, + "nodeType": "ArrayTypeName", + "src": "447:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "492:20:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "486:26:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6443, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "486:5:42", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6446, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "529:25:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "522:32:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6445, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "522:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6448, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "571:21:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "564:28:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6447, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "564:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "609:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "602:19:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6449, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "602:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6452, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "639:17:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "631:25:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "631:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "355:307:42" + }, + "returnParameters": { + "id": 6454, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:42" + }, + "scope": 6574, + "src": "322:350:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6456, + "nodeType": "StructuredDocumentation", + "src": "792:79:42", + "text": "@notice Sets the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "0ebf4796", + "id": 6461, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareContract", + "nameLocation": "885:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6458, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "914:27:42", + "nodeType": "VariableDeclaration", + "scope": 6461, + "src": "906:35:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6457, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "906:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "905:37:42" + }, + "returnParameters": { + "id": 6460, + "nodeType": "ParameterList", + "parameters": [], + "src": "951:0:42" + }, + "scope": 6574, + "src": "876:76:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "958:82:42", + "text": "@notice Returns the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "aeff252a", + "id": 6467, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "1054:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6463, + "nodeType": "ParameterList", + "parameters": [], + "src": "1074:2:42" + }, + "returnParameters": { + "id": 6466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6465, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6467, + "src": "1100:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1100:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1099:9:42" + }, + "scope": 6574, + "src": "1045:64:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6468, + "nodeType": "StructuredDocumentation", + "src": "1115:94:42", + "text": "@notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch" + }, + "functionSelector": "a0f42837", + "id": 6473, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareSnapshotId", + "nameLocation": "1223:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6471, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "1251:10:42", + "nodeType": "VariableDeclaration", + "scope": 6473, + "src": "1246:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1246:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1245:17:42" + }, + "returnParameters": { + "id": 6472, + "nodeType": "ParameterList", + "parameters": [], + "src": "1271:0:42" + }, + "scope": 6574, + "src": "1214:58:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6474, + "nodeType": "StructuredDocumentation", + "src": "1278:77:42", + "text": "@notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch" + }, + "functionSelector": "dfe7cd3a", + "id": 6479, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "1369:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6475, + "nodeType": "ParameterList", + "parameters": [], + "src": "1391:2:42" + }, + "returnParameters": { + "id": 6478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6477, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6479, + "src": "1417:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1417:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:42" + }, + "scope": 6574, + "src": "1360:63:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6480, + "nodeType": "StructuredDocumentation", + "src": "1429:98:42", + "text": "@notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot" + }, + "functionSelector": "f2e56dea", + "id": 6487, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "1541:12:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "user", + "nameLocation": "1562:4:42", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1554:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1554:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1553:14:42" + }, + "returnParameters": { + "id": 6486, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6485, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1591:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1591:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1590:6:42" + }, + "scope": 6574, + "src": "1532:65:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6488, + "nodeType": "StructuredDocumentation", + "src": "1729:112:42", + "text": "@notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch" + }, + "functionSelector": "33f3f3de", + "id": 6495, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "1855:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6490, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "1896:10:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1888:18:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6489, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1888:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6492, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "1913:11:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1908:16:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6491, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1887:38:42" + }, + "returnParameters": { + "id": 6494, + "nodeType": "ParameterList", + "parameters": [], + "src": "1934:0:42" + }, + "scope": 6574, + "src": "1846:89:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "1941:88:42", + "text": "@notice Returns the current epoch's merkle root for user debt shares on other chains" + }, + "functionSelector": "b55c43d2", + "id": 6501, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "2043:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6497, + "nodeType": "ParameterList", + "parameters": [], + "src": "2075:2:42" + }, + "returnParameters": { + "id": 6500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6499, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6501, + "src": "2101:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6498, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2101:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2100:9:42" + }, + "scope": 6574, + "src": "2034:76:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6502, + "nodeType": "StructuredDocumentation", + "src": "2116:64:42", + "text": "@notice Returns the current epoch's merkle root block number" + }, + "functionSelector": "d9617851", + "id": 6507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2194:43:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6503, + "nodeType": "ParameterList", + "parameters": [], + "src": "2237:2:42" + }, + "returnParameters": { + "id": 6506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6507, + "src": "2263:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6504, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2263:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2262:6:42" + }, + "scope": 6574, + "src": "2185:84:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6508, + "nodeType": "StructuredDocumentation", + "src": "2275:82:42", + "text": "@notice Allows users to declare their Synthetix v2 debt shares on other chains" + }, + "functionSelector": "7d264ccb", + "id": 6518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareCrossChainDebtShare", + "nameLocation": "2371:26:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6510, + "mutability": "mutable", + "name": "account", + "nameLocation": "2415:7:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2407:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6509, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6512, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2440:9:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2432:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6511, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2432:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6515, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2478:11:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2459:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6513, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2459:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6514, + "nodeType": "ArrayTypeName", + "src": "2459:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "2397:98:42" + }, + "returnParameters": { + "id": 6517, + "nodeType": "ParameterList", + "parameters": [], + "src": "2504:0:42" + }, + "scope": 6574, + "src": "2362:143:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6519, + "nodeType": "StructuredDocumentation", + "src": "2511:116:42", + "text": "@notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains" + }, + "functionSelector": "796c5c80", + "id": 6526, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "2641:30:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6521, + "mutability": "mutable", + "name": "account", + "nameLocation": "2680:7:42", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2672:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6520, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2672:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2671:17:42" + }, + "returnParameters": { + "id": 6525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6524, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2712:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2711:6:42" + }, + "scope": 6574, + "src": "2632:86:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6527, + "nodeType": "StructuredDocumentation", + "src": "2724:61:42", + "text": "@notice Declares cross chain debt shares and casts a vote" + }, + "functionSelector": "9a9a8e1a", + "id": 6538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCast", + "nameLocation": "2799:14:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6529, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2831:9:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2823:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2823:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6532, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2869:11:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2850:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6530, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2850:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6531, + "nodeType": "ArrayTypeName", + "src": "2850:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6535, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2909:10:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2890:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2890:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6534, + "nodeType": "ArrayTypeName", + "src": "2890:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2813:112:42" + }, + "returnParameters": { + "id": 6537, + "nodeType": "ParameterList", + "parameters": [], + "src": "2934:0:42" + }, + "scope": 6574, + "src": "2790:145:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6539, + "nodeType": "StructuredDocumentation", + "src": "2941:59:42", + "text": "@notice Sets the Optimism cross domain messenger on L2." + }, + "functionSelector": "211de0b4", + "id": 6544, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossDomainMessenger", + "nameLocation": "3014:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6541, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3046:9:42", + "nodeType": "VariableDeclaration", + "scope": 6544, + "src": "3038:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6540, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3038:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3037:19:42" + }, + "returnParameters": { + "id": 6543, + "nodeType": "ParameterList", + "parameters": [], + "src": "3065:0:42" + }, + "scope": 6574, + "src": "3005:61:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6545, + "nodeType": "StructuredDocumentation", + "src": "3072:62:42", + "text": "@notice Returns the Optimism cross domain messenger on L2." + }, + "functionSelector": "f675fa62", + "id": 6550, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "3148:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [], + "src": "3171:2:42" + }, + "returnParameters": { + "id": 6549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6548, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6550, + "src": "3197:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3197:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3196:9:42" + }, + "scope": 6574, + "src": "3139:67:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6551, + "nodeType": "StructuredDocumentation", + "src": "3212:87:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts." + }, + "functionSelector": "4b144674", + "id": 6564, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCastRelayed", + "nameLocation": "3313:21:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6553, + "mutability": "mutable", + "name": "user", + "nameLocation": "3352:4:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3344:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6552, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3344:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6555, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "3374:9:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3366:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6558, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "3412:11:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3393:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6556, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3393:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6557, + "nodeType": "ArrayTypeName", + "src": "3393:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6561, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3452:10:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3433:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3433:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6560, + "nodeType": "ArrayTypeName", + "src": "3433:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3334:134:42" + }, + "returnParameters": { + "id": 6563, + "nodeType": "ParameterList", + "parameters": [], + "src": "3477:0:42" + }, + "scope": 6574, + "src": "3304:174:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6565, + "nodeType": "StructuredDocumentation", + "src": "3484:63:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election." + }, + "functionSelector": "5a2b3fd7", + "id": 6573, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "castRelayed", + "nameLocation": "3561:11:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6567, + "mutability": "mutable", + "name": "user", + "nameLocation": "3581:4:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3573:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6566, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6570, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3606:10:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3587:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6568, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3587:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6569, + "nodeType": "ArrayTypeName", + "src": "3587:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3572:45:42" + }, + "returnParameters": { + "id": 6572, + "nodeType": "ParameterList", + "parameters": [], + "src": "3626:0:42" + }, + "scope": 6574, + "src": "3552:75:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6575, + "src": "180:3449:42", + "usedErrors": [] + } + ], + "src": "31:3599:42" + } + }, + "contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {UpgradeModule as BaseUpgradeModule} from \"@synthetixio/core-modules/contracts/modules/UpgradeModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract UpgradeModule is BaseUpgradeModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "BaseUpgradeModule": [ + 4218 + ], + "UpgradeModule": [ + 7165 + ] + }, + "id": 7166, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7160, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:49" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "id": 7162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7166, + "sourceUnit": 4219, + "src": "56:113:49", + "symbolAliases": [ + { + "foreign": { + "id": 7161, + "name": "UpgradeModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:13:49", + "typeDescriptions": {} + }, + "local": "BaseUpgradeModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7163, + "name": "BaseUpgradeModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4218, + "src": "242:17:49" + }, + "id": 7164, + "nodeType": "InheritanceSpecifier", + "src": "242:17:49" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7165, + "linearizedBaseContracts": [ + 7165, + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "225:13:49", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7166, + "src": "216:48:49", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:234:49" + } + }, + "contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {OwnerModule as BaseOwnerModule} from \"@synthetixio/core-modules/contracts/modules/OwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is BaseOwnerModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "BaseOwnerModule": [ + 4196 + ], + "OwnerModule": [ + 7158 + ] + }, + "id": 7159, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7153, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:48" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "id": 7155, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7159, + "sourceUnit": 4197, + "src": "56:107:48", + "symbolAliases": [ + { + "foreign": { + "id": 7154, + "name": "OwnerModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:11:48", + "typeDescriptions": {} + }, + "local": "BaseOwnerModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7156, + "name": "BaseOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4196, + "src": "234:15:48" + }, + "id": 7157, + "nodeType": "InheritanceSpecifier", + "src": "234:15:48" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7158, + "linearizedBaseContracts": [ + 7158, + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "219:11:48", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7159, + "src": "210:44:48", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:224:48" + } + }, + "contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as SynthetixElectionModule} from \"@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionModule is SynthetixElectionModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "ElectionModule": [ + 7190 + ], + "SynthetixElectionModule": [ + 6628 + ] + }, + "id": 7191, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7185, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "id": 7187, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7191, + "sourceUnit": 6629, + "src": "56:129:42", + "symbolAliases": [ + { + "foreign": { + "id": 7186, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:42", + "typeDescriptions": {} + }, + "local": "SynthetixElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7188, + "name": "SynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6628, + "src": "259:23:42" + }, + "id": 7189, + "nodeType": "InheritanceSpecifier", + "src": "259:23:42" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7190, + "linearizedBaseContracts": [ + 7190, + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "241:14:42", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7191, + "src": "232:55:42", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:257:42" + } + }, + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as BaseElectionModule} from \"@synthetixio/core-modules/contracts/modules/ElectionModule.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\nimport \"../interfaces/ISynthetixElectionModule.sol\";\nimport \"../submodules/election/DebtShareManager.sol\";\nimport \"../submodules/election/CrossChainDebtShareManager.sol\";\n\n/// @title Module for electing a council, represented by a set of NFT holders\n/// @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n/// @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n/// @dev A snapshot must be set to determine the debt share id to use.\n/// @dev The merkle proof must also be provided for L1 debt shares before an election.\n/// @dev L1 EOA debt share holders can use declareAndCast to vote.\n/// @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers.\ncontract ElectionModule is ISynthetixElectionModule, BaseElectionModule, DebtShareManager, CrossChainDebtShareManager {\n error TooManyCandidates();\n error WrongInitializer();\n\n /// @dev The BaseElectionModule initializer should not be called, and this one must be called instead\n function initializeElectionModule(\n string memory,\n string memory,\n address[] memory,\n uint8,\n uint64,\n uint64,\n uint64\n ) external view override(BaseElectionModule, IElectionModule) onlyOwner onlyIfNotInitialized {\n revert WrongInitializer();\n }\n\n /// @dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external override onlyOwner onlyIfNotInitialized {\n _setDebtShareContract(debtShareContract);\n\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n /// @dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n /// @dev This function is all that needs to be called by L2 debt share holders to vote.\n function cast(address[] calldata candidates)\n public\n override(BaseElectionModule, IElectionModule)\n onlyInPeriod(ElectionPeriod.Vote)\n {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n _cast(msg.sender, candidates);\n }\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n function setDebtShareContract(address debtShareContract)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Administration)\n {\n _setDebtShareContract(debtShareContract);\n\n emit DebtShareContractSet(debtShareContract);\n }\n\n function getDebtShareContract() external view override returns (address) {\n return address(_debtShareStore().debtShareContract);\n }\n\n function setDebtShareSnapshotId(uint snapshotId) external override onlyOwner onlyInPeriod(ElectionPeriod.Nomination) {\n _setDebtShareSnapshotId(snapshotId);\n }\n\n function getDebtShareSnapshotId() external view override returns (uint) {\n return _getDebtShareSnapshotId();\n }\n\n function getDebtShare(address user) external view override returns (uint) {\n return _getDebtShare(user);\n }\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Nomination)\n {\n _setCrossChainDebtShareMerkleRoot(merkleRoot, blocknumber);\n\n emit CrossChainDebtShareMerkleRootSet(merkleRoot, blocknumber, _getCurrentEpochIndex());\n }\n\n function getCrossChainDebtShareMerkleRoot() external view override returns (bytes32) {\n return _getCrossChainDebtShareMerkleRoot();\n }\n\n function getCrossChainDebtShareMerkleRootBlockNumber() external view override returns (uint) {\n return _getCrossChainDebtShareMerkleRootBlockNumber();\n }\n\n function declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n _declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n emit CrossChainDebtShareDeclared(user, debtShare);\n }\n\n /// @dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls.\n function getDeclaredCrossChainDebtShare(address user) external view override returns (uint) {\n return _getDeclaredCrossChainDebtShare(user);\n }\n\n /// @dev L1 EOA debt share holders can call this single function to vote.\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n declareCrossChainDebtShare(msg.sender, debtShare, merkleProof);\n\n cast(candidates);\n }\n\n function setCrossDomainMessenger(address messenger) external onlyOwner {\n _setCrossDomainMessenger(messenger);\n\n emit CrossDomainMessengerSet(messenger);\n }\n\n function getCrossDomainMessenger() external view returns (address) {\n return _getCrossDomainMessenger();\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000).\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n _cast(user, candidates);\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000).\n function castRelayed(address user, address[] calldata candidates) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n _cast(user, candidates);\n }\n\n // ---------------------------------------\n // Internal\n // ---------------------------------------\n\n /// @dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered\n function _getVotePower(address user) internal view virtual override returns (uint) {\n uint votePower = _getDebtShare(user) + _getDeclaredCrossChainDebtShare(user);\n\n return MathUtil.sqrt(votePower);\n }\n\n function _createNewEpoch() internal virtual override {\n super._createNewEpoch();\n\n DebtShareStore storage store = _debtShareStore();\n\n store.debtShareIds.push();\n store.crossChainDebtShareData.push();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "BaseElectionModule": [ + 3799 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 7004 + ], + "DebtShareManager": [ + 7183 + ], + "DebtShareStorage": [ + 6665 + ], + "ElectionBase": [ + 4264 + ], + "ElectionModule": [ + 6628 + ], + "ElectionStorage": [ + 3912 + ], + "IBaseElectionModule": [ + 2663 + ], + "ICrossDomainMessenger": [ + 5997 + ], + "IDebtShare": [ + 6009 + ], + "IElectionModule": [ + 2663 + ], + "ISynthetixElectionModule": [ + 6155 + ], + "MathUtil": [ + 1708 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6629, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6157, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "id": 6159, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 3800, + "src": "56:116:38", + "symbolAliases": [ + { + "foreign": { + "id": 6158, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:38", + "typeDescriptions": {} + }, + "local": "BaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 6160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 1709, + "src": "173:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6161, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 2664, + "src": "240:76:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "file": "../interfaces/ISynthetixElectionModule.sol", + "id": 6162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 6156, + "src": "317:52:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "file": "../submodules/election/DebtShareManager.sol", + "id": 6163, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7184, + "src": "370:53:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "file": "../submodules/election/CrossChainDebtShareManager.sol", + "id": 6164, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7005, + "src": "424:63:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6166, + "name": "ISynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6155, + "src": "1206:24:38" + }, + "id": 6167, + "nodeType": "InheritanceSpecifier", + "src": "1206:24:38" + }, + { + "baseName": { + "id": 6168, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1232:18:38" + }, + "id": 6169, + "nodeType": "InheritanceSpecifier", + "src": "1232:18:38" + }, + { + "baseName": { + "id": 6170, + "name": "DebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7183, + "src": "1252:16:38" + }, + "id": 6171, + "nodeType": "InheritanceSpecifier", + "src": "1252:16:38" + }, + { + "baseName": { + "id": 6172, + "name": "CrossChainDebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7004, + "src": "1270:26:38" + }, + "id": 6173, + "nodeType": "InheritanceSpecifier", + "src": "1270:26:38" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "documentation": { + "id": 6165, + "nodeType": "StructuredDocumentation", + "src": "489:690:38", + "text": "@title Module for electing a council, represented by a set of NFT holders\n @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n @dev A snapshot must be set to determine the debt share id to use.\n @dev The merkle proof must also be provided for L1 debt shares before an election.\n @dev L1 EOA debt share holders can use declareAndCast to vote.\n @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers." + }, + "fullyImplemented": true, + "id": 6628, + "linearizedBaseContracts": [ + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "1188:14:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6175, + "name": "TooManyCandidates", + "nameLocation": "1309:17:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6174, + "nodeType": "ParameterList", + "parameters": [], + "src": "1326:2:38" + }, + "src": "1303:26:38" + }, + { + "id": 6177, + "name": "WrongInitializer", + "nameLocation": "1340:16:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6176, + "nodeType": "ParameterList", + "parameters": [], + "src": "1356:2:38" + }, + "src": "1334:25:38" + }, + { + "baseFunctions": [ + 2391, + 2725 + ], + "body": { + "id": 6206, + "nodeType": "Block", + "src": "1737:42:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6203, + "name": "WrongInitializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6177, + "src": "1754:16:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1754:18:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6205, + "nodeType": "RevertStatement", + "src": "1747:25:38" + } + ] + }, + "documentation": { + "id": 6178, + "nodeType": "StructuredDocumentation", + "src": "1365:101:38", + "text": "@dev The BaseElectionModule initializer should not be called, and this one must be called instead" + }, + "functionSelector": "ee695137", + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6199, + "kind": "modifierInvocation", + "modifierName": { + "id": 6198, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1706:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "1706:9:38" + }, + { + "id": 6201, + "kind": "modifierInvocation", + "modifierName": { + "id": 6200, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1716:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "1716:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1480:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6197, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6195, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1669:18:38" + }, + { + "id": 6196, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "1689:15:38" + } + ], + "src": "1660:45:38" + }, + "parameters": { + "id": 6194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1514:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6179, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1514:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1537:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6181, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1537:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6185, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1560:16:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1560:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6184, + "nodeType": "ArrayTypeName", + "src": "1560:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6187, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1586:5:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6186, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1586:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1601:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6188, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1601:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1617:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6190, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1617:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1633:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6192, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1504:141:38" + }, + "returnParameters": { + "id": 6202, + "nodeType": "ParameterList", + "parameters": [], + "src": "1737:0:38" + }, + "scope": 6628, + "src": "1471:308:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6036 + ], + "body": { + "id": 6247, + "nodeType": "Block", + "src": "2290:325:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6234, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6225, + "src": "2322:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6233, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "2300:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2300:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6236, + "nodeType": "ExpressionStatement", + "src": "2300:40:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6238, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6210, + "src": "2390:16:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6239, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "2420:18:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6240, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2452:12:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 6241, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6217, + "src": "2478:20:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6242, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "2512:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6243, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2551:21:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6244, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "2586:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 6237, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2871, + "src": "2351:25:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2351:257:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6246, + "nodeType": "ExpressionStatement", + "src": "2351:257:38" + } + ] + }, + "documentation": { + "id": 6208, + "nodeType": "StructuredDocumentation", + "src": "1785:110:38", + "text": "@dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract" + }, + "functionSelector": "0166451a", + "id": 6248, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6229, + "kind": "modifierInvocation", + "modifierName": { + "id": 6228, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "2259:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "2259:9:38" + }, + { + "id": 6231, + "kind": "modifierInvocation", + "modifierName": { + "id": 6230, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "2269:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "2269:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1909:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6227, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2250:8:38" + }, + "parameters": { + "id": 6226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6210, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1957:16:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1943:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6209, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1943:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1997:18:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1983:32:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6211, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1983:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "2042:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2025:29:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2025:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2025:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6217, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2070:20:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2064:26:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6216, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2064:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2107:25:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2100:32:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2100:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2149:21:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2142:28:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6220, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2142:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2187:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2180:19:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6222, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2180:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6225, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "2217:17:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2209:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2209:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1933:307:38" + }, + "returnParameters": { + "id": 6232, + "nodeType": "ParameterList", + "parameters": [], + "src": "2290:0:38" + }, + "scope": 6628, + "src": "1900:715:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2479, + 3273 + ], + "body": { + "id": 6277, + "nodeType": "Block", + "src": "2972:134:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6262, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "2986:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2986:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3006:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2986:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6270, + "nodeType": "IfStatement", + "src": "2982:78:38", + "trueBody": { + "id": 6269, + "nodeType": "Block", + "src": "3009:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6266, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "3030:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3030:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6268, + "nodeType": "RevertStatement", + "src": "3023:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6272, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3076:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3076:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6274, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "3088:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6271, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "3070:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3070:29:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6276, + "nodeType": "ExpressionStatement", + "src": "3070:29:38" + } + ] + }, + "documentation": { + "id": 6249, + "nodeType": "StructuredDocumentation", + "src": "2621:186:38", + "text": "@dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n @dev This function is all that needs to be called by L2 debt share holders to vote." + }, + "functionSelector": "84ae670c", + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6258, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "2947:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "2947:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6260, + "kind": "modifierInvocation", + "modifierName": { + "id": 6257, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "2934:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "2934:33:38" + } + ], + "name": "cast", + "nameLocation": "2821:4:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6256, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6254, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "2889:18:38" + }, + { + "id": 6255, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "2909:15:38" + } + ], + "src": "2880:45:38" + }, + "parameters": { + "id": 6253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6252, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2845:10:38", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "2826:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2826:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6251, + "nodeType": "ArrayTypeName", + "src": "2826:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2825:31:38" + }, + "returnParameters": { + "id": 6261, + "nodeType": "ParameterList", + "parameters": [], + "src": "2972:0:38" + }, + "scope": 6628, + "src": "2812:294:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6042 + ], + "body": { + "id": 6298, + "nodeType": "Block", + "src": "3391:112:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6291, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3423:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6290, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "3401:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3401:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6293, + "nodeType": "ExpressionStatement", + "src": "3401:40:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6295, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3478:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6294, + "name": "DebtShareContractSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7024, + "src": "3457:20:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3457:39:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6297, + "nodeType": "EmitStatement", + "src": "3452:44:38" + } + ] + }, + "functionSelector": "0ebf4796", + "id": 6299, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6284, + "kind": "modifierInvocation", + "modifierName": { + "id": 6283, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3325:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3325:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6286, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3356:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 3919, + "src": "3356:29:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6288, + "kind": "modifierInvocation", + "modifierName": { + "id": 6285, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3343:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3343:43:38" + } + ], + "name": "setDebtShareContract", + "nameLocation": "3235:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6282, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3308:8:38" + }, + "parameters": { + "id": 6281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6280, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "3264:17:38", + "nodeType": "VariableDeclaration", + "scope": 6299, + "src": "3256:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3256:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3255:27:38" + }, + "returnParameters": { + "id": 6289, + "nodeType": "ParameterList", + "parameters": [], + "src": "3391:0:38" + }, + "scope": 6628, + "src": "3226:277:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6048 + ], + "body": { + "id": 6312, + "nodeType": "Block", + "src": "3582:68:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6307, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "3607:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3607:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6636, + "src": "3607:35:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + ], + "id": 6306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3599:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3599:7:38", + "typeDescriptions": {} + } + }, + "id": 6310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3599:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6304, + "id": 6311, + "nodeType": "Return", + "src": "3592:51:38" + } + ] + }, + "functionSelector": "aeff252a", + "id": 6313, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "3518:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6301, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3555:8:38" + }, + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "3538:2:38" + }, + "returnParameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6313, + "src": "3573:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3572:9:38" + }, + "scope": 6628, + "src": "3509:141:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6054 + ], + "body": { + "id": 6329, + "nodeType": "Block", + "src": "3773:52:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6326, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3807:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6325, + "name": "_setDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7060, + "src": "3783:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3783:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6328, + "nodeType": "ExpressionStatement", + "src": "3783:35:38" + } + ] + }, + "functionSelector": "a0f42837", + "id": 6330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6319, + "kind": "modifierInvocation", + "modifierName": { + "id": 6318, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3723:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3723:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6321, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3746:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "3746:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6323, + "kind": "modifierInvocation", + "modifierName": { + "id": 6320, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3733:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3733:39:38" + } + ], + "name": "setDebtShareSnapshotId", + "nameLocation": "3665:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6317, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3714:8:38" + }, + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6315, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "3693:10:38", + "nodeType": "VariableDeclaration", + "scope": 6330, + "src": "3688:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3688:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3687:17:38" + }, + "returnParameters": { + "id": 6324, + "nodeType": "ParameterList", + "parameters": [], + "src": "3773:0:38" + }, + "scope": 6628, + "src": "3656:169:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6060 + ], + "body": { + "id": 6339, + "nodeType": "Block", + "src": "3903:49:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6336, + "name": "_getDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7090, + "src": "3920:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3920:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6335, + "id": 6338, + "nodeType": "Return", + "src": "3913:32:38" + } + ] + }, + "functionSelector": "dfe7cd3a", + "id": 6340, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "3840:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6332, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3879:8:38" + }, + "parameters": { + "id": 6331, + "nodeType": "ParameterList", + "parameters": [], + "src": "3862:2:38" + }, + "returnParameters": { + "id": 6335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6334, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6340, + "src": "3897:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6333, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3897:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3896:6:38" + }, + "scope": 6628, + "src": "3831:121:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6068 + ], + "body": { + "id": 6352, + "nodeType": "Block", + "src": "4032:43:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6349, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6342, + "src": "4063:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6348, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "4049:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4049:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6347, + "id": 6351, + "nodeType": "Return", + "src": "4042:26:38" + } + ] + }, + "functionSelector": "f2e56dea", + "id": 6353, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "3967:12:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6344, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4008:8:38" + }, + "parameters": { + "id": 6343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6342, + "mutability": "mutable", + "name": "user", + "nameLocation": "3988:4:38", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "3980:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6341, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3980:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3979:14:38" + }, + "returnParameters": { + "id": 6347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6346, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "4026:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6345, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4026:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4025:6:38" + }, + "scope": 6628, + "src": "3958:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6076 + ], + "body": { + "id": 6379, + "nodeType": "Block", + "src": "4391:173:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6368, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6369, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4447:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6367, + "name": "_setCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6728, + "src": "4401:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256)" + } + }, + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4401:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6371, + "nodeType": "ExpressionStatement", + "src": "4401:58:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6373, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4508:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6374, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4520:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6375, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4117, + "src": "4533:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4533:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6372, + "name": "CrossChainDebtShareMerkleRootSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6692, + "src": "4475:32:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,uint256)" + } + }, + "id": 6377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:82:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6378, + "nodeType": "EmitStatement", + "src": "4470:87:38" + } + ] + }, + "functionSelector": "33f3f3de", + "id": 6380, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6361, + "kind": "modifierInvocation", + "modifierName": { + "id": 6360, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4329:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "4329:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6363, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "4360:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "4360:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6365, + "kind": "modifierInvocation", + "modifierName": { + "id": 6362, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "4347:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "4347:39:38" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "4216:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6359, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4312:8:38" + }, + "parameters": { + "id": 6358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6355, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "4257:10:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4249:18:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6354, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4249:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6357, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "4274:11:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4269:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6356, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4269:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4248:38:38" + }, + "returnParameters": { + "id": 6366, + "nodeType": "ParameterList", + "parameters": [], + "src": "4391:0:38" + }, + "scope": 6628, + "src": "4207:357:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6082 + ], + "body": { + "id": 6389, + "nodeType": "Block", + "src": "4655:59:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6386, + "name": "_getCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6828, + "src": "4672:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4672:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6385, + "id": 6388, + "nodeType": "Return", + "src": "4665:42:38" + } + ] + }, + "functionSelector": "b55c43d2", + "id": 6390, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "4579:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6382, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4628:8:38" + }, + "parameters": { + "id": 6381, + "nodeType": "ParameterList", + "parameters": [], + "src": "4611:2:38" + }, + "returnParameters": { + "id": 6385, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6384, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6390, + "src": "4646:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6383, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4646:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4645:9:38" + }, + "scope": 6628, + "src": "4570:144:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6088 + ], + "body": { + "id": 6399, + "nodeType": "Block", + "src": "4813:70:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6396, + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6856, + "src": "4830:44:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4830:46:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6395, + "id": 6398, + "nodeType": "Return", + "src": "4823:53:38" + } + ] + }, + "functionSelector": "d9617851", + "id": 6400, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "4729:43:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6392, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4789:8:38" + }, + "parameters": { + "id": 6391, + "nodeType": "ParameterList", + "parameters": [], + "src": "4772:2:38" + }, + "returnParameters": { + "id": 6395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6400, + "src": "4807:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4807:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4806:6:38" + }, + "scope": 6628, + "src": "4720:163:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6099 + ], + "body": { + "id": 6426, + "nodeType": "Block", + "src": "5070:134:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6416, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5108:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6417, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5114:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6418, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6407, + "src": "5125:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6415, + "name": "_declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6800, + "src": "5080:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5080:57:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6420, + "nodeType": "ExpressionStatement", + "src": "5080:57:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6422, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5181:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6423, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5187:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6421, + "name": "CrossChainDebtShareDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6698, + "src": "5153:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5153:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6425, + "nodeType": "EmitStatement", + "src": "5148:49:38" + } + ] + }, + "functionSelector": "7d264ccb", + "id": 6427, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5049:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5049:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6413, + "kind": "modifierInvocation", + "modifierName": { + "id": 6410, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5036:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5036:33:38" + } + ], + "name": "declareCrossChainDebtShare", + "nameLocation": "4898:26:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6409, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5027:8:38" + }, + "parameters": { + "id": 6408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6402, + "mutability": "mutable", + "name": "user", + "nameLocation": "4942:4:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4934:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4934:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "4964:9:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4956:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4956:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6407, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5002:11:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4983:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6405, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4983:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6406, + "nodeType": "ArrayTypeName", + "src": "4983:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4924:95:38" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "5070:0:38" + }, + "scope": 6628, + "src": "4889:315:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6107 + ], + "body": { + "id": 6440, + "nodeType": "Block", + "src": "5451:61:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6437, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5500:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6436, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "5468:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5468:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6435, + "id": 6439, + "nodeType": "Return", + "src": "5461:44:38" + } + ] + }, + "documentation": { + "id": 6428, + "nodeType": "StructuredDocumentation", + "src": "5210:144:38", + "text": "@dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls." + }, + "functionSelector": "796c5c80", + "id": 6441, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "5368:30:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6432, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5427:8:38" + }, + "parameters": { + "id": 6431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6430, + "mutability": "mutable", + "name": "user", + "nameLocation": "5407:4:38", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5399:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5399:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5398:14:38" + }, + "returnParameters": { + "id": 6435, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6434, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5445:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6433, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5445:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5444:6:38" + }, + "scope": 6628, + "src": "5359:153:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6119 + ], + "body": { + "id": 6469, + "nodeType": "Block", + "src": "5782:106:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6459, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5819:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5819:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6461, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "5831:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6462, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6447, + "src": "5842:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6458, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "5792:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:62:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6464, + "nodeType": "ExpressionStatement", + "src": "5792:62:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6466, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6450, + "src": "5870:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6465, + "name": "cast", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6278 + ], + "referencedDeclaration": 6278, + "src": "5865:4:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 6467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5865:16:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6468, + "nodeType": "ExpressionStatement", + "src": "5865:16:38" + } + ] + }, + "documentation": { + "id": 6442, + "nodeType": "StructuredDocumentation", + "src": "5518:73:38", + "text": "@dev L1 EOA debt share holders can call this single function to vote." + }, + "functionSelector": "9a9a8e1a", + "id": 6470, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6454, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5761:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5761:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6456, + "kind": "modifierInvocation", + "modifierName": { + "id": 6453, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5748:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5748:33:38" + } + ], + "name": "declareAndCast", + "nameLocation": "5605:14:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6452, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5739:8:38" + }, + "parameters": { + "id": 6451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "5637:9:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5629:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5629:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6447, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5675:11:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5656:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5656:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6446, + "nodeType": "ArrayTypeName", + "src": "5656:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "5715:10:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5696:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5696:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6449, + "nodeType": "ArrayTypeName", + "src": "5696:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5619:112:38" + }, + "returnParameters": { + "id": 6457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5782:0:38" + }, + "scope": 6628, + "src": "5596:292:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6125 + ], + "body": { + "id": 6485, + "nodeType": "Block", + "src": "5965:102:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6478, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6000:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6477, + "name": "_setCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6939, + "src": "5975:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5975:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6480, + "nodeType": "ExpressionStatement", + "src": "5975:35:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6482, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6050:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6481, + "name": "CrossDomainMessengerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4080, + "src": "6026:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:34:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6484, + "nodeType": "EmitStatement", + "src": "6021:39:38" + } + ] + }, + "functionSelector": "211de0b4", + "id": 6486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6475, + "kind": "modifierInvocation", + "modifierName": { + "id": 6474, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5955:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "5955:9:38" + } + ], + "name": "setCrossDomainMessenger", + "nameLocation": "5903:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "5935:9:38", + "nodeType": "VariableDeclaration", + "scope": 6486, + "src": "5927:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5927:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5926:19:38" + }, + "returnParameters": { + "id": 6476, + "nodeType": "ParameterList", + "parameters": [], + "src": "5965:0:38" + }, + "scope": 6628, + "src": "5894:173:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6131 + ], + "body": { + "id": 6494, + "nodeType": "Block", + "src": "6140:50:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6491, + "name": "_getCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6952, + "src": "6157:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 6492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6157:26:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6490, + "id": 6493, + "nodeType": "Return", + "src": "6150:33:38" + } + ] + }, + "functionSelector": "f675fa62", + "id": 6495, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "6082:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6487, + "nodeType": "ParameterList", + "parameters": [], + "src": "6105:2:38" + }, + "returnParameters": { + "id": 6490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6489, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "6131:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6131:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6130:9:38" + }, + "scope": 6628, + "src": "6073:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6145 + ], + "body": { + "id": 6538, + "nodeType": "Block", + "src": "6870:377:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6514, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "6884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6884:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6904:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6884:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6522, + "nodeType": "IfStatement", + "src": "6880:78:38", + "trueBody": { + "id": 6521, + "nodeType": "Block", + "src": "6907:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6518, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "6928:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6928:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6520, + "nodeType": "RevertStatement", + "src": "6921:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6524, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7134:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6523, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "7107:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7107:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6526, + "nodeType": "ExpressionStatement", + "src": "7107:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6528, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7177:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6529, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6500, + "src": "7183:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6530, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6503, + "src": "7194:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6527, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "7150:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7150:56:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6532, + "nodeType": "ExpressionStatement", + "src": "7150:56:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6534, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7223:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6535, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "7229:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6533, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "7217:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7217:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6537, + "nodeType": "ExpressionStatement", + "src": "7217:23:38" + } + ] + }, + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "6196:454:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000)." + }, + "functionSelector": "4b144674", + "id": 6539, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6510, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "6849:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "6849:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6512, + "kind": "modifierInvocation", + "modifierName": { + "id": 6509, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "6836:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "6836:33:38" + } + ], + "name": "declareAndCastRelayed", + "nameLocation": "6664:21:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6508, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6827:8:38" + }, + "parameters": { + "id": 6507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6498, + "mutability": "mutable", + "name": "user", + "nameLocation": "6703:4:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6695:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6500, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "6725:9:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6717:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6499, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6717:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6503, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "6763:11:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6744:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6744:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6502, + "nodeType": "ArrayTypeName", + "src": "6744:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6506, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6803:10:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6784:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6784:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6505, + "nodeType": "ArrayTypeName", + "src": "6784:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6685:134:38" + }, + "returnParameters": { + "id": 6513, + "nodeType": "ParameterList", + "parameters": [], + "src": "6870:0:38" + }, + "scope": 6628, + "src": "6655:592:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6154 + ], + "body": { + "id": 6571, + "nodeType": "Block", + "src": "7776:310:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6553, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "7790:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7790:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7810:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "7790:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6561, + "nodeType": "IfStatement", + "src": "7786:78:38", + "trueBody": { + "id": 6560, + "nodeType": "Block", + "src": "7813:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6557, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "7834:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7834:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6559, + "nodeType": "RevertStatement", + "src": "7827:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6563, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8040:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6562, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "8013:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8013:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6565, + "nodeType": "ExpressionStatement", + "src": "8013:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6567, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8062:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "8068:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6566, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "8056:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8056:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6570, + "nodeType": "ExpressionStatement", + "src": "8056:23:38" + } + ] + }, + "documentation": { + "id": 6540, + "nodeType": "StructuredDocumentation", + "src": "7253:402:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000)." + }, + "functionSelector": "5a2b3fd7", + "id": 6572, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6549, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "7755:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "7755:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6551, + "kind": "modifierInvocation", + "modifierName": { + "id": 6548, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "7742:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "7742:33:38" + } + ], + "name": "castRelayed", + "nameLocation": "7669:11:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6547, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7733:8:38" + }, + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6542, + "mutability": "mutable", + "name": "user", + "nameLocation": "7689:4:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7681:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7681:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6545, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "7714:10:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7695:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6544, + "nodeType": "ArrayTypeName", + "src": "7695:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7680:45:38" + }, + "returnParameters": { + "id": 6552, + "nodeType": "ParameterList", + "parameters": [], + "src": "7776:0:38" + }, + "scope": 6628, + "src": "7660:426:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 5859 + ], + "body": { + "id": 6596, + "nodeType": "Block", + "src": "8426:135:38", + "statements": [ + { + "assignments": [ + 6582 + ], + "declarations": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8441:9:38", + "nodeType": "VariableDeclaration", + "scope": 6596, + "src": "8436:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6581, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8436:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6590, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6584, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8467:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6583, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "8453:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8453:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 6587, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8507:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6586, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "8475:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8475:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8453:59:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8436:76:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6593, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6582, + "src": "8544:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6591, + "name": "MathUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1708, + "src": "8530:8:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathUtil_$1708_$", + "typeString": "type(library MathUtil)" + } + }, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sqrt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1707, + "src": "8530:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8530:24:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6580, + "id": 6595, + "nodeType": "Return", + "src": "8523:31:38" + } + ] + }, + "documentation": { + "id": 6573, + "nodeType": "StructuredDocumentation", + "src": "8203:135:38", + "text": "@dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered" + }, + "id": 6597, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "8352:13:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6577, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8402:8:38" + }, + "parameters": { + "id": 6576, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6575, + "mutability": "mutable", + "name": "user", + "nameLocation": "8374:4:38", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8366:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8366:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "8365:14:38" + }, + "returnParameters": { + "id": 6580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8420:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6578, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8420:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8419:6:38" + }, + "scope": 6628, + "src": "8343:218:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 4104 + ], + "body": { + "id": 6626, + "nodeType": "Block", + "src": "8620:181:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6601, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "8630:5:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_ElectionModule_$6628_$", + "typeString": "type(contract super ElectionModule)" + } + }, + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_createNewEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 4104, + "src": "8630:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8630:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6605, + "nodeType": "ExpressionStatement", + "src": "8630:23:38" + }, + { + "assignments": [ + 6608 + ], + "declarations": [ + { + "constant": false, + "id": 6608, + "mutability": "mutable", + "name": "store", + "nameLocation": "8687:5:38", + "nodeType": "VariableDeclaration", + "scope": 6626, + "src": "8664:28:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6607, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6606, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6647, + "src": "8664:14:38" + }, + "referencedDeclaration": 6647, + "src": "8664:14:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6611, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6609, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "8695:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8695:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8664:48:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6612, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8723:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6639, + "src": "8723:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8723:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint128_$dyn_storage_ptr_$returns$_t_uint128_$bound_to$_t_array$_t_uint128_$dyn_storage_ptr_$", + "typeString": "function (uint128[] storage pointer) returns (uint128)" + } + }, + "id": 6617, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8723:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "8723:25:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6619, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8758:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6622, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6643, + "src": "8758:29:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8758:34:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$returns$_t_struct$_CrossChainDebtShareData_$6656_storage_$bound_to$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$", + "typeString": "function (struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage pointer) returns (struct DebtShareStorage.CrossChainDebtShareData storage ref)" + } + }, + "id": 6624, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8758:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6656_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "id": 6625, + "nodeType": "ExpressionStatement", + "src": "8758:36:38" + } + ] + }, + "id": 6627, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "8576:15:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6599, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8611:8:38" + }, + "parameters": { + "id": 6598, + "nodeType": "ParameterList", + "parameters": [], + "src": "8591:2:38" + }, + "returnParameters": { + "id": 6600, + "nodeType": "ParameterList", + "parameters": [], + "src": "8620:0:38" + }, + "scope": 6628, + "src": "8567:234:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6629, + "src": "1179:7624:38", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:8773:38" + } + }, + "contracts/Router.sol": { + "sourceCode": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n// GENERATED CODE - do not edit manually!!\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n\ncontract Router {\n error UnknownSelector(bytes4 sel);\n\n address private constant _ELECTION_INSPECTOR_MODULE = 0xd2Bfbe0EE9D7c553F00cfb44C2460be5A18438E3;\n address private constant _ELECTION_MODULE = 0xfde2c3Ff75aB29703A0dA554642b4Bc76d28B836;\n address private constant _OWNER_MODULE = 0x823005379687567B5590fcc701CE4a9DeC7b4e09;\n address private constant _UPGRADE_MODULE = 0x27169242Fce0D089bc2114c49338C2Fa90424Ddc;\n\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n // Lookup table: Function selector => implementation contract\n bytes4 sig4 = msg.sig;\n address implementation;\n\n assembly {\n let sig32 := shr(224, sig4)\n\n function findImplementation(sig) -> result {\n if lt(sig,0x85160425) {\n if lt(sig,0x447068ef) {\n if lt(sig,0x211de0b4) {\n if lt(sig,0x0ebf4796) {\n switch sig\n case 0x0166451a { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0x0438d06e { result := _ELECTION_MODULE } // ElectionModule.setMinimumActiveMembers()\n case 0x086146d2 { result := _ELECTION_MODULE } // ElectionModule.getCurrentPeriod()\n case 0x09eef43e { result := _ELECTION_MODULE } // ElectionModule.hasVoted()\n case 0x0a8b471a { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotCandidatesInEpoch()\n leave\n }\n switch sig\n case 0x0ebf4796 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareContract()\n case 0x0f98dfba { result := _ELECTION_MODULE } // ElectionModule.getDefaultBallotEvaluationBatchSize()\n case 0x1209644e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.hasVotedInEpoch()\n case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n case 0x205569c2 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.wasNominated()\n leave\n }\n if lt(sig,0x362c906d) {\n switch sig\n case 0x211de0b4 { result := _ELECTION_MODULE } // ElectionModule.setCrossDomainMessenger()\n case 0x2810e1d6 { result := _ELECTION_MODULE } // ElectionModule.resolve()\n case 0x2c3c5ba3 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotesInEpoch()\n case 0x33f3f3de { result := _ELECTION_MODULE } // ElectionModule.setCrossChainDebtShareMerkleRoot()\n case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n leave\n }\n switch sig\n case 0x362c906d { result := _ELECTION_MODULE } // ElectionModule.getEpochEndDate()\n case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n case 0x37143233 { result := _ELECTION_MODULE } // ElectionModule.evaluate()\n case 0x3a3e6c81 { result := _ELECTION_MODULE } // ElectionModule.isNominated()\n case 0x3ac1c5fe { result := _ELECTION_MODULE } // ElectionModule.setMaxDateAdjustmentTolerance()\n leave\n }\n if lt(sig,0x655aaaca) {\n if lt(sig,0x54520478) {\n switch sig\n case 0x447068ef { result := _ELECTION_MODULE } // ElectionModule.getNextEpochSeatCount()\n case 0x49aed35c { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotedAtEpoch()\n case 0x4b144674 { result := _ELECTION_MODULE } // ElectionModule.declareAndCastRelayed()\n case 0x4b5dacac { result := _ELECTION_MODULE } // ElectionModule.setNextEpochSeatCount()\n case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n leave\n }\n switch sig\n case 0x54520478 { result := _ELECTION_MODULE } // ElectionModule.upgradeCouncilToken()\n case 0x5a2b3fd7 { result := _ELECTION_MODULE } // ElectionModule.castRelayed()\n case 0x606a6b76 { result := _ELECTION_MODULE } // ElectionModule.getCouncilMembers()\n case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n case 0x64deab73 { result := _ELECTION_MODULE } // ElectionModule.setDefaultBallotEvaluationBatchSize()\n leave\n }\n if lt(sig,0x79ba5097) {\n switch sig\n case 0x655aaaca { result := _ELECTION_MODULE } // ElectionModule.getBallotCandidates()\n case 0x714d8d0e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochStartDateForIndex()\n case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n case 0x793b9a9d { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getCandidateVotesInEpoch()\n case 0x796c5c80 { result := _ELECTION_MODULE } // ElectionModule.getDeclaredCrossChainDebtShare()\n leave\n }\n switch sig\n case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n case 0x7a3bc0ee { result := _ELECTION_MODULE } // ElectionModule.getBallotVotes()\n case 0x7d264ccb { result := _ELECTION_MODULE } // ElectionModule.declareCrossChainDebtShare()\n case 0x82e28473 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getVotingPeriodStartDateForIndex()\n case 0x84ae670c { result := _ELECTION_MODULE } // ElectionModule.cast()\n leave\n }\n if lt(sig,0xca80a2ed) {\n if lt(sig,0xaaf10f42) {\n if lt(sig,0x9636f67c) {\n switch sig\n case 0x85160425 { result := _ELECTION_MODULE } // ElectionModule.getMinimumActiveMembers()\n case 0x8625c053 { result := _ELECTION_MODULE } // ElectionModule.getMinEpochDurations()\n case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n case 0x8f701997 { result := _ELECTION_MODULE } // ElectionModule.tweakEpochSchedule()\n case 0x95ff6584 { result := _ELECTION_MODULE } // ElectionModule.getBallotVoted()\n leave\n }\n switch sig\n case 0x9636f67c { result := _ELECTION_MODULE } // ElectionModule.getNominees()\n case 0x9a25eaf3 { result := _ELECTION_MODULE } // ElectionModule.dismissMembers()\n case 0x9a9a8e1a { result := _ELECTION_MODULE } // ElectionModule.declareAndCast()\n case 0xa0f42837 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareSnapshotId()\n case 0xa25a9f3a { result := _ELECTION_MODULE } // ElectionModule.setMinEpochDurations()\n leave\n }\n if lt(sig,0xbb9c0920) {\n switch sig\n case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n case 0xaeff252a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareContract()\n case 0xb55c43d2 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRoot()\n case 0xb749be55 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNominationPeriodStartDateForIndex()\n case 0xba9a5b25 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochEndDateForIndex()\n leave\n }\n switch sig\n case 0xbb9c0920 { result := _ELECTION_MODULE } // ElectionModule.getVotePower()\n case 0xc07de0d3 { result := _ELECTION_MODULE } // ElectionModule.getCouncilToken()\n case 0xc14d0528 { result := _ELECTION_MODULE } // ElectionModule.modifyEpochSchedule()\n case 0xc5798523 { result := _ELECTION_MODULE } // ElectionModule.isElectionModuleInitialized()\n case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n leave\n }\n if lt(sig,0xe420d7f9) {\n if lt(sig,0xd83eb231) {\n switch sig\n case 0xca80a2ed { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNomineesAtEpoch()\n case 0xcce32c52 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getElectionWinnersInEpoch()\n case 0xce04e44c { result := _ELECTION_MODULE } // ElectionModule.getEpochStartDate()\n case 0xd11801cf { result := _ELECTION_MODULE } // ElectionModule.withdrawNomination()\n case 0xd82f25f0 { result := _ELECTION_MODULE } // ElectionModule.getCandidateVotes()\n leave\n }\n switch sig\n case 0xd83eb231 { result := _ELECTION_MODULE } // ElectionModule.withdrawVote()\n case 0xd9617851 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRootBlockNumber()\n case 0xdfe7cd3a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareSnapshotId()\n case 0xe1509015 { result := _ELECTION_MODULE } // ElectionModule.getVotingPeriodStartDate()\n case 0xe327b585 { result := _ELECTION_MODULE } // ElectionModule.isElectionEvaluated()\n leave\n }\n switch sig\n case 0xe420d7f9 { result := _ELECTION_MODULE } // ElectionModule.getNominationPeriodStartDate()\n case 0xe9544a51 { result := _ELECTION_MODULE } // ElectionModule.getMaxDateAdjustmentTolerance()\n case 0xedc968ba { result := _ELECTION_MODULE } // ElectionModule.calculateBallotId()\n case 0xee695137 { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0xf2516dbf { result := _ELECTION_MODULE } // ElectionModule.getElectionWinners()\n case 0xf2e56dea { result := _ELECTION_MODULE } // ElectionModule.getDebtShare()\n case 0xf675fa62 { result := _ELECTION_MODULE } // ElectionModule.getCrossDomainMessenger()\n case 0xfcd7e1d7 { result := _ELECTION_MODULE } // ElectionModule.nominate()\n case 0xffe7f643 { result := _ELECTION_MODULE } // ElectionModule.getEpochIndex()\n leave\n }\n\n implementation := findImplementation(sig32)\n }\n\n if (implementation == address(0)) {\n revert UnknownSelector(sig4);\n }\n\n // Delegatecall to the implementation contract\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "contracts/Router.sol", + "exportedSymbols": { + "Router": [ + 58 + ] + }, + "id": 59, + "license": "Unlicense", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "37:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Router", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 58, + "linearizedBaseContracts": [ + 58 + ], + "name": "Router", + "nameLocation": "451:6:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "UnknownSelector", + "nameLocation": "470:15:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "sel", + "nameLocation": "493:3:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "486:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "486:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "485:12:0" + }, + "src": "464:34:0" + }, + { + "constant": true, + "id": 8, + "mutability": "constant", + "name": "_ELECTION_INSPECTOR_MODULE", + "nameLocation": "529:26:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "504:96:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "504:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307864324266626530454539443763353533463030636662343443323436306265354131383433384533", + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xd2Bfbe0EE9D7c553F00cfb44C2460be5A18438E3" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 11, + "mutability": "constant", + "name": "_ELECTION_MODULE", + "nameLocation": "631:16:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "606:86:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "606:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307866646532633346663735614232393730334130644135353436343262344263373664323842383336", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "650:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xfde2c3Ff75aB29703A0dA554642b4Bc76d28B836" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 14, + "mutability": "constant", + "name": "_OWNER_MODULE", + "nameLocation": "723:13:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "698:83:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "698:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307838323330303533373936383735363742353539306663633730314345346139446543376234653039", + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "739:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x823005379687567B5590fcc701CE4a9DeC7b4e09" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 17, + "mutability": "constant", + "name": "_UPGRADE_MODULE", + "nameLocation": "812:15:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "787:85:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "787:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307832373136393234324663653044303839626332313134633439333338433246613930343234446463", + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x27169242Fce0D089bc2114c49338C2Fa90424Ddc" + }, + "visibility": "private" + }, + { + "body": { + "id": 23, + "nodeType": "Block", + "src": "907:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 20, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "917:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "917:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22, + "nodeType": "ExpressionStatement", + "src": "917:10:0" + } + ] + }, + "id": 24, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "887:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:0:0" + }, + "scope": 58, + "src": "879:55:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 30, + "nodeType": "Block", + "src": "967:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "977:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "977:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 29, + "nodeType": "ExpressionStatement", + "src": "977:10:0" + } + ] + }, + "id": 31, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 25, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:2:0" + }, + "returnParameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:0" + }, + "scope": 58, + "src": "940:54:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 56, + "nodeType": "Block", + "src": "1029:11808:0", + "statements": [ + { + "assignments": [ + 35 + ], + "declarations": [ + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "sig4", + "nameLocation": "1116:4:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1109:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 34, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1109:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 38, + "initialValue": { + "expression": { + "id": 36, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1123:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "1123:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1109:21:0" + }, + { + "assignments": [ + 40 + ], + "declarations": [ + { + "constant": false, + "id": 40, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1148:14:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1140:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1140:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 41, + "nodeType": "VariableDeclarationStatement", + "src": "1140:22:0" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1182:11095:0", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1196:27:0", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1213:3:0", + "type": "", + "value": "224" + }, + { + "name": "sig4", + "nodeType": "YulIdentifier", + "src": "1218:4:0" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1209:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "1209:14:0" + }, + "variables": [ + { + "name": "sig32", + "nodeType": "YulTypedName", + "src": "1200:5:0", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1280:10930:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1320:5729:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1364:2901:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1412:1489:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1464:728:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1557:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1559:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1569:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1559:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1541:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1546:10:0", + "type": "", + "value": "0x0166451a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1681:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1683:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1693:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1683:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1665:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1670:10:0", + "type": "", + "value": "0x0438d06e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1804:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1806:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1816:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1806:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1788:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1793:10:0", + "type": "", + "value": "0x086146d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1920:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1922:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1932:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1922:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1904:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1909:10:0", + "type": "", + "value": "0x09eef43e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2028:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2030:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2040:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2030:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2012:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2017:10:0", + "type": "", + "value": "0x0a8b471a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1505:3:0" + }, + "nodeType": "YulSwitch", + "src": "1498:570:0" + }, + { + "nodeType": "YulLeave", + "src": "2157:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1448:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1452:10:0", + "type": "", + "value": "0x0ebf4796" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1445:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1445:18:0" + }, + "nodeType": "YulIf", + "src": "1442:750:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2276:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2278:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2288:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2278:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2260:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2265:10:0", + "type": "", + "value": "0x0ebf4796" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2392:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2394:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2404:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2394:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2376:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2381:10:0", + "type": "", + "value": "0x0f98dfba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2523:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2525:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2535:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2525:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2507:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2512:10:0", + "type": "", + "value": "0x1209644e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2653:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2655:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "2665:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2655:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2637:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2642:10:0", + "type": "", + "value": "0x1627540c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2759:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2761:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2771:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2761:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2743:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2748:10:0", + "type": "", + "value": "0x205569c2" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2228:3:0" + }, + "nodeType": "YulSwitch", + "src": "2221:578:0" + }, + { + "nodeType": "YulLeave", + "src": "2870:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1396:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1400:10:0", + "type": "", + "value": "0x211de0b4" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1393:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1393:18:0" + }, + "nodeType": "YulIf", + "src": "1390:1511:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2948:700:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3033:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3035:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3045:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3035:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3017:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3022:10:0", + "type": "", + "value": "0x211de0b4" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3152:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3154:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3164:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3154:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3136:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3141:10:0", + "type": "", + "value": "0x2810e1d6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3255:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3257:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "3267:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3257:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3239:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3244:10:0", + "type": "", + "value": "0x2c3c5ba3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3380:10:0", + "type": "", + "value": "0x33f3f3de" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3519:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3521:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "3531:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3521:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3503:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3508:10:0", + "type": "", + "value": "0x35eb2824" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2985:3:0" + }, + "nodeType": "YulSwitch", + "src": "2978:568:0" + }, + { + "nodeType": "YulLeave", + "src": "3617:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2932:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2936:10:0", + "type": "", + "value": "0x362c906d" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2929:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "2929:18:0" + }, + "nodeType": "YulIf", + "src": "2926:722:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3724:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3726:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3736:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3726:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3708:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3713:10:0", + "type": "", + "value": "0x362c906d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3831:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3833:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "3843:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3833:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3815:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3820:10:0", + "type": "", + "value": "0x3659cfe6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3930:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3932:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3942:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3932:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3914:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3919:10:0", + "type": "", + "value": "0x37143233" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4030:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4032:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4042:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4032:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4014:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4019:10:0", + "type": "", + "value": "0x3a3e6c81" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4133:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4135:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4145:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4135:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4117:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4122:10:0", + "type": "", + "value": "0x3ac1c5fe" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "3680:3:0" + }, + "nodeType": "YulSwitch", + "src": "3673:490:0" + }, + { + "nodeType": "YulLeave", + "src": "4238:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1348:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1352:10:0", + "type": "", + "value": "0x447068ef" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1345:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1345:18:0" + }, + "nodeType": "YulIf", + "src": "1342:2923:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4308:1383:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4356:691:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4441:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4443:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4453:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4443:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4425:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4430:10:0", + "type": "", + "value": "0x447068ef" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4558:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4560:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "4570:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4560:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4542:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4547:10:0", + "type": "", + "value": "0x49aed35c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4694:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4696:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4706:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4696:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4678:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4683:10:0", + "type": "", + "value": "0x4b144674" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4800:10:0", + "type": "", + "value": "0x4b5dacac" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4928:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4930:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "4940:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4930:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4912:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4917:10:0", + "type": "", + "value": "0x53a47bb7" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4393:3:0" + }, + "nodeType": "YulSwitch", + "src": "4386:569:0" + }, + { + "nodeType": "YulLeave", + "src": "5016:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4340:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4344:10:0", + "type": "", + "value": "0x54520478" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4337:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4337:18:0" + }, + "nodeType": "YulIf", + "src": "4334:713:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5123:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5125:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5135:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5125:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5107:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5112:10:0", + "type": "", + "value": "0x54520478" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5234:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5236:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5246:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5236:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5218:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5223:10:0", + "type": "", + "value": "0x5a2b3fd7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5337:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5339:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5349:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5339:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5321:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5326:10:0", + "type": "", + "value": "0x606a6b76" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5446:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5448:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "5458:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5448:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5430:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5435:10:0", + "type": "", + "value": "0x624bd96d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5553:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5555:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5565:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5555:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5537:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5542:10:0", + "type": "", + "value": "0x64deab73" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5079:3:0" + }, + "nodeType": "YulSwitch", + "src": "5072:511:0" + }, + { + "nodeType": "YulLeave", + "src": "5664:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4292:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4296:10:0", + "type": "", + "value": "0x655aaaca" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4289:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4289:18:0" + }, + "nodeType": "YulIf", + "src": "4286:1405:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5734:696:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5800:10:0", + "type": "", + "value": "0x655aaaca" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5922:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5924:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "5934:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5924:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5906:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5911:10:0", + "type": "", + "value": "0x714d8d0e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6058:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6060:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6070:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6060:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6042:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6047:10:0", + "type": "", + "value": "0x718fe928" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6162:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6164:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6174:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6164:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6146:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6151:10:0", + "type": "", + "value": "0x793b9a9d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6297:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6299:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6309:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6299:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6281:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6286:10:0", + "type": "", + "value": "0x796c5c80" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5767:3:0" + }, + "nodeType": "YulSwitch", + "src": "5760:567:0" + }, + { + "nodeType": "YulLeave", + "src": "6403:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5718:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5722:10:0", + "type": "", + "value": "0x79ba5097" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "5715:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "5715:18:0" + }, + "nodeType": "YulIf", + "src": "5712:718:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "6498:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6500:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6510:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6500:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6482:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6487:10:0", + "type": "", + "value": "0x79ba5097" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6584:10:0", + "type": "", + "value": "0x7a3bc0ee" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6697:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6699:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6709:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6699:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6681:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6686:10:0", + "type": "", + "value": "0x7d264ccb" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6811:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6813:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6823:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6795:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6800:10:0", + "type": "", + "value": "0x82e28473" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6950:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6952:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6962:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6952:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6934:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6939:10:0", + "type": "", + "value": "0x84ae670c" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "6458:3:0" + }, + "nodeType": "YulSwitch", + "src": "6451:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7026:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1304:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1308:10:0", + "type": "", + "value": "0x85160425" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1301:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1301:18:0" + }, + "nodeType": "YulIf", + "src": "1298:5751:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7088:2732:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7132:1330:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7180:654:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7265:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7267:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7277:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7267:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7249:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7254:10:0", + "type": "", + "value": "0x85160425" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7384:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7386:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7396:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7386:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7368:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7373:10:0", + "type": "", + "value": "0x8625c053" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7500:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7502:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "7512:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7502:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7484:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7489:10:0", + "type": "", + "value": "0x8da5cb5b" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7584:10:0", + "type": "", + "value": "0x8f701997" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7709:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7711:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7721:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7711:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7693:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7698:10:0", + "type": "", + "value": "0x95ff6584" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7217:3:0" + }, + "nodeType": "YulSwitch", + "src": "7210:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7803:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7164:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7168:10:0", + "type": "", + "value": "0x9636f67c" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7161:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7161:18:0" + }, + "nodeType": "YulIf", + "src": "7158:676:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7910:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7912:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7922:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7912:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7894:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7899:10:0", + "type": "", + "value": "0x9636f67c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8013:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8015:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8025:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8015:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7997:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8002:10:0", + "type": "", + "value": "0x9a25eaf3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8119:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8121:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8131:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8121:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8103:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8108:10:0", + "type": "", + "value": "0x9a9a8e1a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8225:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8227:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8237:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8227:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8209:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8214:10:0", + "type": "", + "value": "0xa0f42837" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8339:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8341:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8351:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8341:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8323:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8328:10:0", + "type": "", + "value": "0xa25a9f3a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7866:3:0" + }, + "nodeType": "YulSwitch", + "src": "7859:510:0" + }, + { + "nodeType": "YulLeave", + "src": "8435:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7116:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7120:10:0", + "type": "", + "value": "0xaaf10f42" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7113:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7113:18:0" + }, + "nodeType": "YulIf", + "src": "7110:1352:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8505:712:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "8582:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8584:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "8594:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8584:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8566:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8571:10:0", + "type": "", + "value": "0xaaf10f42" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8689:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8691:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8701:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8691:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8673:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8678:10:0", + "type": "", + "value": "0xaeff252a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8801:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8803:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8813:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8803:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8785:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8790:10:0", + "type": "", + "value": "0xb55c43d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8925:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8927:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "8937:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8927:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8909:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8914:10:0", + "type": "", + "value": "0xb749be55" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9072:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9074:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9084:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9074:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9056:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9061:10:0", + "type": "", + "value": "0xba9a5b25" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8538:3:0" + }, + "nodeType": "YulSwitch", + "src": "8531:581:0" + }, + { + "nodeType": "YulLeave", + "src": "9190:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8489:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8493:10:0", + "type": "", + "value": "0xbb9c0920" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8486:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "8486:18:0" + }, + "nodeType": "YulIf", + "src": "8483:734:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9285:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9287:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9297:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9287:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9269:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9274:10:0", + "type": "", + "value": "0xbb9c0920" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9385:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9387:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9397:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9387:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9369:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9374:10:0", + "type": "", + "value": "0xc07de0d3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9488:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9490:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9500:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9490:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9472:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9477:10:0", + "type": "", + "value": "0xc14d0528" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9584:10:0", + "type": "", + "value": "0xc5798523" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9710:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9712:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "9722:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9712:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9694:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9699:10:0", + "type": "", + "value": "0xc7f62cda" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9245:3:0" + }, + "nodeType": "YulSwitch", + "src": "9238:501:0" + }, + { + "nodeType": "YulLeave", + "src": "9797:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7072:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7076:10:0", + "type": "", + "value": "0xca80a2ed" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7069:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7069:18:0" + }, + "nodeType": "YulIf", + "src": "7066:2754:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9859:1360:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9903:681:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9980:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9982:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9992:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9982:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9964:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9969:10:0", + "type": "", + "value": "0xca80a2ed" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10109:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10111:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "10121:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10111:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10093:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10098:10:0", + "type": "", + "value": "0xcce32c52" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10245:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10247:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10257:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10247:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10229:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10234:10:0", + "type": "", + "value": "0xce04e44c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10354:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10356:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10366:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10356:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10338:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10343:10:0", + "type": "", + "value": "0xd11801cf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10464:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10466:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10476:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10466:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10448:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10453:10:0", + "type": "", + "value": "0xd82f25f0" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9936:3:0" + }, + "nodeType": "YulSwitch", + "src": "9929:565:0" + }, + { + "nodeType": "YulLeave", + "src": "10557:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9887:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9891:10:0", + "type": "", + "value": "0xd83eb231" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9884:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9884:18:0" + }, + "nodeType": "YulIf", + "src": "9881:703:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "10652:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10654:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10664:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10654:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10636:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10641:10:0", + "type": "", + "value": "0xd83eb231" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10752:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10754:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10764:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10754:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10736:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10741:10:0", + "type": "", + "value": "0xd9617851" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10883:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10885:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10895:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10885:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10867:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10872:10:0", + "type": "", + "value": "0xdfe7cd3a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10993:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10995:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11005:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10995:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10977:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10982:10:0", + "type": "", + "value": "0xe1509015" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11105:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11107:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11117:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11107:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11089:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11094:10:0", + "type": "", + "value": "0xe327b585" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "10612:3:0" + }, + "nodeType": "YulSwitch", + "src": "10605:530:0" + }, + { + "nodeType": "YulLeave", + "src": "11196:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9843:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9847:10:0", + "type": "", + "value": "0xe420d7f9" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9840:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9840:18:0" + }, + "nodeType": "YulIf", + "src": "9837:1382:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "11279:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11281:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11291:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11281:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11263:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11268:10:0", + "type": "", + "value": "0xe420d7f9" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11380:10:0", + "type": "", + "value": "0xe9544a51" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11504:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11506:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11516:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11506:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11488:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11493:10:0", + "type": "", + "value": "0xedc968ba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11605:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11607:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11617:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11607:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11589:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11594:10:0", + "type": "", + "value": "0xee695137" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11713:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11715:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11725:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11715:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11697:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11702:10:0", + "type": "", + "value": "0xf2516dbf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11815:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11817:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11827:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11817:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11799:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11804:10:0", + "type": "", + "value": "0xf2e56dea" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11911:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11913:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11923:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11913:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11895:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11900:10:0", + "type": "", + "value": "0xf675fa62" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12018:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12020:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12030:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12020:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12002:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12007:10:0", + "type": "", + "value": "0xfcd7e1d7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12110:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12112:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12122:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12112:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12094:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12099:10:0", + "type": "", + "value": "0xffe7f643" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "11243:3:0" + }, + "nodeType": "YulSwitch", + "src": "11236:904:0" + }, + { + "nodeType": "YulLeave", + "src": "12191:5:0" + } + ] + }, + "name": "findImplementation", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "sig", + "nodeType": "YulTypedName", + "src": "1265:3:0", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "1273:6:0", + "type": "" + } + ], + "src": "1237:10973:0" + }, + { + "nodeType": "YulAssignment", + "src": "12224:43:0", + "value": { + "arguments": [ + { + "name": "sig32", + "nodeType": "YulIdentifier", + "src": "12261:5:0" + } + ], + "functionName": { + "name": "findImplementation", + "nodeType": "YulIdentifier", + "src": "12242:18:0" + }, + "nodeType": "YulFunctionCall", + "src": "12242:25:0" + }, + "variableNames": [ + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12224:14:0" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "10121:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2040:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2535:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2771:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "3267:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "4570:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "5934:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6174:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6823:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "8937:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9084:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9992:26:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10257:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10366:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10476:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10664:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10764:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10895:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11005:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11117:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11291:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11516:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11617:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11725:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11827:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11923:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12030:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12122:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1569:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1693:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1816:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1932:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2288:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2404:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3045:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3164:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3736:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3942:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4042:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4145:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4453:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4706:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5135:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5246:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5349:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5565:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6309:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6709:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6962:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7277:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7396:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7721:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7922:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8025:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8131:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8237:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8351:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8701:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8813:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9297:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9397:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9500:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9607:16:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "2665:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "3531:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "4940:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "5458:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6070:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6510:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "7512:13:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "3843:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "8594:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "9722:15:0", + "valueSize": 1 + }, + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12224:14:0", + "valueSize": 1 + }, + { + "declaration": 35, + "isOffset": false, + "isSlot": false, + "src": "1218:4:0", + "valueSize": 1 + } + ], + "id": 42, + "nodeType": "InlineAssembly", + "src": "1173:11104:0" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 43, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "12291:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12317:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 44, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12309:7:0", + "typeDescriptions": {} + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12309:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12291:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 54, + "nodeType": "IfStatement", + "src": "12287:87:0", + "trueBody": { + "id": 53, + "nodeType": "Block", + "src": "12321:53:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 50, + "name": "sig4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12358:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 49, + "name": "UnknownSelector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "12342:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_bytes4_$returns$__$", + "typeString": "function (bytes4) pure" + } + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12342:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 52, + "nodeType": "RevertStatement", + "src": "12335:28:0" + } + ] + } + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "12448:383:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12475:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12478:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12481:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12481:14:0" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "12462:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12462:34:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12462:34:0" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "12510:74:0", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "12537:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "12537:5:0" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12544:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12560:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12563:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12563:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12579:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12582:1:0", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "12524:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12524:60:0" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "12514:6:0", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12612:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12615:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12618:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12618:16:0" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "12597:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12597:38:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12597:38:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "12682:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12707:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12710:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12710:16:0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "12700:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12700:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12700:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12675:66:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12680:1:0", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12762:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12787:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12790:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12790:16:0" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "12780:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12780:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12780:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12754:67:0", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12656:6:0" + }, + "nodeType": "YulSwitch", + "src": "12649:172:0" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12544:14:0", + "valueSize": 1 + } + ], + "id": 55, + "nodeType": "InlineAssembly", + "src": "12439:392:0" + } + ] + }, + "id": 57, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "1009:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1017:2:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [], + "src": "1029:0:0" + }, + "scope": 58, + "src": "1000:11837:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 59, + "src": "442:12397:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "37:12803:0" + } + } +} \ No newline at end of file diff --git a/packages/treasury-council/deployments/optimistic-mainnet/official/2023-12-18-00.json b/packages/treasury-council/deployments/optimistic-mainnet/official/2023-12-18-00.json new file mode 100644 index 0000000000..6ca116299e --- /dev/null +++ b/packages/treasury-council/deployments/optimistic-mainnet/official/2023-12-18-00.json @@ -0,0 +1,90 @@ +{ + "properties": { + "completed": true, + "totalGasUsed": "5581218" + }, + "transactions": { + "0x28dcb86ead1e3f502a3b01f8e1ff33f9f1edc8b808388a3d4c121f2c48fb43a9": { + "status": "confirmed", + "block": 113670800, + "description": "Deployment of contracts/modules/ElectionModule.sol:ElectionModule" + }, + "0xfcf5c4bb547ca9bf252107dedc9ced51c270beb5cbb228735339eac8155f1a7c": { + "status": "confirmed", + "block": 113670807, + "description": "Deployment of contracts/Router.sol:Router" + } + }, + "contracts": { + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": { + "deployedAddress": "0x79f1d073a1493D112f07743c784dE81cb56147d5", + "deployTransaction": "0x65c47eb7138a4ccaebe7b7e5c115e99cd8e720232c007f763904700f536657e3", + "isModule": true, + "deployedBytecodeHash": "0x1480c7a338366f52aa5d5edb9181e25dc7eefbdb1e7ab7447580d325fe9c7fc8", + "contractFullyQualifiedName": "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule", + "contractName": "ElectionInspectorModule", + "sourceName": "contracts/modules/ElectionInspectionModule.sol", + "deploymentBlock": 90348912, + "deploymentCommit": "04fea879760768de665ce4962aa381d67d6024b6", + "proxyAddress": "0x6cC6050bE3214D14DB46188e5df59bDEAE97a42a" + }, + "contracts/modules/ElectionModule.sol:ElectionModule": { + "deployedAddress": "0xCc62313D5c88a07faBb4Bb50631FB13f8bF9f393", + "deployTransaction": "0x28dcb86ead1e3f502a3b01f8e1ff33f9f1edc8b808388a3d4c121f2c48fb43a9", + "isModule": true, + "deployedBytecodeHash": "0xc251a068f6a689f4f4cd4a8bb39d8dac586672880827ad39f45f1b7dc9be1f08", + "contractFullyQualifiedName": "contracts/modules/ElectionModule.sol:ElectionModule", + "contractName": "ElectionModule", + "sourceName": "contracts/modules/ElectionModule.sol", + "deploymentBlock": 113670800, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67", + "proxyAddress": "0x6cC6050bE3214D14DB46188e5df59bDEAE97a42a" + }, + "contracts/modules/OwnerModule.sol:OwnerModule": { + "deployedAddress": "0x4D7a0980DB5Cb48413DC96f784792dB4b1Fa68E1", + "deployTransaction": "0xebf5fd4b230f37fe6584fe45f1801497d20c6e89e28dae080ab5700452921008", + "isModule": true, + "deployedBytecodeHash": "0xfa5f32d34a9b72a207fe290a3bf7e6b506da8df11503cbd781d4a0e85e99fa75", + "contractFullyQualifiedName": "contracts/modules/OwnerModule.sol:OwnerModule", + "contractName": "OwnerModule", + "sourceName": "contracts/modules/OwnerModule.sol", + "deploymentBlock": 9313773, + "deploymentCommit": "139657ef1734812391701efe7d212eace3a716b3", + "proxyAddress": "0x6cC6050bE3214D14DB46188e5df59bDEAE97a42a" + }, + "contracts/modules/UpgradeModule.sol:UpgradeModule": { + "deployedAddress": "0x8A5609A110181839599064Bf6bE25ddF4cB73356", + "deployTransaction": "0xb4a8966da412e33f90d4a2239c03e2f32de27bb027e5c142696b01bee7b8b3ce", + "isModule": true, + "deployedBytecodeHash": "0xb0900efdf426a3b3737cd397b332e658d9cc4155b64d64965a40b3324676d56b", + "contractFullyQualifiedName": "contracts/modules/UpgradeModule.sol:UpgradeModule", + "contractName": "UpgradeModule", + "sourceName": "contracts/modules/UpgradeModule.sol", + "deploymentBlock": 9313784, + "deploymentCommit": "139657ef1734812391701efe7d212eace3a716b3", + "proxyAddress": "0x6cC6050bE3214D14DB46188e5df59bDEAE97a42a" + }, + "contracts/TreasuryCouncil.sol:TreasuryCouncil": { + "deployedAddress": "0x6cC6050bE3214D14DB46188e5df59bDEAE97a42a", + "deployTransaction": "0xd59004f60f9438bc17abf18f68a7c08bb6723ab981dba499a66ed72d1f580a11", + "isProxy": true, + "deployedBytecodeHash": "0x93bb22ab54934f030ea126284da778abb5ba38fbc0c3008cd0ae7a0c7c336b64", + "contractFullyQualifiedName": "contracts/TreasuryCouncil.sol:TreasuryCouncil", + "contractName": "TreasuryCouncil", + "sourceName": "contracts/TreasuryCouncil.sol", + "deploymentBlock": 9313801, + "deploymentCommit": "139657ef1734812391701efe7d212eace3a716b3" + }, + "contracts/Router.sol:Router": { + "deployedAddress": "0x7E817D96c1B5324259d5aAfb403E0637b0AC9299", + "deployTransaction": "0xfcf5c4bb547ca9bf252107dedc9ced51c270beb5cbb228735339eac8155f1a7c", + "isRouter": true, + "deployedBytecodeHash": "0x2150722dbba6ad7459e7c4ff7fc7dc169e5376d5b07823f3c417d2de43a3cc17", + "contractFullyQualifiedName": "contracts/Router.sol:Router", + "contractName": "Router", + "sourceName": "contracts/Router.sol", + "deploymentBlock": 113670808, + "deploymentCommit": "1c00ac9f64881cc76bd3fc53514da1ae4c7e3c67" + } + } +} \ No newline at end of file diff --git a/packages/treasury-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json b/packages/treasury-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json new file mode 100644 index 0000000000..34893bb2a0 --- /dev/null +++ b/packages/treasury-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.abis.json @@ -0,0 +1,13492 @@ +{ + "@synthetixio/core-contracts/contracts/errors/AccessError.sol:AccessError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/AddressError.sol:AddressError": [ + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol:ArrayError": [ + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol:ChangeError": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/errors/InitError.sol:InitError": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol:InitializableMixin": [], + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol:IERC165": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol:IERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol:IERC721Metadata": [ + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol:IERC721Receiver": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol:IOwnable": [ + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol:IUUPSImplementation": [ + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol:Ownable": [ + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol:OwnableMixin": [], + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol:OwnableStorage": [], + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol:AbstractProxy": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol:ProxyStorage": [], + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol:UUPSImplementation": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol:UUPSProxy": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721.sol:ERC721": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol:ERC721Storage": [], + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol:AddressUtil": [], + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol:MathUtil": [], + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol:MerkleProof": [], + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol:SetUtil": [ + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + } + ], + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol:StringUtil": [], + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol:IElectionInspectorModule": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol:IElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol:IOwnerModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol:ElectionStorage": [], + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol:ElectionBase": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol:ElectionCredentials": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol:ElectionSchedule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol:ElectionTally": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol:ElectionVotes": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol:CouncilToken": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "CannotSelfApprove", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InvalidTransferRecipient", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenAlreadyMinted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "TokenDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "TokenIsNotTransferable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "tokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol:ICrossDomainMessenger": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "gasLimit", + "type": "uint32" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol:IDebtShare": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "periodId", + "type": "uint256" + } + ], + "name": "balanceOfOnPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol:ISynthetixElectionModule": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "members", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newDebtShareContractAddress", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/mocks/DebtShareMock.sol:DebtShareMock": [ + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "periodId", + "type": "uint256" + } + ], + "name": "balanceOfOnPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "periodId", + "type": "uint256" + } + ], + "name": "setBalanceOfOnPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol:DebtShareStorage": [], + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol:CrossChainDebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol:DebtShareManager": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + } + ], + "contracts/TreasuryCouncil.sol:TreasuryCouncil": [ + { + "inputs": [ + { + "internalType": "address", + "name": "firstImplementation", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "contracts/modules/ElectionInspectionModule.sol:ElectionInspectorModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotCandidatesInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotedAtEpoch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getBallotVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getCandidateVotesInEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getElectionWinnersInEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochEndDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getEpochStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNominationPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getNomineesAtEpoch", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "getVotingPeriodStartDateForIndex", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "hasVotedInEpoch", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "wasNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "contracts/modules/OwnerModule.sol:OwnerModule": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerNominated", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "initializeOwnerModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isOwnerModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newNominatedOwner", + "type": "address" + } + ], + "name": "nominateNewOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominatedOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/UpgradeModule.sol:UpgradeModule": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationIsSterile", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "UpgradeSimulationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "simulateUpgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/modules/ElectionModule.sol:ElectionModule": [ + { + "inputs": [], + "name": "AlreadyACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyNominated", + "type": "error" + }, + { + "inputs": [], + "name": "ChangesCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "CrossChainDebtShareAlreadyDeclared", + "type": "error" + }, + { + "inputs": [], + "name": "CrossDomainMessengerNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareContractNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DebtShareSnapshotIdNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicateCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionAlreadyEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "ElectionNotEvaluated", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyArray", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidElectionSettings", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEpochConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMerkleProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinimumActiveMembers", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleRootNotSet", + "type": "error" + }, + { + "inputs": [], + "name": "NoCandidates", + "type": "error" + }, + { + "inputs": [], + "name": "NoChange", + "type": "error" + }, + { + "inputs": [], + "name": "NoVotePower", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contr", + "type": "address" + } + ], + "name": "NotAContract", + "type": "error" + }, + { + "inputs": [], + "name": "NotACouncilMember", + "type": "error" + }, + { + "inputs": [], + "name": "NotCallableInCurrentPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "NotNominated", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainMessengerCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyCrossDomainUserCanInvoke", + "type": "error" + }, + { + "inputs": [], + "name": "PositionOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyCandidates", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ValueAlreadyInSet", + "type": "error" + }, + { + "inputs": [], + "name": "ValueNotInSet", + "type": "error" + }, + { + "inputs": [], + "name": "VoteNotCasted", + "type": "error" + }, + { + "inputs": [], + "name": "WrongInitializer", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CandidateNominated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMemberRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "members", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "CouncilMembersDismissed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "proxy", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "CouncilTokenCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "CouncilTokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareDeclared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "name": "CrossChainDebtShareMerkleRootSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "CrossDomainMessengerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "DebtShareContractSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "DebtShareSnapshotIdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "DefaultBallotEvaluationBatchSizeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "evaluatedBallots", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionBatchEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBallots", + "type": "uint256" + } + ], + "name": "ElectionEvaluated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ElectionModuleInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EmergencyElectionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + } + ], + "name": "EpochScheduleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "EpochStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "tolerance", + "type": "uint64" + } + ], + "name": "MaxDateAdjustmentToleranceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + } + ], + "name": "MinimumActiveMembersChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "name": "MinimumEpochDurationsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "seatCount", + "type": "uint8" + } + ], + "name": "NextEpochSeatCountChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "candidate", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + } + ], + "name": "NominationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "epochIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "votePower", + "type": "uint256" + } + ], + "name": "VoteWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "calculateBallotId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "cast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "castRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCast", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "address[]", + "name": "candidates", + "type": "address[]" + } + ], + "name": "declareAndCastRelayed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "debtShare", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "merkleProof", + "type": "bytes32[]" + } + ], + "name": "declareCrossChainDebtShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "membersToDismiss", + "type": "address[]" + } + ], + "name": "dismissMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numBallots", + "type": "uint256" + } + ], + "name": "evaluate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotCandidates", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getBallotVoted", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ballotId", + "type": "bytes32" + } + ], + "name": "getBallotVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "getCandidateVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCouncilToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCrossDomainMessenger", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDebtShareSnapshotId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getDeclaredCrossChainDebtShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDefaultBallotEvaluationBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getElectionWinners", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochEndDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEpochStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDateAdjustmentTolerance", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinEpochDurations", + "outputs": [ + { + "internalType": "uint64", + "name": "minNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minEpochDuration", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinimumActiveMembers", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextEpochSeatCount", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominationPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNominees", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getVotePower", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVotingPeriodStartDate", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "councilTokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "councilTokenSymbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "firstCouncil", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "minimumActiveMembers", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "nominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "votingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "epochEndDate", + "type": "uint64" + }, + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "initializeElectionModule", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionEvaluated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isElectionModuleInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "candidate", + "type": "address" + } + ], + "name": "isNominated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "modifyEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nominate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resolve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blocknumber", + "type": "uint256" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "setCrossDomainMessenger", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "debtShareContract", + "type": "address" + } + ], + "name": "setDebtShareContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "setDebtShareSnapshotId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDefaultBallotEvaluationBatchSize", + "type": "uint256" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMaxDateAdjustmentTolerance", + "type": "uint64" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newMinNominationPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinVotingPeriodDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newMinEpochDuration", + "type": "uint64" + } + ], + "name": "setMinEpochDurations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newMinimumActiveMembers", + "type": "uint8" + } + ], + "name": "setMinimumActiveMembers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newSeatCount", + "type": "uint8" + } + ], + "name": "setNextEpochSeatCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newNominationPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newVotingPeriodStartDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "newEpochEndDate", + "type": "uint64" + } + ], + "name": "tweakEpochSchedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCouncilTokenImplementation", + "type": "address" + } + ], + "name": "upgradeCouncilToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "contracts/Router.sol:Router": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "sel", + "type": "bytes4" + } + ], + "name": "UnknownSelector", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/packages/treasury-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json b/packages/treasury-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json new file mode 100644 index 0000000000..a768be37e1 --- /dev/null +++ b/packages/treasury-council/deployments/optimistic-mainnet/official/extended/2023-12-18-00.sources.json @@ -0,0 +1,99841 @@ +{ + "contracts/mocks/Imports.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// @dev: these imports are only made so that artifacts are available in tests\nimport \"@synthetixio/synthetix-governance/contracts/mocks/DebtShareMock.sol\";\n", + "ast": { + "absolutePath": "contracts/mocks/Imports.sol", + "exportedSymbols": { + "DebtShareMock": [ + 6644 + ], + "IDebtShare": [ + 6428 + ] + }, + "id": 7218, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7216, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:48" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/mocks/DebtShareMock.sol", + "file": "@synthetixio/synthetix-governance/contracts/mocks/DebtShareMock.sol", + "id": 7217, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7218, + "sourceUnit": 6645, + "src": "134:77:48", + "symbolAliases": [], + "unitAlias": "" + } + ], + "src": "31:181:48" + } + }, + "@synthetixio/synthetix-governance/contracts/mocks/DebtShareMock.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IDebtShare.sol\";\n\ncontract DebtShareMock is IDebtShare {\n struct Period {\n mapping(address => uint) balances;\n }\n\n mapping(uint128 => Period) private _periods;\n\n function setBalanceOfOnPeriod(\n address user,\n uint balance,\n uint periodId\n ) external {\n Period storage period = _periods[uint128(periodId)];\n\n period.balances[user] = balance;\n }\n\n function balanceOfOnPeriod(address user, uint periodId) external view virtual override returns (uint) {\n Period storage period = _periods[uint128(periodId)];\n\n return period.balances[user];\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/mocks/DebtShareMock.sol", + "exportedSymbols": { + "DebtShareMock": [ + 6644 + ], + "IDebtShare": [ + 6428 + ] + }, + "id": 6645, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6576, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:43" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "file": "../interfaces/IDebtShare.sol", + "id": 6577, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6645, + "sourceUnit": 6429, + "src": "56:38:43", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6578, + "name": "IDebtShare", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6428, + "src": "122:10:43" + }, + "id": 6579, + "nodeType": "InheritanceSpecifier", + "src": "122:10:43" + } + ], + "canonicalName": "DebtShareMock", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6644, + "linearizedBaseContracts": [ + 6644, + 6428 + ], + "name": "DebtShareMock", + "nameLocation": "105:13:43", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "DebtShareMock.Period", + "id": 6584, + "members": [ + { + "constant": false, + "id": 6583, + "mutability": "mutable", + "name": "balances", + "nameLocation": "188:8:43", + "nodeType": "VariableDeclaration", + "scope": 6584, + "src": "163:33:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6582, + "keyType": { + "id": 6580, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "171:7:43", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "163:24:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6581, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "182:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "Period", + "nameLocation": "146:6:43", + "nodeType": "StructDefinition", + "scope": 6644, + "src": "139:64:43", + "visibility": "public" + }, + { + "constant": false, + "id": 6589, + "mutability": "mutable", + "name": "_periods", + "nameLocation": "244:8:43", + "nodeType": "VariableDeclaration", + "scope": 6644, + "src": "209:43:43", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint128_$_t_struct$_Period_$6584_storage_$", + "typeString": "mapping(uint128 => struct DebtShareMock.Period)" + }, + "typeName": { + "id": 6588, + "keyType": { + "id": 6585, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "217:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Mapping", + "src": "209:26:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint128_$_t_struct$_Period_$6584_storage_$", + "typeString": "mapping(uint128 => struct DebtShareMock.Period)" + }, + "valueType": { + "id": 6587, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6586, + "name": "Period", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6584, + "src": "228:6:43" + }, + "referencedDeclaration": 6584, + "src": "228:6:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period" + } + } + }, + "visibility": "private" + }, + { + "body": { + "id": 6616, + "nodeType": "Block", + "src": "371:110:43", + "statements": [ + { + "assignments": [ + 6600 + ], + "declarations": [ + { + "constant": false, + "id": 6600, + "mutability": "mutable", + "name": "period", + "nameLocation": "396:6:43", + "nodeType": "VariableDeclaration", + "scope": 6616, + "src": "381:21:43", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period" + }, + "typeName": { + "id": 6599, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6598, + "name": "Period", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6584, + "src": "381:6:43" + }, + "referencedDeclaration": 6584, + "src": "381:6:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period" + } + }, + "visibility": "internal" + } + ], + "id": 6607, + "initialValue": { + "baseExpression": { + "id": 6601, + "name": "_periods", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6589, + "src": "405:8:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint128_$_t_struct$_Period_$6584_storage_$", + "typeString": "mapping(uint128 => struct DebtShareMock.Period storage ref)" + } + }, + "id": 6606, + "indexExpression": { + "arguments": [ + { + "id": 6604, + "name": "periodId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6595, + "src": "422:8:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "414:7:43", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6602, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "414:7:43", + "typeDescriptions": {} + } + }, + "id": 6605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "414:17:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "405:27:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage", + "typeString": "struct DebtShareMock.Period storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "381:51:43" + }, + { + "expression": { + "id": 6614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6608, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6600, + "src": "443:6:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period storage pointer" + } + }, + "id": 6611, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 6583, + "src": "443:15:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6612, + "indexExpression": { + "id": 6610, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6591, + "src": "459:4:43", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "443:21:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6613, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6593, + "src": "467:7:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "443:31:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6615, + "nodeType": "ExpressionStatement", + "src": "443:31:43" + } + ] + }, + "functionSelector": "036069c8", + "id": 6617, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setBalanceOfOnPeriod", + "nameLocation": "268:20:43", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6591, + "mutability": "mutable", + "name": "user", + "nameLocation": "306:4:43", + "nodeType": "VariableDeclaration", + "scope": 6617, + "src": "298:12:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "298:7:43", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6593, + "mutability": "mutable", + "name": "balance", + "nameLocation": "325:7:43", + "nodeType": "VariableDeclaration", + "scope": 6617, + "src": "320:12:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6592, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "320:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6595, + "mutability": "mutable", + "name": "periodId", + "nameLocation": "347:8:43", + "nodeType": "VariableDeclaration", + "scope": 6617, + "src": "342:13:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6594, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "342:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "288:73:43" + }, + "returnParameters": { + "id": 6597, + "nodeType": "ParameterList", + "parameters": [], + "src": "371:0:43" + }, + "scope": 6644, + "src": "259:222:43", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6427 + ], + "body": { + "id": 6642, + "nodeType": "Block", + "src": "589:107:43", + "statements": [ + { + "assignments": [ + 6629 + ], + "declarations": [ + { + "constant": false, + "id": 6629, + "mutability": "mutable", + "name": "period", + "nameLocation": "614:6:43", + "nodeType": "VariableDeclaration", + "scope": 6642, + "src": "599:21:43", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period" + }, + "typeName": { + "id": 6628, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6627, + "name": "Period", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6584, + "src": "599:6:43" + }, + "referencedDeclaration": 6584, + "src": "599:6:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period" + } + }, + "visibility": "internal" + } + ], + "id": 6636, + "initialValue": { + "baseExpression": { + "id": 6630, + "name": "_periods", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6589, + "src": "623:8:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint128_$_t_struct$_Period_$6584_storage_$", + "typeString": "mapping(uint128 => struct DebtShareMock.Period storage ref)" + } + }, + "id": 6635, + "indexExpression": { + "arguments": [ + { + "id": 6633, + "name": "periodId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6621, + "src": "640:8:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "632:7:43", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 6631, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "632:7:43", + "typeDescriptions": {} + } + }, + "id": 6634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:17:43", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "623:27:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage", + "typeString": "struct DebtShareMock.Period storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "599:51:43" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6637, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6629, + "src": "668:6:43", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Period_$6584_storage_ptr", + "typeString": "struct DebtShareMock.Period storage pointer" + } + }, + "id": 6638, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balances", + "nodeType": "MemberAccess", + "referencedDeclaration": 6583, + "src": "668:15:43", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6640, + "indexExpression": { + "id": 6639, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6619, + "src": "684:4:43", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "668:21:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6626, + "id": 6641, + "nodeType": "Return", + "src": "661:28:43" + } + ] + }, + "functionSelector": "8a25acf4", + "id": 6643, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOfOnPeriod", + "nameLocation": "496:17:43", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6623, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "565:8:43" + }, + "parameters": { + "id": 6622, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6619, + "mutability": "mutable", + "name": "user", + "nameLocation": "522:4:43", + "nodeType": "VariableDeclaration", + "scope": 6643, + "src": "514:12:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6618, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "514:7:43", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6621, + "mutability": "mutable", + "name": "periodId", + "nameLocation": "533:8:43", + "nodeType": "VariableDeclaration", + "scope": 6643, + "src": "528:13:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6620, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "528:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "513:29:43" + }, + "returnParameters": { + "id": 6626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6625, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6643, + "src": "583:4:43", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6624, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "583:4:43", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "582:6:43" + }, + "scope": 6644, + "src": "487:209:43", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + } + ], + "scope": 6645, + "src": "96:602:43", + "usedErrors": [] + } + ], + "src": "31:668:43" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IDebtShare {\n function balanceOfOnPeriod(address account, uint periodId) external view returns (uint);\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "exportedSymbols": { + "IDebtShare": [ + 6428 + ] + }, + "id": 6429, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6418, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:41" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IDebtShare", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6428, + "linearizedBaseContracts": [ + 6428 + ], + "name": "IDebtShare", + "nameLocation": "66:10:41", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "8a25acf4", + "id": 6427, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOfOnPeriod", + "nameLocation": "92:17:41", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6423, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6420, + "mutability": "mutable", + "name": "account", + "nameLocation": "118:7:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "110:15:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "110:7:41", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6422, + "mutability": "mutable", + "name": "periodId", + "nameLocation": "132:8:41", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "127:13:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6421, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "127:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "109:32:41" + }, + "returnParameters": { + "id": 6426, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6425, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "165:4:41", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6424, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "165:4:41", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "164:6:41" + }, + "scope": 6428, + "src": "83:88:41", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6429, + "src": "56:117:41", + "usedErrors": [] + } + ], + "src": "31:143:41" + } + }, + "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IDebtShare.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\nimport \"../interfaces/ICrossDomainMessenger.sol\";\n\ncontract DebtShareStorage {\n struct DebtShareStore {\n // Synthetix c2 DebtShare contract used to determine vote power in the local chain\n IDebtShare debtShareContract;\n // Array of debt share snapshot id's for each epoch\n uint128[] debtShareIds;\n // Array of CrossChainDebtShareData's for each epoch\n CrossChainDebtShareData[] crossChainDebtShareData;\n // Stores the address of the Optimism cross domain messenger on L2\n ICrossDomainMessenger crossDomainMessenger;\n }\n\n struct CrossChainDebtShareData {\n // Synthetix v2 cross chain debt share merkle root\n bytes32 merkleRoot;\n // Cross chain debt share merkle root snapshot blocknumber\n uint merkleRootBlockNumber;\n // Cross chain debt shares declared on this chain\n mapping(address => uint) debtShares;\n }\n\n function _debtShareStore() internal pure returns (DebtShareStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.debtshare\")) - 1)\n store.slot := 0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "exportedSymbols": { + "DebtShareStorage": [ + 6681 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6682, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6646, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:44" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/IDebtShare.sol", + "file": "../interfaces/IDebtShare.sol", + "id": 6647, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6682, + "sourceUnit": 6429, + "src": "56:38:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 6648, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6682, + "sourceUnit": 2289, + "src": "95:65:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "file": "../interfaces/ICrossDomainMessenger.sol", + "id": 6649, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6682, + "sourceUnit": 6417, + "src": "161:49:44", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "DebtShareStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6681, + "linearizedBaseContracts": [ + 6681 + ], + "name": "DebtShareStorage", + "nameLocation": "221:16:44", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "DebtShareStorage.DebtShareStore", + "id": 6663, + "members": [ + { + "constant": false, + "id": 6652, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "378:17:44", + "nodeType": "VariableDeclaration", + "scope": 6663, + "src": "367:28:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + }, + "typeName": { + "id": 6651, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6650, + "name": "IDebtShare", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6428, + "src": "367:10:44" + }, + "referencedDeclaration": 6428, + "src": "367:10:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6655, + "mutability": "mutable", + "name": "debtShareIds", + "nameLocation": "475:12:44", + "nodeType": "VariableDeclaration", + "scope": 6663, + "src": "465:22:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + }, + "typeName": { + "baseType": { + "id": 6653, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "465:7:44", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6654, + "nodeType": "ArrayTypeName", + "src": "465:9:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage_ptr", + "typeString": "uint128[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6659, + "mutability": "mutable", + "name": "crossChainDebtShareData", + "nameLocation": "584:23:44", + "nodeType": "VariableDeclaration", + "scope": 6663, + "src": "558:49:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + }, + "typeName": { + "baseType": { + "id": 6657, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6656, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6672, + "src": "558:23:44" + }, + "referencedDeclaration": 6672, + "src": "558:23:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "id": 6658, + "nodeType": "ArrayTypeName", + "src": "558:25:44", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6662, + "mutability": "mutable", + "name": "crossDomainMessenger", + "nameLocation": "714:20:44", + "nodeType": "VariableDeclaration", + "scope": 6663, + "src": "692:42:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6661, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6660, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "692:21:44" + }, + "referencedDeclaration": 6416, + "src": "692:21:44", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "name": "DebtShareStore", + "nameLocation": "251:14:44", + "nodeType": "StructDefinition", + "scope": 6681, + "src": "244:497:44", + "visibility": "public" + }, + { + "canonicalName": "DebtShareStorage.CrossChainDebtShareData", + "id": 6672, + "members": [ + { + "constant": false, + "id": 6665, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "855:10:44", + "nodeType": "VariableDeclaration", + "scope": 6672, + "src": "847:18:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6664, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "847:7:44", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6667, + "mutability": "mutable", + "name": "merkleRootBlockNumber", + "nameLocation": "947:21:44", + "nodeType": "VariableDeclaration", + "scope": 6672, + "src": "942:26:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6666, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "942:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6671, + "mutability": "mutable", + "name": "debtShares", + "nameLocation": "1061:10:44", + "nodeType": "VariableDeclaration", + "scope": 6672, + "src": "1036:35:44", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 6670, + "keyType": { + "id": 6668, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1044:7:44", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1036:24:44", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 6669, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1055:4:44", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "CrossChainDebtShareData", + "nameLocation": "754:23:44", + "nodeType": "StructDefinition", + "scope": 6681, + "src": "747:331:44", + "visibility": "public" + }, + { + "body": { + "id": 6679, + "nodeType": "Block", + "src": "1164:199:44", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1183:174:44", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1267:80:44", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1281:66:44", + "type": "", + "value": "0x24dbf425c80a2b812a860ebf3bf1d082b94299e66be3feb971f862ad0811d2b8" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "1267:10:44" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 6676, + "isOffset": false, + "isSlot": true, + "src": "1267:10:44", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 6678, + "nodeType": "InlineAssembly", + "src": "1174:183:44" + } + ] + }, + "id": 6680, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_debtShareStore", + "nameLocation": "1093:15:44", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6673, + "nodeType": "ParameterList", + "parameters": [], + "src": "1108:2:44" + }, + "returnParameters": { + "id": 6677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6676, + "mutability": "mutable", + "name": "store", + "nameLocation": "1157:5:44", + "nodeType": "VariableDeclaration", + "scope": 6680, + "src": "1134:28:44", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6675, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6674, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6663, + "src": "1134:14:44" + }, + "referencedDeclaration": 6663, + "src": "1134:14:44", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "src": "1133:30:44" + }, + "scope": 6681, + "src": "1084:279:44", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 6682, + "src": "212:1153:44", + "usedErrors": [] + } + ], + "src": "31:1335:44" + } + }, + "@synthetixio/core-contracts/contracts/utils/SetUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary SetUtil {\n // ----------------------------------------\n // Address support\n // ----------------------------------------\n\n struct AddressSet {\n Bytes32Set raw;\n }\n\n function add(AddressSet storage set, address value) internal {\n add(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function remove(AddressSet storage set, address value) internal {\n remove(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function replace(\n AddressSet storage set,\n address value,\n address newValue\n ) internal {\n replace(set.raw, bytes32(uint256(uint160(value))), bytes32(uint256(uint160(newValue))));\n }\n\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return contains(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function length(AddressSet storage set) internal view returns (uint) {\n return length(set.raw);\n }\n\n function valueAt(AddressSet storage set, uint position) internal view returns (address) {\n return address(uint160(uint256(valueAt(set.raw, position))));\n }\n\n function positionOf(AddressSet storage set, address value) internal view returns (uint) {\n return positionOf(set.raw, bytes32(uint256(uint160(value))));\n }\n\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = values(set.raw);\n address[] memory result;\n\n assembly {\n result := store\n }\n\n return result;\n }\n\n // ----------------------------------------\n // Core bytes32 support\n // ----------------------------------------\n\n error PositionOutOfBounds();\n error ValueNotInSet();\n error ValueAlreadyInSet();\n\n struct Bytes32Set {\n /* solhint-disable private-vars-leading-underscore */\n bytes32[] _values;\n mapping(bytes32 => uint) _positions; // Position zero is never used.\n /* solhint-enable private-vars-leading-underscore */\n }\n\n function add(Bytes32Set storage set, bytes32 value) internal {\n if (contains(set, value)) {\n revert ValueAlreadyInSet();\n }\n\n set._values.push(value);\n set._positions[value] = set._values.length;\n }\n\n function remove(Bytes32Set storage set, bytes32 value) internal {\n uint position = set._positions[value];\n if (position == 0) {\n revert ValueNotInSet();\n }\n\n uint index = position - 1;\n uint lastIndex = set._values.length - 1;\n\n // If the element being deleted is not the last in the values,\n // move the last element to its position.\n if (index != lastIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n set._values[index] = lastValue;\n set._positions[lastValue] = position;\n }\n\n // Remove the last element in the values.\n set._values.pop();\n delete set._positions[value];\n }\n\n function replace(\n Bytes32Set storage set,\n bytes32 value,\n bytes32 newValue\n ) internal {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n if (contains(set, newValue)) {\n revert ValueAlreadyInSet();\n }\n\n uint position = set._positions[value];\n uint index = position - 1;\n\n set._values[index] = newValue;\n set._positions[newValue] = position;\n }\n\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return set._positions[value] != 0;\n }\n\n function length(Bytes32Set storage set) internal view returns (uint) {\n return set._values.length;\n }\n\n function valueAt(Bytes32Set storage set, uint position) internal view returns (bytes32) {\n if (position == 0 || position > set._values.length) {\n revert PositionOutOfBounds();\n }\n\n uint index = position - 1;\n\n return set._values[index];\n }\n\n function positionOf(Bytes32Set storage set, bytes32 value) internal view returns (uint) {\n if (!contains(set, value)) {\n revert ValueNotInSet();\n }\n\n return set._positions[value];\n }\n\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return set._values;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "exportedSymbols": { + "SetUtil": [ + 2288 + ] + }, + "id": 2289, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1784, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:24" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "SetUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2288, + "linearizedBaseContracts": [ + 2288 + ], + "name": "SetUtil", + "nameLocation": "64:7:24", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "SetUtil.AddressSet", + "id": 1788, + "members": [ + { + "constant": false, + "id": 1787, + "mutability": "mutable", + "name": "raw", + "nameLocation": "237:3:24", + "nodeType": "VariableDeclaration", + "scope": 1788, + "src": "226:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 1786, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1785, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "226:10:24" + }, + "referencedDeclaration": 2007, + "src": "226:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "name": "AddressSet", + "nameLocation": "205:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "198:49:24", + "visibility": "public" + }, + { + "body": { + "id": 1811, + "nodeType": "Block", + "src": "314:63:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1797, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "328:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "328:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1805, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1793, + "src": "361:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1804, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "353:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1803, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "353:7:24", + "typeDescriptions": {} + } + }, + "id": 1806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "345:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1801, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "345:7:24", + "typeDescriptions": {} + } + }, + "id": 1807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "345:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "337:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1799, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "337:7:24", + "typeDescriptions": {} + } + }, + "id": 1808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "337:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1796, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1812, + 2043 + ], + "referencedDeclaration": 2043, + "src": "324:3:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:46:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1810, + "nodeType": "ExpressionStatement", + "src": "324:46:24" + } + ] + }, + "id": 1812, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "262:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1791, + "mutability": "mutable", + "name": "set", + "nameLocation": "285:3:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "266:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1790, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1789, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "266:10:24" + }, + "referencedDeclaration": 1788, + "src": "266:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1793, + "mutability": "mutable", + "name": "value", + "nameLocation": "298:5:24", + "nodeType": "VariableDeclaration", + "scope": 1812, + "src": "290:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1792, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "290:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:39:24" + }, + "returnParameters": { + "id": 1795, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:0:24" + }, + "scope": 2288, + "src": "253:124:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1835, + "nodeType": "Block", + "src": "447:66:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1821, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1815, + "src": "464:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1822, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "464:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1829, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1817, + "src": "497:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "489:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1827, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "489:7:24", + "typeDescriptions": {} + } + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "489:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "481:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1825, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "481:7:24", + "typeDescriptions": {} + } + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "481:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "473:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1823, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "473:7:24", + "typeDescriptions": {} + } + }, + "id": 1832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1820, + "name": "remove", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1836, + 2122 + ], + "referencedDeclaration": 2122, + "src": "457:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32)" + } + }, + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "457:49:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1834, + "nodeType": "ExpressionStatement", + "src": "457:49:24" + } + ] + }, + "id": 1836, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "392:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1815, + "mutability": "mutable", + "name": "set", + "nameLocation": "418:3:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "399:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1814, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1813, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "399:10:24" + }, + "referencedDeclaration": 1788, + "src": "399:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1817, + "mutability": "mutable", + "name": "value", + "nameLocation": "431:5:24", + "nodeType": "VariableDeclaration", + "scope": 1836, + "src": "423:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1816, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "423:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "398:39:24" + }, + "returnParameters": { + "id": 1819, + "nodeType": "ParameterList", + "parameters": [], + "src": "447:0:24" + }, + "scope": 2288, + "src": "383:130:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1871, + "nodeType": "Block", + "src": "632:104:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1847, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1839, + "src": "650:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1848, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "650:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1841, + "src": "683:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "675:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1853, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "675:7:24", + "typeDescriptions": {} + } + }, + "id": 1856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "675:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1852, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "667:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1851, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "667:7:24", + "typeDescriptions": {} + } + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "667:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1850, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1849, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "659:7:24", + "typeDescriptions": {} + } + }, + "id": 1858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1865, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1843, + "src": "717:8:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "709:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1863, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "709:7:24", + "typeDescriptions": {} + } + }, + "id": 1866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "709:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "701:7:24", + "typeDescriptions": {} + } + }, + "id": 1867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "693:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1859, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "693:7:24", + "typeDescriptions": {} + } + }, + "id": 1868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "693:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1846, + "name": "replace", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1872, + 2181 + ], + "referencedDeclaration": 2181, + "src": "642:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$_t_bytes32_$returns$__$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32,bytes32)" + } + }, + "id": 1869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:87:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1870, + "nodeType": "ExpressionStatement", + "src": "642:87:24" + } + ] + }, + "id": 1872, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "528:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1839, + "mutability": "mutable", + "name": "set", + "nameLocation": "564:3:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "545:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1838, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1837, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "545:10:24" + }, + "referencedDeclaration": 1788, + "src": "545:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1841, + "mutability": "mutable", + "name": "value", + "nameLocation": "585:5:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "577:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1840, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "577:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1843, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "608:8:24", + "nodeType": "VariableDeclaration", + "scope": 1872, + "src": "600:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "600:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "535:87:24" + }, + "returnParameters": { + "id": 1845, + "nodeType": "ParameterList", + "parameters": [], + "src": "632:0:24" + }, + "scope": 2288, + "src": "519:217:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1897, + "nodeType": "Block", + "src": "828:75:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1883, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1875, + "src": "854:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "854:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1891, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1877, + "src": "887:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1890, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "879:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1889, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "879:7:24", + "typeDescriptions": {} + } + }, + "id": 1892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "879:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "871:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1887, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "871:7:24", + "typeDescriptions": {} + } + }, + "id": 1893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "871:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "863:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1885, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "863:7:24", + "typeDescriptions": {} + } + }, + "id": 1894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "863:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1882, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "845:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 1895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "845:51:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1881, + "id": 1896, + "nodeType": "Return", + "src": "838:58:24" + } + ] + }, + "id": 1898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "751:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1875, + "mutability": "mutable", + "name": "set", + "nameLocation": "779:3:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "760:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1874, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1873, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "760:10:24" + }, + "referencedDeclaration": 1788, + "src": "760:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1877, + "mutability": "mutable", + "name": "value", + "nameLocation": "792:5:24", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "784:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1876, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "784:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "759:39:24" + }, + "returnParameters": { + "id": 1881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1880, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1898, + "src": "822:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1879, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "822:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "821:6:24" + }, + "scope": 2288, + "src": "742:161:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1911, + "nodeType": "Block", + "src": "978:39:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1907, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1901, + "src": "1002:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1002:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1906, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1912, + 2212 + ], + "referencedDeclaration": 2212, + "src": "995:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (uint256)" + } + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1905, + "id": 1910, + "nodeType": "Return", + "src": "988:22:24" + } + ] + }, + "id": 1912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "918:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1901, + "mutability": "mutable", + "name": "set", + "nameLocation": "944:3:24", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "925:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1900, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1899, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "925:10:24" + }, + "referencedDeclaration": 1788, + "src": "925:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "924:24:24" + }, + "returnParameters": { + "id": 1905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1904, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1912, + "src": "972:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "972:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "971:6:24" + }, + "scope": 2288, + "src": "909:108:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1937, + "nodeType": "Block", + "src": "1111:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 1929, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1915, + "src": "1160:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1160:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "id": 1931, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "1169:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1928, + "name": "valueAt", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1938, + 2248 + ], + "referencedDeclaration": 2248, + "src": "1152:7:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,uint256) view returns (bytes32)" + } + }, + "id": 1932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1152:26:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1144:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1926, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1144:7:24", + "typeDescriptions": {} + } + }, + "id": 1933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1144:35:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1924, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1136:7:24", + "typeDescriptions": {} + } + }, + "id": 1934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1136:44:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1923, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1128:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1922, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1128:7:24", + "typeDescriptions": {} + } + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1128:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1921, + "id": 1936, + "nodeType": "Return", + "src": "1121:60:24" + } + ] + }, + "id": 1938, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "1032:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1915, + "mutability": "mutable", + "name": "set", + "nameLocation": "1059:3:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1040:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1914, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1913, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1040:10:24" + }, + "referencedDeclaration": 1788, + "src": "1040:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "position", + "nameLocation": "1069:8:24", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1064:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1064:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1039:39:24" + }, + "returnParameters": { + "id": 1921, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1920, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1938, + "src": "1102:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1919, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1102:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1101:9:24" + }, + "scope": 2288, + "src": "1023:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1963, + "nodeType": "Block", + "src": "1282:77:24", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 1949, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1941, + "src": "1310:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1310:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "id": 1957, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1943, + "src": "1343:5:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1335:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": { + "id": 1955, + "name": "uint160", + "nodeType": "ElementaryTypeName", + "src": "1335:7:24", + "typeDescriptions": {} + } + }, + "id": 1958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1335:14:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 1954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1327:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1327:7:24", + "typeDescriptions": {} + } + }, + "id": 1959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1327:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1319:7:24", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 1951, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1319:7:24", + "typeDescriptions": {} + } + }, + "id": 1960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1319:32:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1948, + "name": "positionOf", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1964, + 2274 + ], + "referencedDeclaration": 2274, + "src": "1299:10:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_uint256_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (uint256)" + } + }, + "id": 1961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1299:53:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1947, + "id": 1962, + "nodeType": "Return", + "src": "1292:60:24" + } + ] + }, + "id": 1964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "1203:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1941, + "mutability": "mutable", + "name": "set", + "nameLocation": "1233:3:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1214:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1940, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1939, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1214:10:24" + }, + "referencedDeclaration": 1788, + "src": "1214:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1943, + "mutability": "mutable", + "name": "value", + "nameLocation": "1246:5:24", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1238:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1942, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1238:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1213:39:24" + }, + "returnParameters": { + "id": 1947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1964, + "src": "1276:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1945, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1276:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1275:6:24" + }, + "scope": 2288, + "src": "1194:165:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1992, + "nodeType": "Block", + "src": "1446:172:24", + "statements": [ + { + "assignments": [ + 1977 + ], + "declarations": [ + { + "constant": false, + "id": 1977, + "mutability": "mutable", + "name": "store", + "nameLocation": "1473:5:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1456:22:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1975, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1456:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1976, + "nodeType": "ArrayTypeName", + "src": "1456:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "id": 1982, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 1979, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1967, + "src": "1488:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 1980, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "raw", + "nodeType": "MemberAccess", + "referencedDeclaration": 1787, + "src": "1488:7:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage", + "typeString": "struct SetUtil.Bytes32Set storage ref" + } + ], + "id": 1978, + "name": "values", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1993, + 2287 + ], + "referencedDeclaration": 2287, + "src": "1481:6:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$returns$_t_array$_t_bytes32_$dyn_memory_ptr_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer) view returns (bytes32[] memory)" + } + }, + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1481:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1456:40:24" + }, + { + "assignments": [ + 1987 + ], + "declarations": [ + { + "constant": false, + "id": 1987, + "mutability": "mutable", + "name": "result", + "nameLocation": "1523:6:24", + "nodeType": "VariableDeclaration", + "scope": 1992, + "src": "1506:23:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1985, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1506:7:24", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1986, + "nodeType": "ArrayTypeName", + "src": "1506:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 1988, + "nodeType": "VariableDeclarationStatement", + "src": "1506:23:24" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1549:39:24", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1563:15:24", + "value": { + "name": "store", + "nodeType": "YulIdentifier", + "src": "1573:5:24" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1563:6:24" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1987, + "isOffset": false, + "isSlot": false, + "src": "1563:6:24", + "valueSize": 1 + }, + { + "declaration": 1977, + "isOffset": false, + "isSlot": false, + "src": "1573:5:24", + "valueSize": 1 + } + ], + "id": 1989, + "nodeType": "InlineAssembly", + "src": "1540:48:24" + }, + { + "expression": { + "id": 1990, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1987, + "src": "1605:6:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 1972, + "id": 1991, + "nodeType": "Return", + "src": "1598:13:24" + } + ] + }, + "id": 1993, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "1374:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1967, + "mutability": "mutable", + "name": "set", + "nameLocation": "1400:3:24", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1381:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 1966, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1965, + "name": "AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1381:10:24" + }, + "referencedDeclaration": 1788, + "src": "1381:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "1380:24:24" + }, + "returnParameters": { + "id": 1972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1993, + "src": "1428:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1428:7:24", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1970, + "nodeType": "ArrayTypeName", + "src": "1428:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1427:18:24" + }, + "scope": 2288, + "src": "1365:253:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "id": 1995, + "name": "PositionOutOfBounds", + "nameLocation": "1755:19:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1994, + "nodeType": "ParameterList", + "parameters": [], + "src": "1774:2:24" + }, + "src": "1749:28:24" + }, + { + "id": 1997, + "name": "ValueNotInSet", + "nameLocation": "1788:13:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1996, + "nodeType": "ParameterList", + "parameters": [], + "src": "1801:2:24" + }, + "src": "1782:22:24" + }, + { + "id": 1999, + "name": "ValueAlreadyInSet", + "nameLocation": "1815:17:24", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 1998, + "nodeType": "ParameterList", + "parameters": [], + "src": "1832:2:24" + }, + "src": "1809:26:24" + }, + { + "canonicalName": "SetUtil.Bytes32Set", + "id": 2007, + "members": [ + { + "constant": false, + "id": 2002, + "mutability": "mutable", + "name": "_values", + "nameLocation": "1941:7:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1931:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2000, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1931:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2001, + "nodeType": "ArrayTypeName", + "src": "1931:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2006, + "mutability": "mutable", + "name": "_positions", + "nameLocation": "1983:10:24", + "nodeType": "VariableDeclaration", + "scope": 2007, + "src": "1958:35:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "typeName": { + "id": 2005, + "keyType": { + "id": 2003, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1966:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1958:24:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + }, + "valueType": { + "id": 2004, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1977:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "Bytes32Set", + "nameLocation": "1848:10:24", + "nodeType": "StructDefinition", + "scope": 2288, + "src": "1841:252:24", + "visibility": "public" + }, + { + "body": { + "id": 2042, + "nodeType": "Block", + "src": "2160:179:24", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 2016, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2183:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2017, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2188:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2015, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "2174:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2174:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2023, + "nodeType": "IfStatement", + "src": "2170:77:24", + "trueBody": { + "id": 2022, + "nodeType": "Block", + "src": "2196:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2019, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "2217:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2020, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2217:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2021, + "nodeType": "RevertStatement", + "src": "2210:26:24" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 2029, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2274:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 2024, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2257:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2027, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2257:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "2257:16:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 2030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2257:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2031, + "nodeType": "ExpressionStatement", + "src": "2257:23:24" + }, + { + "expression": { + "id": 2040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2032, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2290:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2290:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2036, + "indexExpression": { + "id": 2034, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2012, + "src": "2305:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2290:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "expression": { + "id": 2037, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2010, + "src": "2314:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2038, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2314:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2314:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2290:42:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2041, + "nodeType": "ExpressionStatement", + "src": "2290:42:24" + } + ] + }, + "id": 2043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nameLocation": "2108:3:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2013, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2010, + "mutability": "mutable", + "name": "set", + "nameLocation": "2131:3:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2112:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2009, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2008, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2112:10:24" + }, + "referencedDeclaration": 2007, + "src": "2112:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2012, + "mutability": "mutable", + "name": "value", + "nameLocation": "2144:5:24", + "nodeType": "VariableDeclaration", + "scope": 2043, + "src": "2136:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2011, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2136:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2111:39:24" + }, + "returnParameters": { + "id": 2014, + "nodeType": "ParameterList", + "parameters": [], + "src": "2160:0:24" + }, + "scope": 2288, + "src": "2099:240:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2121, + "nodeType": "Block", + "src": "2409:647:24", + "statements": [ + { + "assignments": [ + 2052 + ], + "declarations": [ + { + "constant": false, + "id": 2052, + "mutability": "mutable", + "name": "position", + "nameLocation": "2424:8:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2419:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2419:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2057, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2053, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2435:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2054, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2435:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2056, + "indexExpression": { + "id": 2055, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "2450:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2435:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2419:37:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2058, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2470:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2482:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2470:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2065, + "nodeType": "IfStatement", + "src": "2466:66:24", + "trueBody": { + "id": 2064, + "nodeType": "Block", + "src": "2485:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2061, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "2506:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2063, + "nodeType": "RevertStatement", + "src": "2499:22:24" + } + ] + } + }, + { + "assignments": [ + 2067 + ], + "declarations": [ + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "index", + "nameLocation": "2547:5:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2542:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2066, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2542:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2071, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2068, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2555:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2566:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2555:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2542:25:24" + }, + { + "assignments": [ + 2073 + ], + "declarations": [ + { + "constant": false, + "id": 2073, + "mutability": "mutable", + "name": "lastIndex", + "nameLocation": "2582:9:24", + "nodeType": "VariableDeclaration", + "scope": 2121, + "src": "2577:14:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2072, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2577:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2079, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 2074, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2594:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2075, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2594:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2594:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2077, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2594:22:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2577:39:24" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2080, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2752:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 2081, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2761:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2752:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2107, + "nodeType": "IfStatement", + "src": "2748:186:24", + "trueBody": { + "id": 2106, + "nodeType": "Block", + "src": "2772:162:24", + "statements": [ + { + "assignments": [ + 2084 + ], + "declarations": [ + { + "constant": false, + "id": 2084, + "mutability": "mutable", + "name": "lastValue", + "nameLocation": "2794:9:24", + "nodeType": "VariableDeclaration", + "scope": 2106, + "src": "2786:17:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2083, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2786:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 2089, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2085, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2806:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2086, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2806:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2088, + "indexExpression": { + "id": 2087, + "name": "lastIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2073, + "src": "2818:9:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2806:22:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2786:42:24" + }, + { + "expression": { + "id": 2096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2090, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2843:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2093, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2843:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2094, + "indexExpression": { + "id": 2092, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2855:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2843:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2095, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2864:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2843:30:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2097, + "nodeType": "ExpressionStatement", + "src": "2843:30:24" + }, + { + "expression": { + "id": 2104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2098, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2887:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "2887:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2102, + "indexExpression": { + "id": 2100, + "name": "lastValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2084, + "src": "2902:9:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2887:25:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2103, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2052, + "src": "2915:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2887:36:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2105, + "nodeType": "ExpressionStatement", + "src": "2887:36:24" + } + ] + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 2108, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "2994:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "2994:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "src": "2994:15:24", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer)" + } + }, + "id": 2113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2994:17:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2114, + "nodeType": "ExpressionStatement", + "src": "2994:17:24" + }, + { + "expression": { + "id": 2119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "3021:28:24", + "subExpression": { + "baseExpression": { + "expression": { + "id": 2115, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2046, + "src": "3028:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3028:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2118, + "indexExpression": { + "id": 2117, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2048, + "src": "3043:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3028:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2120, + "nodeType": "ExpressionStatement", + "src": "3021:28:24" + } + ] + }, + "id": 2122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nameLocation": "2354:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2046, + "mutability": "mutable", + "name": "set", + "nameLocation": "2380:3:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2361:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2045, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2044, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "2361:10:24" + }, + "referencedDeclaration": 2007, + "src": "2361:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2048, + "mutability": "mutable", + "name": "value", + "nameLocation": "2393:5:24", + "nodeType": "VariableDeclaration", + "scope": 2122, + "src": "2385:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2385:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2360:39:24" + }, + "returnParameters": { + "id": 2050, + "nodeType": "ParameterList", + "parameters": [], + "src": "2409:0:24" + }, + "scope": 2288, + "src": "2345:711:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2180, + "nodeType": "Block", + "src": "3175:348:24", + "statements": [ + { + "condition": { + "id": 2136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3189:21:24", + "subExpression": { + "arguments": [ + { + "id": 2133, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3199:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2134, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3204:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2132, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3190:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3190:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2141, + "nodeType": "IfStatement", + "src": "3185:74:24", + "trueBody": { + "id": 2140, + "nodeType": "Block", + "src": "3212:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2137, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "3233:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3233:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2139, + "nodeType": "RevertStatement", + "src": "3226:22:24" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 2143, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3282:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2144, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3287:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2142, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "3273:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:23:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2150, + "nodeType": "IfStatement", + "src": "3269:80:24", + "trueBody": { + "id": 2149, + "nodeType": "Block", + "src": "3298:51:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2146, + "name": "ValueAlreadyInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "3319:17:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3319:19:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2148, + "nodeType": "RevertStatement", + "src": "3312:26:24" + } + ] + } + }, + { + "assignments": [ + 2152 + ], + "declarations": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "position", + "nameLocation": "3364:8:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3359:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2151, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3359:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2157, + "initialValue": { + "baseExpression": { + "expression": { + "id": 2153, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3375:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3375:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2156, + "indexExpression": { + "id": 2155, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2127, + "src": "3390:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3375:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3359:37:24" + }, + { + "assignments": [ + 2159 + ], + "declarations": [ + { + "constant": false, + "id": 2159, + "mutability": "mutable", + "name": "index", + "nameLocation": "3411:5:24", + "nodeType": "VariableDeclaration", + "scope": 2180, + "src": "3406:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2158, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3406:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2163, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2160, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3419:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3430:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3419:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3406:25:24" + }, + { + "expression": { + "id": 2170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2164, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3442:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3442:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2168, + "indexExpression": { + "id": 2166, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2159, + "src": "3454:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3442:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2169, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3463:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "3442:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2171, + "nodeType": "ExpressionStatement", + "src": "3442:29:24" + }, + { + "expression": { + "id": 2178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 2172, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2125, + "src": "3481:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3481:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2176, + "indexExpression": { + "id": 2174, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3496:8:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3481:24:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 2177, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2152, + "src": "3508:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3481:35:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2179, + "nodeType": "ExpressionStatement", + "src": "3481:35:24" + } + ] + }, + "id": 2181, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "replace", + "nameLocation": "3071:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2125, + "mutability": "mutable", + "name": "set", + "nameLocation": "3107:3:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3088:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2124, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2123, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3088:10:24" + }, + "referencedDeclaration": 2007, + "src": "3088:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2127, + "mutability": "mutable", + "name": "value", + "nameLocation": "3128:5:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3120:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2126, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3120:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2129, + "mutability": "mutable", + "name": "newValue", + "nameLocation": "3151:8:24", + "nodeType": "VariableDeclaration", + "scope": 2181, + "src": "3143:16:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2128, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3143:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3078:87:24" + }, + "returnParameters": { + "id": 2131, + "nodeType": "ParameterList", + "parameters": [], + "src": "3175:0:24" + }, + "scope": 2288, + "src": "3062:461:24", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2198, + "nodeType": "Block", + "src": "3615:50:24", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 2191, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2184, + "src": "3632:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2192, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "3632:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2194, + "indexExpression": { + "id": 2193, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2186, + "src": "3647:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3632:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3657:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3632:26:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2190, + "id": 2197, + "nodeType": "Return", + "src": "3625:33:24" + } + ] + }, + "id": 2199, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "contains", + "nameLocation": "3538:8:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2184, + "mutability": "mutable", + "name": "set", + "nameLocation": "3566:3:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3547:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2183, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2182, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3547:10:24" + }, + "referencedDeclaration": 2007, + "src": "3547:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2186, + "mutability": "mutable", + "name": "value", + "nameLocation": "3579:5:24", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3571:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2185, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3571:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3546:39:24" + }, + "returnParameters": { + "id": 2190, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2199, + "src": "3609:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2188, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3609:4:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3608:6:24" + }, + "scope": 2288, + "src": "3529:136:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2211, + "nodeType": "Block", + "src": "3740:42:24", + "statements": [ + { + "expression": { + "expression": { + "expression": { + "id": 2207, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2202, + "src": "3757:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3757:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3757:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2206, + "id": 2210, + "nodeType": "Return", + "src": "3750:25:24" + } + ] + }, + "id": 2212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "length", + "nameLocation": "3680:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2203, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2202, + "mutability": "mutable", + "name": "set", + "nameLocation": "3706:3:24", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3687:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2201, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2200, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3687:10:24" + }, + "referencedDeclaration": 2007, + "src": "3687:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "3686:24:24" + }, + "returnParameters": { + "id": 2206, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2205, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2212, + "src": "3734:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2204, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3734:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3733:6:24" + }, + "scope": 2288, + "src": "3671:111:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2247, + "nodeType": "Block", + "src": "3876:193:24", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 2230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2222, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3890:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3902:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3890:13:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2225, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "3907:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "expression": { + "expression": { + "id": 2226, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "3918:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2227, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "3918:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3918:18:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3907:29:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3890:46:24", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2235, + "nodeType": "IfStatement", + "src": "3886:105:24", + "trueBody": { + "id": 2234, + "nodeType": "Block", + "src": "3938:53:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2231, + "name": "PositionOutOfBounds", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1995, + "src": "3959:19:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3959:21:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2233, + "nodeType": "RevertStatement", + "src": "3952:28:24" + } + ] + } + }, + { + "assignments": [ + 2237 + ], + "declarations": [ + { + "constant": false, + "id": 2237, + "mutability": "mutable", + "name": "index", + "nameLocation": "4006:5:24", + "nodeType": "VariableDeclaration", + "scope": 2247, + "src": "4001:10:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2236, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4001:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2241, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2238, + "name": "position", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2217, + "src": "4014:8:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 2239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:24", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4014:12:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4001:25:24" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2242, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2215, + "src": "4044:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4044:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 2245, + "indexExpression": { + "id": 2244, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2237, + "src": "4056:5:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4044:18:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2221, + "id": 2246, + "nodeType": "Return", + "src": "4037:25:24" + } + ] + }, + "id": 2248, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "valueAt", + "nameLocation": "3797:7:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2215, + "mutability": "mutable", + "name": "set", + "nameLocation": "3824:3:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3805:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2214, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2213, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "3805:10:24" + }, + "referencedDeclaration": 2007, + "src": "3805:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2217, + "mutability": "mutable", + "name": "position", + "nameLocation": "3834:8:24", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3829:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2216, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3829:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3804:39:24" + }, + "returnParameters": { + "id": 2221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2220, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2248, + "src": "3867:7:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2219, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3867:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3866:9:24" + }, + "scope": 2288, + "src": "3788:281:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2273, + "nodeType": "Block", + "src": "4163:129:24", + "statements": [ + { + "condition": { + "id": 2262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4177:21:24", + "subExpression": { + "arguments": [ + { + "id": 2259, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4187:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + { + "id": 2260, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4192:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 2258, + "name": "contains", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1898, + 2199 + ], + "referencedDeclaration": 2199, + "src": "4178:8:24", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Bytes32Set_$2007_storage_ptr_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (struct SetUtil.Bytes32Set storage pointer,bytes32) view returns (bool)" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4178:20:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2267, + "nodeType": "IfStatement", + "src": "4173:74:24", + "trueBody": { + "id": 2266, + "nodeType": "Block", + "src": "4200:47:24", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2263, + "name": "ValueNotInSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "4221:13:24", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4221:15:24", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2265, + "nodeType": "RevertStatement", + "src": "4214:22:24" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 2268, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2251, + "src": "4264:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2269, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_positions", + "nodeType": "MemberAccess", + "referencedDeclaration": 2006, + "src": "4264:14:24", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", + "typeString": "mapping(bytes32 => uint256)" + } + }, + "id": 2271, + "indexExpression": { + "id": 2270, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2253, + "src": "4279:5:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4264:21:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2257, + "id": 2272, + "nodeType": "Return", + "src": "4257:28:24" + } + ] + }, + "id": 2274, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "positionOf", + "nameLocation": "4084:10:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2254, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2251, + "mutability": "mutable", + "name": "set", + "nameLocation": "4114:3:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4095:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2250, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2249, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4095:10:24" + }, + "referencedDeclaration": 2007, + "src": "4095:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2253, + "mutability": "mutable", + "name": "value", + "nameLocation": "4127:5:24", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4119:13:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2252, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4119:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4094:39:24" + }, + "returnParameters": { + "id": 2257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2256, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2274, + "src": "4157:4:24", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2255, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4157:4:24", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4156:6:24" + }, + "scope": 2288, + "src": "4075:217:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2286, + "nodeType": "Block", + "src": "4379:35:24", + "statements": [ + { + "expression": { + "expression": { + "id": 2283, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2277, + "src": "4396:3:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set storage pointer" + } + }, + "id": 2284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_values", + "nodeType": "MemberAccess", + "referencedDeclaration": 2002, + "src": "4396:11:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "functionReturnParameters": 2282, + "id": 2285, + "nodeType": "Return", + "src": "4389:18:24" + } + ] + }, + "id": 2287, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "values", + "nameLocation": "4307:6:24", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "set", + "nameLocation": "4333:3:24", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4314:22:24", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + }, + "typeName": { + "id": 2276, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2275, + "name": "Bytes32Set", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2007, + "src": "4314:10:24" + }, + "referencedDeclaration": 2007, + "src": "4314:10:24", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Bytes32Set_$2007_storage_ptr", + "typeString": "struct SetUtil.Bytes32Set" + } + }, + "visibility": "internal" + } + ], + "src": "4313:24:24" + }, + "returnParameters": { + "id": 2282, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2281, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2287, + "src": "4361:16:24", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 2279, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4361:7:24", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 2280, + "nodeType": "ArrayTypeName", + "src": "4361:9:24", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4360:18:24" + }, + "scope": 2288, + "src": "4298:116:24", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2289, + "src": "56:4360:24", + "usedErrors": [ + 1995, + 1997, + 1999 + ] + } + ], + "src": "31:4386:24" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol": { + "sourceCode": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface ICrossDomainMessenger {\n event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit);\n event RelayedMessage(bytes32 indexed msgHash);\n event FailedRelayedMessage(bytes32 indexed msgHash);\n\n function xDomainMessageSender() external view returns (address);\n\n function sendMessage(\n address target,\n bytes calldata message,\n uint32 gasLimit\n ) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ICrossDomainMessenger.sol", + "exportedSymbols": { + "ICrossDomainMessenger": [ + 6416 + ] + }, + "id": 6417, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6381, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "32:23:40" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ICrossDomainMessenger", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6416, + "linearizedBaseContracts": [ + 6416 + ], + "name": "ICrossDomainMessenger", + "nameLocation": "67:21:40", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 6393, + "name": "SentMessage", + "nameLocation": "101:11:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6383, + "indexed": true, + "mutability": "mutable", + "name": "target", + "nameLocation": "129:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "113:22:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6382, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "113:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6385, + "indexed": false, + "mutability": "mutable", + "name": "sender", + "nameLocation": "145:6:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "137:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "137:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6387, + "indexed": false, + "mutability": "mutable", + "name": "message", + "nameLocation": "159:7:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "153:13:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6386, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "153:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6389, + "indexed": false, + "mutability": "mutable", + "name": "messageNonce", + "nameLocation": "176:12:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "168:20:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6388, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "168:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6391, + "indexed": false, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "198:8:40", + "nodeType": "VariableDeclaration", + "scope": 6393, + "src": "190:16:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6390, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "190:7:40", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "112:95:40" + }, + "src": "95:113:40" + }, + { + "anonymous": false, + "id": 6397, + "name": "RelayedMessage", + "nameLocation": "219:14:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6395, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "250:7:40", + "nodeType": "VariableDeclaration", + "scope": 6397, + "src": "234:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6394, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "234:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "233:25:40" + }, + "src": "213:46:40" + }, + { + "anonymous": false, + "id": 6401, + "name": "FailedRelayedMessage", + "nameLocation": "270:20:40", + "nodeType": "EventDefinition", + "parameters": { + "id": 6400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6399, + "indexed": true, + "mutability": "mutable", + "name": "msgHash", + "nameLocation": "307:7:40", + "nodeType": "VariableDeclaration", + "scope": 6401, + "src": "291:23:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6398, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "291:7:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "290:25:40" + }, + "src": "264:52:40" + }, + { + "functionSelector": "6e296e45", + "id": 6406, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "xDomainMessageSender", + "nameLocation": "331:20:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6402, + "nodeType": "ParameterList", + "parameters": [], + "src": "351:2:40" + }, + "returnParameters": { + "id": 6405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6406, + "src": "377:7:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "377:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "376:9:40" + }, + "scope": 6416, + "src": "322:64:40", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "3dbb202b", + "id": 6415, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "sendMessage", + "nameLocation": "401:11:40", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6408, + "mutability": "mutable", + "name": "target", + "nameLocation": "430:6:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "422:14:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "422:7:40", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6410, + "mutability": "mutable", + "name": "message", + "nameLocation": "461:7:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "446:22:40", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6409, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "446:5:40", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6412, + "mutability": "mutable", + "name": "gasLimit", + "nameLocation": "485:8:40", + "nodeType": "VariableDeclaration", + "scope": 6415, + "src": "478:15:40", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + }, + "typeName": { + "id": 6411, + "name": "uint32", + "nodeType": "ElementaryTypeName", + "src": "478:6:40", + "typeDescriptions": { + "typeIdentifier": "t_uint32", + "typeString": "uint32" + } + }, + "visibility": "internal" + } + ], + "src": "412:87:40" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "508:0:40" + }, + "scope": 6416, + "src": "392:117:40", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6417, + "src": "57:454:40", + "usedErrors": [] + } + ], + "src": "32:480:40" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/MerkleProof.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"../../storage/DebtShareStorage.sol\";\n\n/// @dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number\ncontract CrossChainDebtShareManager is ElectionBase, DebtShareStorage {\n error MerkleRootNotSet();\n error InvalidMerkleProof();\n error CrossChainDebtShareAlreadyDeclared();\n\n event CrossChainDebtShareMerkleRootSet(bytes32 merkleRoot, uint blocknumber, uint epoch);\n event CrossChainDebtShareDeclared(address user, uint debtShare);\n\n function _setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n debtShareData.merkleRoot = merkleRoot;\n debtShareData.merkleRootBlockNumber = blocknumber;\n }\n\n function _declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) internal {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.debtShares[user] != 0) {\n revert CrossChainDebtShareAlreadyDeclared();\n }\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n bytes32 leaf = keccak256(abi.encodePacked(user, debtShare));\n\n if (!MerkleProof.verify(merkleProof, debtShareData.merkleRoot, leaf)) {\n revert InvalidMerkleProof();\n }\n\n debtShareData.debtShares[user] = debtShare;\n }\n\n function _getCrossChainDebtShareMerkleRoot() internal view returns (bytes32) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRoot;\n }\n\n function _getCrossChainDebtShareMerkleRootBlockNumber() internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n if (debtShareData.merkleRoot == 0) {\n revert MerkleRootNotSet();\n }\n\n return debtShareData.merkleRootBlockNumber;\n }\n\n function _getDeclaredCrossChainDebtShare(address user) internal view returns (uint) {\n CrossChainDebtShareData storage debtShareData = _debtShareStore().crossChainDebtShareData[_getCurrentEpochIndex()];\n\n return debtShareData.debtShares[user];\n }\n\n function _setCrossDomainMessenger(address newCrossDomainMessengerAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newCrossDomainMessengerAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newCrossDomainMessengerAddress == address(store.crossDomainMessenger)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newCrossDomainMessengerAddress)) {\n revert AddressError.NotAContract(newCrossDomainMessengerAddress);\n }\n\n store.crossDomainMessenger = ICrossDomainMessenger(newCrossDomainMessengerAddress);\n }\n\n function _getCrossDomainMessenger() internal view returns (address) {\n return address(_debtShareStore().crossDomainMessenger);\n }\n\n function _validateCrossChainMessage(address user) internal view {\n ICrossDomainMessenger messenger = ICrossDomainMessenger(_debtShareStore().crossDomainMessenger);\n\n if (address(messenger) == address(0)) {\n revert CrossDomainMessengerNotSet();\n }\n\n if (msg.sender != address(messenger)) {\n revert OnlyCrossDomainMessengerCanInvoke();\n }\n\n if (messenger.xDomainMessageSender() != user) {\n revert OnlyCrossDomainUserCanInvoke();\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 7020 + ], + "DebtShareStorage": [ + 6681 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 7021, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6683, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:45" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "id": 6684, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7021, + "sourceUnit": 1783, + "src": "56:69:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 6685, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7021, + "sourceUnit": 4684, + "src": "126:82:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 6686, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7021, + "sourceUnit": 1697, + "src": "209:69:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 6687, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7021, + "sourceUnit": 26, + "src": "279:70:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 6688, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7021, + "sourceUnit": 16, + "src": "350:71:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 6689, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7021, + "sourceUnit": 6682, + "src": "422:44:45", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6691, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "619:12:45" + }, + "id": 6692, + "nodeType": "InheritanceSpecifier", + "src": "619:12:45" + }, + { + "baseName": { + "id": 6693, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6681, + "src": "633:16:45" + }, + "id": 6694, + "nodeType": "InheritanceSpecifier", + "src": "633:16:45" + } + ], + "canonicalName": "CrossChainDebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 6690, + "nodeType": "StructuredDocumentation", + "src": "468:112:45", + "text": "@dev Uses a merkle tree to track user Synthetix v2 debt shares on other chains at a particular block number" + }, + "fullyImplemented": true, + "id": 7020, + "linearizedBaseContracts": [ + 7020, + 6681, + 4683, + 4331 + ], + "name": "CrossChainDebtShareManager", + "nameLocation": "589:26:45", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6696, + "name": "MerkleRootNotSet", + "nameLocation": "662:16:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6695, + "nodeType": "ParameterList", + "parameters": [], + "src": "678:2:45" + }, + "src": "656:25:45" + }, + { + "id": 6698, + "name": "InvalidMerkleProof", + "nameLocation": "692:18:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6697, + "nodeType": "ParameterList", + "parameters": [], + "src": "710:2:45" + }, + "src": "686:27:45" + }, + { + "id": 6700, + "name": "CrossChainDebtShareAlreadyDeclared", + "nameLocation": "724:34:45", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6699, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:45" + }, + "src": "718:43:45" + }, + { + "anonymous": false, + "id": 6708, + "name": "CrossChainDebtShareMerkleRootSet", + "nameLocation": "773:32:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6707, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6702, + "indexed": false, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "814:10:45", + "nodeType": "VariableDeclaration", + "scope": 6708, + "src": "806:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6701, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "806:7:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6704, + "indexed": false, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "831:11:45", + "nodeType": "VariableDeclaration", + "scope": 6708, + "src": "826:16:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6703, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "826:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6706, + "indexed": false, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "849:5:45", + "nodeType": "VariableDeclaration", + "scope": 6708, + "src": "844:10:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6705, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "844:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "805:50:45" + }, + "src": "767:89:45" + }, + { + "anonymous": false, + "id": 6714, + "name": "CrossChainDebtShareDeclared", + "nameLocation": "867:27:45", + "nodeType": "EventDefinition", + "parameters": { + "id": 6713, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6710, + "indexed": false, + "mutability": "mutable", + "name": "user", + "nameLocation": "903:4:45", + "nodeType": "VariableDeclaration", + "scope": 6714, + "src": "895:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6709, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "895:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6712, + "indexed": false, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "914:9:45", + "nodeType": "VariableDeclaration", + "scope": 6714, + "src": "909:14:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "909:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "894:30:45" + }, + "src": "861:64:45" + }, + { + "body": { + "id": 6743, + "nodeType": "Block", + "src": "1021:238:45", + "statements": [ + { + "assignments": [ + 6723 + ], + "declarations": [ + { + "constant": false, + "id": 6723, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1063:13:45", + "nodeType": "VariableDeclaration", + "scope": 6743, + "src": "1031:45:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6722, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6721, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6672, + "src": "1031:23:45" + }, + "referencedDeclaration": 6672, + "src": "1031:23:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6730, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6724, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "1079:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6659, + "src": "1079:41:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6729, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6727, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1121:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1121:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1079:66:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1031:114:45" + }, + { + "expression": { + "id": 6735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6731, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6723, + "src": "1156:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6733, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6665, + "src": "1156:24:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6734, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6716, + "src": "1183:10:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1156:37:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6736, + "nodeType": "ExpressionStatement", + "src": "1156:37:45" + }, + { + "expression": { + "id": 6741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6737, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6723, + "src": "1203:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6739, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6667, + "src": "1203:35:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6740, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6718, + "src": "1241:11:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1203:49:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6742, + "nodeType": "ExpressionStatement", + "src": "1203:49:45" + } + ] + }, + "id": 6744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossChainDebtShareMerkleRoot", + "nameLocation": "940:33:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6716, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "982:10:45", + "nodeType": "VariableDeclaration", + "scope": 6744, + "src": "974:18:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6715, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "974:7:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6718, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "999:11:45", + "nodeType": "VariableDeclaration", + "scope": 6744, + "src": "994:16:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6717, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "994:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "973:38:45" + }, + "returnParameters": { + "id": 6720, + "nodeType": "ParameterList", + "parameters": [], + "src": "1021:0:45" + }, + "scope": 7020, + "src": "931:328:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6815, + "nodeType": "Block", + "src": "1406:600:45", + "statements": [ + { + "assignments": [ + 6756 + ], + "declarations": [ + { + "constant": false, + "id": 6756, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "1448:13:45", + "nodeType": "VariableDeclaration", + "scope": 6815, + "src": "1416:45:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6755, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6754, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6672, + "src": "1416:23:45" + }, + "referencedDeclaration": 6672, + "src": "1416:23:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6763, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6757, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "1464:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1464:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6759, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6659, + "src": "1464:41:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6762, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6760, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1506:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1506:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1464:66:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1416:114:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "id": 6764, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6756, + "src": "1545:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6765, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6671, + "src": "1545:24:45", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6767, + "indexExpression": { + "id": 6766, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6746, + "src": "1570:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1545:30:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 6768, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1579:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1545:35:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6774, + "nodeType": "IfStatement", + "src": "1541:109:45", + "trueBody": { + "id": 6773, + "nodeType": "Block", + "src": "1582:68:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6770, + "name": "CrossChainDebtShareAlreadyDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6700, + "src": "1603:34:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1603:36:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6772, + "nodeType": "RevertStatement", + "src": "1596:43:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6775, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6756, + "src": "1664:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6776, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6665, + "src": "1664:24:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6777, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1692:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1664:29:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6783, + "nodeType": "IfStatement", + "src": "1660:85:45", + "trueBody": { + "id": 6782, + "nodeType": "Block", + "src": "1695:50:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6779, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6696, + "src": "1716:16:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1716:18:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6781, + "nodeType": "RevertStatement", + "src": "1709:25:45" + } + ] + } + }, + { + "assignments": [ + 6785 + ], + "declarations": [ + { + "constant": false, + "id": 6785, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "1763:4:45", + "nodeType": "VariableDeclaration", + "scope": 6815, + "src": "1755:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6784, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1755:7:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6793, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 6789, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6746, + "src": "1797:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6790, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6748, + "src": "1803:9:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6787, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1780:3:45", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 6788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1780:16:45", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 6791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:33:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 6786, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1770:9:45", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 6792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1770:44:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1755:59:45" + }, + { + "condition": { + "id": 6801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1829:64:45", + "subExpression": { + "arguments": [ + { + "id": 6796, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6751, + "src": "1849:11:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + }, + { + "expression": { + "id": 6797, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6756, + "src": "1862:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6665, + "src": "1862:24:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6799, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6785, + "src": "1888:4:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 6794, + "name": "MerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1782, + "src": "1830:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MerkleProof_$1782_$", + "typeString": "type(library MerkleProof)" + } + }, + "id": 6795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "verify", + "nodeType": "MemberAccess", + "referencedDeclaration": 1770, + "src": "1830:18:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_bytes32_$dyn_memory_ptr_$_t_bytes32_$_t_bytes32_$returns$_t_bool_$", + "typeString": "function (bytes32[] memory,bytes32,bytes32) pure returns (bool)" + } + }, + "id": 6800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1830:63:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6806, + "nodeType": "IfStatement", + "src": "1825:122:45", + "trueBody": { + "id": 6805, + "nodeType": "Block", + "src": "1895:52:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6802, + "name": "InvalidMerkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6698, + "src": "1916:18:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1916:20:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6804, + "nodeType": "RevertStatement", + "src": "1909:27:45" + } + ] + } + }, + { + "expression": { + "id": 6813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6807, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6756, + "src": "1957:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6671, + "src": "1957:24:45", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6811, + "indexExpression": { + "id": 6809, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6746, + "src": "1982:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1957:30:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6812, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6748, + "src": "1990:9:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1957:42:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6814, + "nodeType": "ExpressionStatement", + "src": "1957:42:45" + } + ] + }, + "id": 6816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_declareCrossChainDebtShare", + "nameLocation": "1274:27:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6746, + "mutability": "mutable", + "name": "user", + "nameLocation": "1319:4:45", + "nodeType": "VariableDeclaration", + "scope": 6816, + "src": "1311:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6745, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1311:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6748, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "1341:9:45", + "nodeType": "VariableDeclaration", + "scope": 6816, + "src": "1333:17:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6747, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1333:7:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6751, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "1379:11:45", + "nodeType": "VariableDeclaration", + "scope": 6816, + "src": "1360:30:45", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6749, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1360:7:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6750, + "nodeType": "ArrayTypeName", + "src": "1360:9:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "1301:95:45" + }, + "returnParameters": { + "id": 6753, + "nodeType": "ParameterList", + "parameters": [], + "src": "1406:0:45" + }, + "scope": 7020, + "src": "1265:741:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6843, + "nodeType": "Block", + "src": "2089:268:45", + "statements": [ + { + "assignments": [ + 6823 + ], + "declarations": [ + { + "constant": false, + "id": 6823, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2131:13:45", + "nodeType": "VariableDeclaration", + "scope": 6843, + "src": "2099:45:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6822, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6821, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6672, + "src": "2099:23:45" + }, + "referencedDeclaration": 6672, + "src": "2099:23:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6830, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6824, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "2147:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2147:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6826, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6659, + "src": "2147:41:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6829, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6827, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2189:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2147:66:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2099:114:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6831, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6823, + "src": "2228:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6832, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6665, + "src": "2228:24:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2256:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2228:29:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6839, + "nodeType": "IfStatement", + "src": "2224:85:45", + "trueBody": { + "id": 6838, + "nodeType": "Block", + "src": "2259:50:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6835, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6696, + "src": "2280:16:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2280:18:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6837, + "nodeType": "RevertStatement", + "src": "2273:25:45" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6840, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6823, + "src": "2326:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6841, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6665, + "src": "2326:24:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6820, + "id": 6842, + "nodeType": "Return", + "src": "2319:31:45" + } + ] + }, + "id": 6844, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRoot", + "nameLocation": "2021:33:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6817, + "nodeType": "ParameterList", + "parameters": [], + "src": "2054:2:45" + }, + "returnParameters": { + "id": 6820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6819, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6844, + "src": "2080:7:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6818, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2080:7:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2079:9:45" + }, + "scope": 7020, + "src": "2012:345:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6871, + "nodeType": "Block", + "src": "2448:279:45", + "statements": [ + { + "assignments": [ + 6851 + ], + "declarations": [ + { + "constant": false, + "id": 6851, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2490:13:45", + "nodeType": "VariableDeclaration", + "scope": 6871, + "src": "2458:45:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6850, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6849, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6672, + "src": "2458:23:45" + }, + "referencedDeclaration": 6672, + "src": "2458:23:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6858, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6852, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "2506:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6854, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6659, + "src": "2506:41:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6857, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6855, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2548:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2548:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2506:66:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2458:114:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 6862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6859, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6851, + "src": "2587:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRoot", + "nodeType": "MemberAccess", + "referencedDeclaration": 6665, + "src": "2587:24:45", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 6861, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2615:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2587:29:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6867, + "nodeType": "IfStatement", + "src": "2583:85:45", + "trueBody": { + "id": 6866, + "nodeType": "Block", + "src": "2618:50:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6863, + "name": "MerkleRootNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6696, + "src": "2639:16:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2639:18:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6865, + "nodeType": "RevertStatement", + "src": "2632:25:45" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 6868, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6851, + "src": "2685:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6869, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "merkleRootBlockNumber", + "nodeType": "MemberAccess", + "referencedDeclaration": 6667, + "src": "2685:35:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6848, + "id": 6870, + "nodeType": "Return", + "src": "2678:42:45" + } + ] + }, + "id": 6872, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2372:44:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6845, + "nodeType": "ParameterList", + "parameters": [], + "src": "2416:2:45" + }, + "returnParameters": { + "id": 6848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6847, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6872, + "src": "2442:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6846, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2442:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2441:6:45" + }, + "scope": 7020, + "src": "2363:364:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6894, + "nodeType": "Block", + "src": "2817:179:45", + "statements": [ + { + "assignments": [ + 6881 + ], + "declarations": [ + { + "constant": false, + "id": 6881, + "mutability": "mutable", + "name": "debtShareData", + "nameLocation": "2859:13:45", + "nodeType": "VariableDeclaration", + "scope": 6894, + "src": "2827:45:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + }, + "typeName": { + "id": 6880, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6879, + "name": "CrossChainDebtShareData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6672, + "src": "2827:23:45" + }, + "referencedDeclaration": 6672, + "src": "2827:23:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData" + } + }, + "visibility": "internal" + } + ], + "id": 6888, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6882, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "2875:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2875:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6659, + "src": "2875:41:45", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6672_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6887, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6885, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2917:21:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:23:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2875:66:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2827:114:45" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6889, + "name": "debtShareData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6881, + "src": "2959:13:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6672_storage_ptr", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage pointer" + } + }, + "id": 6890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShares", + "nodeType": "MemberAccess", + "referencedDeclaration": 6671, + "src": "2959:24:45", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6892, + "indexExpression": { + "id": 6891, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6874, + "src": "2984:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2959:30:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6878, + "id": 6893, + "nodeType": "Return", + "src": "2952:37:45" + } + ] + }, + "id": 6895, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDeclaredCrossChainDebtShare", + "nameLocation": "2742:31:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6875, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6874, + "mutability": "mutable", + "name": "user", + "nameLocation": "2782:4:45", + "nodeType": "VariableDeclaration", + "scope": 6895, + "src": "2774:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6873, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2774:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2773:14:45" + }, + "returnParameters": { + "id": 6878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6877, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6895, + "src": "2811:4:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6876, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2811:4:45", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2810:6:45" + }, + "scope": 7020, + "src": "2733:263:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6954, + "nodeType": "Block", + "src": "3085:575:45", + "statements": [ + { + "assignments": [ + 6902 + ], + "declarations": [ + { + "constant": false, + "id": 6902, + "mutability": "mutable", + "name": "store", + "nameLocation": "3118:5:45", + "nodeType": "VariableDeclaration", + "scope": 6954, + "src": "3095:28:45", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6901, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6900, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6663, + "src": "3095:14:45" + }, + "referencedDeclaration": 6663, + "src": "3095:14:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6905, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6903, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "3126:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3126:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3095:48:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6906, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6897, + "src": "3158:30:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3200:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6908, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3192:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6907, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3192:7:45", + "typeDescriptions": {} + } + }, + "id": 6910, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3192:10:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3158:44:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6918, + "nodeType": "IfStatement", + "src": "3154:108:45", + "trueBody": { + "id": 6917, + "nodeType": "Block", + "src": "3204:58:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6912, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3225:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "3225:24:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3225:26:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6916, + "nodeType": "RevertStatement", + "src": "3218:33:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6919, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6897, + "src": "3276:30:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 6922, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6902, + "src": "3318:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6662, + "src": "3318:26:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6921, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3310:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3310:7:45", + "typeDescriptions": {} + } + }, + "id": 6924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3310:35:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3276:69:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6932, + "nodeType": "IfStatement", + "src": "3272:129:45", + "trueBody": { + "id": 6931, + "nodeType": "Block", + "src": "3347:54:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6926, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "3368:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 6928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "3368:20:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3368:22:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6930, + "nodeType": "RevertStatement", + "src": "3361:29:45" + } + ] + } + }, + { + "condition": { + "id": 6937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3415:55:45", + "subExpression": { + "arguments": [ + { + "id": 6935, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6897, + "src": "3439:30:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6933, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "3416:11:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 6934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "3416:22:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 6936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3416:54:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6945, + "nodeType": "IfStatement", + "src": "3411:150:45", + "trueBody": { + "id": 6944, + "nodeType": "Block", + "src": "3472:89:45", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 6941, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6897, + "src": "3519:30:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6938, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3493:12:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 6940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "3493:25:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 6942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3493:57:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6943, + "nodeType": "RevertStatement", + "src": "3486:64:45" + } + ] + } + }, + { + "expression": { + "id": 6952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6946, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6902, + "src": "3571:5:45", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6948, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6662, + "src": "3571:26:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6950, + "name": "newCrossDomainMessengerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6897, + "src": "3622:30:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6949, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3600:21:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3600:53:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "src": "3571:82:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 6953, + "nodeType": "ExpressionStatement", + "src": "3571:82:45" + } + ] + }, + "id": 6955, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setCrossDomainMessenger", + "nameLocation": "3011:24:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6898, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6897, + "mutability": "mutable", + "name": "newCrossDomainMessengerAddress", + "nameLocation": "3044:30:45", + "nodeType": "VariableDeclaration", + "scope": 6955, + "src": "3036:38:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3036:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3035:40:45" + }, + "returnParameters": { + "id": 6899, + "nodeType": "ParameterList", + "parameters": [], + "src": "3085:0:45" + }, + "scope": 7020, + "src": "3002:658:45", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 6967, + "nodeType": "Block", + "src": "3734:71:45", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6962, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "3759:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3759:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6964, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6662, + "src": "3759:38:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6961, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3751:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6960, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3751:7:45", + "typeDescriptions": {} + } + }, + "id": 6965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3751:47:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6959, + "id": 6966, + "nodeType": "Return", + "src": "3744:54:45" + } + ] + }, + "id": 6968, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCrossDomainMessenger", + "nameLocation": "3675:24:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6956, + "nodeType": "ParameterList", + "parameters": [], + "src": "3699:2:45" + }, + "returnParameters": { + "id": 6959, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6958, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6968, + "src": "3725:7:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3725:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3724:9:45" + }, + "scope": 7020, + "src": "3666:139:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7018, + "nodeType": "Block", + "src": "3875:453:45", + "statements": [ + { + "assignments": [ + 6975 + ], + "declarations": [ + { + "constant": false, + "id": 6975, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3907:9:45", + "nodeType": "VariableDeclaration", + "scope": 7018, + "src": "3885:31:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + }, + "typeName": { + "id": 6974, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6973, + "name": "ICrossDomainMessenger", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6416, + "src": "3885:21:45" + }, + "referencedDeclaration": 6416, + "src": "3885:21:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "visibility": "internal" + } + ], + "id": 6981, + "initialValue": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6977, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "3941:15:45", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3941:17:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6979, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossDomainMessenger", + "nodeType": "MemberAccess", + "referencedDeclaration": 6662, + "src": "3941:38:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6976, + "name": "ICrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6416, + "src": "3919:21:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ICrossDomainMessenger_$6416_$", + "typeString": "type(contract ICrossDomainMessenger)" + } + }, + "id": 6980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3919:61:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3885:95:45" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6984, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6975, + "src": "4003:9:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3995:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6982, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3995:7:45", + "typeDescriptions": {} + } + }, + "id": 6985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3995:18:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 6988, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4025:1:45", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4017:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6986, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4017:7:45", + "typeDescriptions": {} + } + }, + "id": 6989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4017:10:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3995:32:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6995, + "nodeType": "IfStatement", + "src": "3991:98:45", + "trueBody": { + "id": 6994, + "nodeType": "Block", + "src": "4029:60:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6991, + "name": "CrossDomainMessengerNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4374, + "src": "4050:26:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4050:28:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6993, + "nodeType": "RevertStatement", + "src": "4043:35:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6996, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4103:3:45", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4103:10:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "id": 7000, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6975, + "src": "4125:9:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + ], + "id": 6999, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4117:7:45", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6998, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4117:7:45", + "typeDescriptions": {} + } + }, + "id": 7001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4117:18:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4103:32:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7007, + "nodeType": "IfStatement", + "src": "4099:105:45", + "trueBody": { + "id": 7006, + "nodeType": "Block", + "src": "4137:67:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7003, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4376, + "src": "4158:33:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4158:35:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7005, + "nodeType": "RevertStatement", + "src": "4151:42:45" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7008, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6975, + "src": "4218:9:45", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ICrossDomainMessenger_$6416", + "typeString": "contract ICrossDomainMessenger" + } + }, + "id": 7009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "xDomainMessageSender", + "nodeType": "MemberAccess", + "referencedDeclaration": 6406, + "src": "4218:30:45", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 7010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4218:32:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 7011, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6970, + "src": "4254:4:45", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4218:40:45", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7017, + "nodeType": "IfStatement", + "src": "4214:108:45", + "trueBody": { + "id": 7016, + "nodeType": "Block", + "src": "4260:62:45", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7013, + "name": "OnlyCrossDomainUserCanInvoke", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4378, + "src": "4281:28:45", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4281:30:45", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7015, + "nodeType": "RevertStatement", + "src": "4274:37:45" + } + ] + } + } + ] + }, + "id": 7019, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCrossChainMessage", + "nameLocation": "3820:26:45", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6970, + "mutability": "mutable", + "name": "user", + "nameLocation": "3855:4:45", + "nodeType": "VariableDeclaration", + "scope": 7019, + "src": "3847:12:45", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3847:7:45", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3846:14:45" + }, + "returnParameters": { + "id": 6972, + "nodeType": "ParameterList", + "parameters": [], + "src": "3875:0:45" + }, + "scope": 7020, + "src": "3811:517:45", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7021, + "src": "580:3750:45", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 6696, + 6698, + 6700 + ] + } + ], + "src": "31:4300:45" + } + }, + "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// Based on OpenZeppelin https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol\nlibrary MerkleProof {\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n bytes32 computedHash = leaf;\n\n for (uint256 i = 0; i < proof.length; i++) {\n bytes32 proofElement = proof[i];\n\n if (computedHash <= proofElement) {\n // Hash(current computed hash + current element of the proof)\n computedHash = _efficientHash(computedHash, proofElement);\n } else {\n // Hash(current element of the proof + current computed hash)\n computedHash = _efficientHash(proofElement, computedHash);\n }\n }\n\n // Check if the computed hash (root) is equal to the provided root\n return computedHash == root;\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MerkleProof.sol", + "exportedSymbols": { + "MerkleProof": [ + 1782 + ] + }, + "id": 1783, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1710, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:23" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MerkleProof", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1782, + "linearizedBaseContracts": [ + 1782 + ], + "name": "MerkleProof", + "nameLocation": "201:11:23", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1769, + "nodeType": "Block", + "src": "346:656:23", + "statements": [ + { + "assignments": [ + 1723 + ], + "declarations": [ + { + "constant": false, + "id": 1723, + "mutability": "mutable", + "name": "computedHash", + "nameLocation": "364:12:23", + "nodeType": "VariableDeclaration", + "scope": 1769, + "src": "356:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1722, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "356:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1725, + "initialValue": { + "id": 1724, + "name": "leaf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1717, + "src": "379:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "356:27:23" + }, + { + "body": { + "id": 1763, + "nodeType": "Block", + "src": "437:446:23", + "statements": [ + { + "assignments": [ + 1738 + ], + "declarations": [ + { + "constant": false, + "id": 1738, + "mutability": "mutable", + "name": "proofElement", + "nameLocation": "459:12:23", + "nodeType": "VariableDeclaration", + "scope": 1763, + "src": "451:20:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1737, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "451:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 1742, + "initialValue": { + "baseExpression": { + "id": 1739, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "474:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1741, + "indexExpression": { + "id": 1740, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "480:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "474:8:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "451:31:23" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1743, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "501:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 1744, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "517:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "501:28:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1761, + "nodeType": "Block", + "src": "705:168:23", + "statements": [ + { + "expression": { + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1754, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "801:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1756, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "831:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1757, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "845:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1755, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "816:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "816:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "801:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1760, + "nodeType": "ExpressionStatement", + "src": "801:57:23" + } + ] + }, + "id": 1762, + "nodeType": "IfStatement", + "src": "497:376:23", + "trueBody": { + "id": 1753, + "nodeType": "Block", + "src": "531:168:23", + "statements": [ + { + "expression": { + "id": 1751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 1746, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "627:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 1748, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "657:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 1749, + "name": "proofElement", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1738, + "src": "671:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 1747, + "name": "_efficientHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1781, + "src": "642:14:23", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes32_$_t_bytes32_$returns$_t_bytes32_$", + "typeString": "function (bytes32,bytes32) pure returns (bytes32)" + } + }, + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "642:42:23", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "627:57:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1752, + "nodeType": "ExpressionStatement", + "src": "627:57:23" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1730, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "414:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 1731, + "name": "proof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1713, + "src": "418:5:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[] memory" + } + }, + "id": 1732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "418:12:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "414:16:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1764, + "initializationExpression": { + "assignments": [ + 1727 + ], + "declarations": [ + { + "constant": false, + "id": 1727, + "mutability": "mutable", + "name": "i", + "nameLocation": "407:1:23", + "nodeType": "VariableDeclaration", + "scope": 1764, + "src": "399:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1729, + "initialValue": { + "hexValue": "30", + "id": 1728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "411:1:23", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "399:13:23" + }, + "loopExpression": { + "expression": { + "id": 1735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "432:3:23", + "subExpression": { + "id": 1734, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1727, + "src": "432:1:23", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1736, + "nodeType": "ExpressionStatement", + "src": "432:3:23" + }, + "nodeType": "ForStatement", + "src": "394:489:23" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 1767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1765, + "name": "computedHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1723, + "src": "975:12:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1766, + "name": "root", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1715, + "src": "991:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "975:20:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1721, + "id": 1768, + "nodeType": "Return", + "src": "968:27:23" + } + ] + }, + "id": 1770, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "verify", + "nameLocation": "228:6:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1718, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1713, + "mutability": "mutable", + "name": "proof", + "nameLocation": "261:5:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "244:22:23", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_memory_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 1711, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "244:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 1712, + "nodeType": "ArrayTypeName", + "src": "244:9:23", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1715, + "mutability": "mutable", + "name": "root", + "nameLocation": "284:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "276:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1714, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "276:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1717, + "mutability": "mutable", + "name": "leaf", + "nameLocation": "306:4:23", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "298:12:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1716, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "298:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "234:82:23" + }, + "returnParameters": { + "id": 1721, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1720, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1770, + "src": "340:4:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1719, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "340:4:23", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "339:6:23" + }, + "scope": 1782, + "src": "219:783:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1780, + "nodeType": "Block", + "src": "1091:135:23", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "1110:110:23", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1131:4:23", + "type": "", + "value": "0x00" + }, + { + "name": "a", + "nodeType": "YulIdentifier", + "src": "1137:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1124:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1124:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1124:15:23" + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1159:4:23", + "type": "", + "value": "0x20" + }, + { + "name": "b", + "nodeType": "YulIdentifier", + "src": "1165:1:23" + } + ], + "functionName": { + "name": "mstore", + "nodeType": "YulIdentifier", + "src": "1152:6:23" + }, + "nodeType": "YulFunctionCall", + "src": "1152:15:23" + }, + "nodeType": "YulExpressionStatement", + "src": "1152:15:23" + }, + { + "nodeType": "YulAssignment", + "src": "1180:30:23", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1199:4:23", + "type": "", + "value": "0x00" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1205:4:23", + "type": "", + "value": "0x40" + } + ], + "functionName": { + "name": "keccak256", + "nodeType": "YulIdentifier", + "src": "1189:9:23" + }, + "nodeType": "YulFunctionCall", + "src": "1189:21:23" + }, + "variableNames": [ + { + "name": "value", + "nodeType": "YulIdentifier", + "src": "1180:5:23" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1772, + "isOffset": false, + "isSlot": false, + "src": "1137:1:23", + "valueSize": 1 + }, + { + "declaration": 1774, + "isOffset": false, + "isSlot": false, + "src": "1165:1:23", + "valueSize": 1 + }, + { + "declaration": 1777, + "isOffset": false, + "isSlot": false, + "src": "1180:5:23", + "valueSize": 1 + } + ], + "id": 1779, + "nodeType": "InlineAssembly", + "src": "1101:119:23" + } + ] + }, + "id": 1781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_efficientHash", + "nameLocation": "1017:14:23", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1772, + "mutability": "mutable", + "name": "a", + "nameLocation": "1040:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1032:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1771, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1032:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1774, + "mutability": "mutable", + "name": "b", + "nameLocation": "1051:1:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1043:9:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1773, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1043:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1031:22:23" + }, + "returnParameters": { + "id": 1778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1777, + "mutability": "mutable", + "name": "value", + "nameLocation": "1084:5:23", + "nodeType": "VariableDeclaration", + "scope": 1781, + "src": "1076:13:23", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 1776, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1076:7:23", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1075:15:23" + }, + "scope": 1782, + "src": "1008:218:23", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1783, + "src": "193:1035:23", + "usedErrors": [] + } + ], + "src": "31:1198:23" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/ElectionStorage.sol\";\n\n/// @dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule\ncontract ElectionBase is ElectionStorage {\n // ---------------------------------------\n // Enums\n // ---------------------------------------\n\n enum ElectionPeriod {\n // Council elected and active\n Administration,\n // Accepting nominations for next election\n Nomination,\n // Accepting votes for ongoing election\n Vote,\n // Votes being counted\n Evaluation\n }\n\n // ---------------------------------------\n // Errors\n // ---------------------------------------\n\n error ElectionNotEvaluated();\n error ElectionAlreadyEvaluated();\n error AlreadyNominated();\n error NotNominated();\n error NoCandidates();\n error NoVotePower();\n error VoteNotCasted();\n error DuplicateCandidates();\n error InvalidEpochConfiguration();\n error InvalidElectionSettings();\n error NotCallableInCurrentPeriod();\n error ChangesCurrentPeriod();\n error AlreadyACouncilMember();\n error NotACouncilMember();\n error InvalidMinimumActiveMembers();\n error CrossDomainMessengerNotSet();\n error OnlyCrossDomainMessengerCanInvoke();\n error OnlyCrossDomainUserCanInvoke();\n\n // ---------------------------------------\n // Events\n // ---------------------------------------\n\n event ElectionModuleInitialized();\n event EpochStarted(uint epochIndex);\n event CouncilTokenCreated(address proxy, address implementation);\n event CouncilTokenUpgraded(address newImplementation);\n event CouncilMemberAdded(address indexed member, uint indexed epochIndex);\n event CouncilMemberRemoved(address indexed member, uint indexed epochIndex);\n event CouncilMembersDismissed(address[] members, uint indexed epochIndex);\n event EpochScheduleUpdated(uint64 nominationPeriodStartDate, uint64 votingPeriodStartDate, uint64 epochEndDate);\n event MinimumEpochDurationsChanged(\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n event MaxDateAdjustmentToleranceChanged(uint64 tolerance);\n event DefaultBallotEvaluationBatchSizeChanged(uint size);\n event NextEpochSeatCountChanged(uint8 seatCount);\n event MinimumActiveMembersChanged(uint8 minimumActiveMembers);\n event CandidateNominated(address indexed candidate, uint indexed epochIndex);\n event NominationWithdrawn(address indexed candidate, uint indexed epochIndex);\n event VoteRecorded(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event VoteWithdrawn(address indexed voter, bytes32 indexed ballotId, uint indexed epochIndex, uint votePower);\n event ElectionEvaluated(uint indexed epochIndex, uint totalBallots);\n event ElectionBatchEvaluated(uint indexed epochIndex, uint evaluatedBallots, uint totalBallots);\n event EmergencyElectionStarted(uint indexed epochIndex);\n event CrossDomainMessengerSet(address messenger);\n\n // ---------------------------------------\n // Helpers\n // ---------------------------------------\n\n function _createNewEpoch() internal virtual {\n ElectionStore storage store = _electionStore();\n\n store.epochs.push();\n store.elections.push();\n }\n\n function _getCurrentEpochIndex() internal view returns (uint) {\n return _electionStore().epochs.length - 1;\n }\n\n function _getCurrentEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex());\n }\n\n function _getPreviousEpoch() internal view returns (EpochData storage) {\n return _getEpochAtIndex(_getCurrentEpochIndex() - 1);\n }\n\n function _getEpochAtIndex(uint epochIndex) internal view returns (EpochData storage) {\n return _electionStore().epochs[epochIndex];\n }\n\n function _getCurrentElection() internal view returns (ElectionData storage) {\n return _getElectionAtIndex(_getCurrentEpochIndex());\n }\n\n function _getElectionAtIndex(uint epochIndex) internal view returns (ElectionData storage) {\n return _electionStore().elections[epochIndex];\n }\n\n function _getBallot(bytes32 ballotId) internal view returns (BallotData storage) {\n return _getCurrentElection().ballotsById[ballotId];\n }\n\n function _getBallotInEpoch(bytes32 ballotId, uint epochIndex) internal view returns (BallotData storage) {\n return _getElectionAtIndex(epochIndex).ballotsById[ballotId];\n }\n\n function _calculateBallotId(address[] memory candidates) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(candidates));\n }\n\n function _ballotExists(BallotData storage ballot) internal view returns (bool) {\n return ballot.candidates.length != 0;\n }\n\n function _getBallotVoted(address user) internal view returns (bytes32) {\n return _getCurrentElection().ballotIdsByAddress[user];\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4684, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4333, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:34" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "file": "../../storage/ElectionStorage.sol", + "id": 4334, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4684, + "sourceUnit": 4332, + "src": "56:43:34", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4336, + "name": "ElectionStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4331, + "src": "228:15:34" + }, + "id": 4337, + "nodeType": "InheritanceSpecifier", + "src": "228:15:34" + } + ], + "canonicalName": "ElectionBase", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4335, + "nodeType": "StructuredDocumentation", + "src": "101:102:34", + "text": "@dev Common utils, errors, and events to be used by any contracts that conform the ElectionModule" + }, + "fullyImplemented": true, + "id": 4683, + "linearizedBaseContracts": [ + 4683, + 4331 + ], + "name": "ElectionBase", + "nameLocation": "212:12:34", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionBase.ElectionPeriod", + "id": 4342, + "members": [ + { + "id": 4338, + "name": "Administration", + "nameLocation": "426:14:34", + "nodeType": "EnumValue", + "src": "426:14:34" + }, + { + "id": 4339, + "name": "Nomination", + "nameLocation": "501:10:34", + "nodeType": "EnumValue", + "src": "501:10:34" + }, + { + "id": 4340, + "name": "Vote", + "nameLocation": "569:4:34", + "nodeType": "EnumValue", + "src": "569:4:34" + }, + { + "id": 4341, + "name": "Evaluation", + "nameLocation": "614:10:34", + "nodeType": "EnumValue", + "src": "614:10:34" + } + ], + "name": "ElectionPeriod", + "nameLocation": "363:14:34", + "nodeType": "EnumDefinition", + "src": "358:272:34" + }, + { + "id": 4344, + "name": "ElectionNotEvaluated", + "nameLocation": "751:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4343, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:2:34" + }, + "src": "745:29:34" + }, + { + "id": 4346, + "name": "ElectionAlreadyEvaluated", + "nameLocation": "785:24:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4345, + "nodeType": "ParameterList", + "parameters": [], + "src": "809:2:34" + }, + "src": "779:33:34" + }, + { + "id": 4348, + "name": "AlreadyNominated", + "nameLocation": "823:16:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4347, + "nodeType": "ParameterList", + "parameters": [], + "src": "839:2:34" + }, + "src": "817:25:34" + }, + { + "id": 4350, + "name": "NotNominated", + "nameLocation": "853:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4349, + "nodeType": "ParameterList", + "parameters": [], + "src": "865:2:34" + }, + "src": "847:21:34" + }, + { + "id": 4352, + "name": "NoCandidates", + "nameLocation": "879:12:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4351, + "nodeType": "ParameterList", + "parameters": [], + "src": "891:2:34" + }, + "src": "873:21:34" + }, + { + "id": 4354, + "name": "NoVotePower", + "nameLocation": "905:11:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4353, + "nodeType": "ParameterList", + "parameters": [], + "src": "916:2:34" + }, + "src": "899:20:34" + }, + { + "id": 4356, + "name": "VoteNotCasted", + "nameLocation": "930:13:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4355, + "nodeType": "ParameterList", + "parameters": [], + "src": "943:2:34" + }, + "src": "924:22:34" + }, + { + "id": 4358, + "name": "DuplicateCandidates", + "nameLocation": "957:19:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4357, + "nodeType": "ParameterList", + "parameters": [], + "src": "976:2:34" + }, + "src": "951:28:34" + }, + { + "id": 4360, + "name": "InvalidEpochConfiguration", + "nameLocation": "990:25:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4359, + "nodeType": "ParameterList", + "parameters": [], + "src": "1015:2:34" + }, + "src": "984:34:34" + }, + { + "id": 4362, + "name": "InvalidElectionSettings", + "nameLocation": "1029:23:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4361, + "nodeType": "ParameterList", + "parameters": [], + "src": "1052:2:34" + }, + "src": "1023:32:34" + }, + { + "id": 4364, + "name": "NotCallableInCurrentPeriod", + "nameLocation": "1066:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4363, + "nodeType": "ParameterList", + "parameters": [], + "src": "1092:2:34" + }, + "src": "1060:35:34" + }, + { + "id": 4366, + "name": "ChangesCurrentPeriod", + "nameLocation": "1106:20:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4365, + "nodeType": "ParameterList", + "parameters": [], + "src": "1126:2:34" + }, + "src": "1100:29:34" + }, + { + "id": 4368, + "name": "AlreadyACouncilMember", + "nameLocation": "1140:21:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4367, + "nodeType": "ParameterList", + "parameters": [], + "src": "1161:2:34" + }, + "src": "1134:30:34" + }, + { + "id": 4370, + "name": "NotACouncilMember", + "nameLocation": "1175:17:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4369, + "nodeType": "ParameterList", + "parameters": [], + "src": "1192:2:34" + }, + "src": "1169:26:34" + }, + { + "id": 4372, + "name": "InvalidMinimumActiveMembers", + "nameLocation": "1206:27:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4371, + "nodeType": "ParameterList", + "parameters": [], + "src": "1233:2:34" + }, + "src": "1200:36:34" + }, + { + "id": 4374, + "name": "CrossDomainMessengerNotSet", + "nameLocation": "1247:26:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1273:2:34" + }, + "src": "1241:35:34" + }, + { + "id": 4376, + "name": "OnlyCrossDomainMessengerCanInvoke", + "nameLocation": "1287:33:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4375, + "nodeType": "ParameterList", + "parameters": [], + "src": "1320:2:34" + }, + "src": "1281:42:34" + }, + { + "id": 4378, + "name": "OnlyCrossDomainUserCanInvoke", + "nameLocation": "1334:28:34", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4377, + "nodeType": "ParameterList", + "parameters": [], + "src": "1362:2:34" + }, + "src": "1328:37:34" + }, + { + "anonymous": false, + "id": 4380, + "name": "ElectionModuleInitialized", + "nameLocation": "1486:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4379, + "nodeType": "ParameterList", + "parameters": [], + "src": "1511:2:34" + }, + "src": "1480:34:34" + }, + { + "anonymous": false, + "id": 4384, + "name": "EpochStarted", + "nameLocation": "1525:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4383, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4382, + "indexed": false, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1543:10:34", + "nodeType": "VariableDeclaration", + "scope": 4384, + "src": "1538:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4381, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1538:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:17:34" + }, + "src": "1519:36:34" + }, + { + "anonymous": false, + "id": 4390, + "name": "CouncilTokenCreated", + "nameLocation": "1566:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4386, + "indexed": false, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "1594:5:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1586:13:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4385, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1586:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4388, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1609:14:34", + "nodeType": "VariableDeclaration", + "scope": 4390, + "src": "1601:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1585:39:34" + }, + "src": "1560:65:34" + }, + { + "anonymous": false, + "id": 4394, + "name": "CouncilTokenUpgraded", + "nameLocation": "1636:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4392, + "indexed": false, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1665:17:34", + "nodeType": "VariableDeclaration", + "scope": 4394, + "src": "1657:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4391, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1657:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1656:27:34" + }, + "src": "1630:54:34" + }, + { + "anonymous": false, + "id": 4400, + "name": "CouncilMemberAdded", + "nameLocation": "1695:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4396, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1730:6:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1714:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4395, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1714:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4398, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1751:10:34", + "nodeType": "VariableDeclaration", + "scope": 4400, + "src": "1738:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4397, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1738:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1713:49:34" + }, + "src": "1689:74:34" + }, + { + "anonymous": false, + "id": 4406, + "name": "CouncilMemberRemoved", + "nameLocation": "1774:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4402, + "indexed": true, + "mutability": "mutable", + "name": "member", + "nameLocation": "1811:6:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1795:22:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1795:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4404, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1832:10:34", + "nodeType": "VariableDeclaration", + "scope": 4406, + "src": "1819:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4403, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1819:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1794:49:34" + }, + "src": "1768:76:34" + }, + { + "anonymous": false, + "id": 4413, + "name": "CouncilMembersDismissed", + "nameLocation": "1855:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4412, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4409, + "indexed": false, + "mutability": "mutable", + "name": "members", + "nameLocation": "1889:7:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1879:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4407, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1879:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4408, + "nodeType": "ArrayTypeName", + "src": "1879:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4411, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1911:10:34", + "nodeType": "VariableDeclaration", + "scope": 4413, + "src": "1898:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4410, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1898:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1878:44:34" + }, + "src": "1849:74:34" + }, + { + "anonymous": false, + "id": 4421, + "name": "EpochScheduleUpdated", + "nameLocation": "1934:20:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4420, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4415, + "indexed": false, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1962:25:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1955:32:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4414, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1955:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4417, + "indexed": false, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1996:21:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "1989:28:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4416, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1989:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4419, + "indexed": false, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2026:12:34", + "nodeType": "VariableDeclaration", + "scope": 4421, + "src": "2019:19:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4418, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2019:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1954:85:34" + }, + "src": "1928:112:34" + }, + { + "anonymous": false, + "id": 4429, + "name": "MinimumEpochDurationsChanged", + "nameLocation": "2051:28:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4428, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4423, + "indexed": false, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "2096:27:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2089:34:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4422, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2089:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4425, + "indexed": false, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "2140:23:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2133:30:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4424, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2133:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4427, + "indexed": false, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "2180:16:34", + "nodeType": "VariableDeclaration", + "scope": 4429, + "src": "2173:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4426, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2173:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2079:123:34" + }, + "src": "2045:158:34" + }, + { + "anonymous": false, + "id": 4433, + "name": "MaxDateAdjustmentToleranceChanged", + "nameLocation": "2214:33:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4431, + "indexed": false, + "mutability": "mutable", + "name": "tolerance", + "nameLocation": "2255:9:34", + "nodeType": "VariableDeclaration", + "scope": 4433, + "src": "2248:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4430, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2248:6:34", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2247:18:34" + }, + "src": "2208:58:34" + }, + { + "anonymous": false, + "id": 4437, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nameLocation": "2277:39:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4435, + "indexed": false, + "mutability": "mutable", + "name": "size", + "nameLocation": "2322:4:34", + "nodeType": "VariableDeclaration", + "scope": 4437, + "src": "2317:9:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4434, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2317:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2316:11:34" + }, + "src": "2271:57:34" + }, + { + "anonymous": false, + "id": 4441, + "name": "NextEpochSeatCountChanged", + "nameLocation": "2339:25:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4440, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4439, + "indexed": false, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "2371:9:34", + "nodeType": "VariableDeclaration", + "scope": 4441, + "src": "2365:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4438, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2365:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2364:17:34" + }, + "src": "2333:49:34" + }, + { + "anonymous": false, + "id": 4445, + "name": "MinimumActiveMembersChanged", + "nameLocation": "2393:27:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4444, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4443, + "indexed": false, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2427:20:34", + "nodeType": "VariableDeclaration", + "scope": 4445, + "src": "2421:26:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4442, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2421:5:34", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2420:28:34" + }, + "src": "2387:62:34" + }, + { + "anonymous": false, + "id": 4451, + "name": "CandidateNominated", + "nameLocation": "2460:18:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4447, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2495:9:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2479:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4446, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2479:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4449, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2519:10:34", + "nodeType": "VariableDeclaration", + "scope": 4451, + "src": "2506:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4448, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2506:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2478:52:34" + }, + "src": "2454:77:34" + }, + { + "anonymous": false, + "id": 4457, + "name": "NominationWithdrawn", + "nameLocation": "2542:19:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4456, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4453, + "indexed": true, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2578:9:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2562:25:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4452, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2562:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4455, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2602:10:34", + "nodeType": "VariableDeclaration", + "scope": 4457, + "src": "2589:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4454, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2589:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2561:52:34" + }, + "src": "2536:78:34" + }, + { + "anonymous": false, + "id": 4467, + "name": "VoteRecorded", + "nameLocation": "2625:12:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4459, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2654:5:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2638:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4458, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2638:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4461, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2677:8:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2661:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4460, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2661:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4463, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2700:10:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2687:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4462, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2687:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4465, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2717:9:34", + "nodeType": "VariableDeclaration", + "scope": 4467, + "src": "2712:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4464, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2637:90:34" + }, + "src": "2619:109:34" + }, + { + "anonymous": false, + "id": 4477, + "name": "VoteWithdrawn", + "nameLocation": "2739:13:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4469, + "indexed": true, + "mutability": "mutable", + "name": "voter", + "nameLocation": "2769:5:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2753:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4468, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2753:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4471, + "indexed": true, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2792:8:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2776:24:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4470, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2776:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4473, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2815:10:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2802:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4472, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2802:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4475, + "indexed": false, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2832:9:34", + "nodeType": "VariableDeclaration", + "scope": 4477, + "src": "2827:14:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4474, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2827:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2752:90:34" + }, + "src": "2733:110:34" + }, + { + "anonymous": false, + "id": 4483, + "name": "ElectionEvaluated", + "nameLocation": "2854:17:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4479, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2885:10:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2872:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4478, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2872:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4481, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "2902:12:34", + "nodeType": "VariableDeclaration", + "scope": 4483, + "src": "2897:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4480, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2897:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2871:44:34" + }, + "src": "2848:68:34" + }, + { + "anonymous": false, + "id": 4491, + "name": "ElectionBatchEvaluated", + "nameLocation": "2927:22:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4485, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2963:10:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2950:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2950:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4487, + "indexed": false, + "mutability": "mutable", + "name": "evaluatedBallots", + "nameLocation": "2980:16:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2975:21:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4486, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2975:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4489, + "indexed": false, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "3003:12:34", + "nodeType": "VariableDeclaration", + "scope": 4491, + "src": "2998:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4488, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2998:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2949:67:34" + }, + "src": "2921:96:34" + }, + { + "anonymous": false, + "id": 4495, + "name": "EmergencyElectionStarted", + "nameLocation": "3028:24:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4493, + "indexed": true, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3066:10:34", + "nodeType": "VariableDeclaration", + "scope": 4495, + "src": "3053:23:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4492, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3053:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3052:25:34" + }, + "src": "3022:56:34" + }, + { + "anonymous": false, + "id": 4499, + "name": "CrossDomainMessengerSet", + "nameLocation": "3089:23:34", + "nodeType": "EventDefinition", + "parameters": { + "id": 4498, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4497, + "indexed": false, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3121:9:34", + "nodeType": "VariableDeclaration", + "scope": 4499, + "src": "3113:17:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4496, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3113:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3112:19:34" + }, + "src": "3083:49:34" + }, + { + "body": { + "id": 4522, + "nodeType": "Block", + "src": "3292:125:34", + "statements": [ + { + "assignments": [ + 4504 + ], + "declarations": [ + { + "constant": false, + "id": 4504, + "mutability": "mutable", + "name": "store", + "nameLocation": "3324:5:34", + "nodeType": "VariableDeclaration", + "scope": 4522, + "src": "3302:27:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4503, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4502, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3302:13:34" + }, + "referencedDeclaration": 4246, + "src": "3302:13:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4507, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4505, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3332:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3332:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3302:46:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4508, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3359:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3359:12:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3359:17:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$returns$_t_struct$_EpochData_$4270_storage_$bound_to$_t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.EpochData storage ref[] storage pointer) returns (struct ElectionStorage.EpochData storage ref)" + } + }, + "id": 4513, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3359:19:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "id": 4514, + "nodeType": "ExpressionStatement", + "src": "3359:19:34" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 4515, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4504, + "src": "3388:5:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4518, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "3388:15:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "3388:20:34", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$returns$_t_struct$_ElectionData_$4299_storage_$bound_to$_t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr_$", + "typeString": "function (struct ElectionStorage.ElectionData storage ref[] storage pointer) returns (struct ElectionStorage.ElectionData storage ref)" + } + }, + "id": 4520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3388:22:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "id": 4521, + "nodeType": "ExpressionStatement", + "src": "3388:22:34" + } + ] + }, + "id": 4523, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "3257:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4500, + "nodeType": "ParameterList", + "parameters": [], + "src": "3272:2:34" + }, + "returnParameters": { + "id": 4501, + "nodeType": "ParameterList", + "parameters": [], + "src": "3292:0:34" + }, + "scope": 4683, + "src": "3248:169:34", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 4535, + "nodeType": "Block", + "src": "3485:58:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4528, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3502:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3502:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3502:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "3502:30:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3535:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3502:34:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4527, + "id": 4534, + "nodeType": "Return", + "src": "3495:41:34" + } + ] + }, + "id": 4536, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpochIndex", + "nameLocation": "3432:21:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4524, + "nodeType": "ParameterList", + "parameters": [], + "src": "3453:2:34" + }, + "returnParameters": { + "id": 4527, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4526, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4536, + "src": "3479:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4525, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3479:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3478:6:34" + }, + "scope": 4683, + "src": "3423:120:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4547, + "nodeType": "Block", + "src": "3619:65:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4543, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3653:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3653:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4542, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3636:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3636:41:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4541, + "id": 4546, + "nodeType": "Return", + "src": "3629:48:34" + } + ] + }, + "id": 4548, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentEpoch", + "nameLocation": "3558:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4537, + "nodeType": "ParameterList", + "parameters": [], + "src": "3574:2:34" + }, + "returnParameters": { + "id": 4541, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4540, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4548, + "src": "3600:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4539, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4538, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3600:9:34" + }, + "referencedDeclaration": 4270, + "src": "3600:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3599:19:34" + }, + "scope": 4683, + "src": "3549:135:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4561, + "nodeType": "Block", + "src": "3761:69:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4555, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "3795:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3795:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 4557, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3795:27:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4554, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "3778:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 4559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3778:45:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "functionReturnParameters": 4553, + "id": 4560, + "nodeType": "Return", + "src": "3771:52:34" + } + ] + }, + "id": 4562, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getPreviousEpoch", + "nameLocation": "3699:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4549, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:2:34" + }, + "returnParameters": { + "id": 4553, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4552, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4562, + "src": "3742:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4551, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4550, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3742:9:34" + }, + "referencedDeclaration": 4270, + "src": "3742:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3741:19:34" + }, + "scope": 4683, + "src": "3690:140:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4576, + "nodeType": "Block", + "src": "3921:59:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4570, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3938:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3938:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "epochs", + "nodeType": "MemberAccess", + "referencedDeclaration": 4236, + "src": "3938:23:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage", + "typeString": "struct ElectionStorage.EpochData storage ref[] storage ref" + } + }, + "id": 4574, + "indexExpression": { + "id": 4573, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4564, + "src": "3962:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3938:35:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage", + "typeString": "struct ElectionStorage.EpochData storage ref" + } + }, + "functionReturnParameters": 4569, + "id": 4575, + "nodeType": "Return", + "src": "3931:42:34" + } + ] + }, + "id": 4577, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochAtIndex", + "nameLocation": "3845:16:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4565, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4564, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "3867:10:34", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3862:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4563, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3862:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3861:17:34" + }, + "returnParameters": { + "id": 4569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4568, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4577, + "src": "3902:17:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 4567, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4566, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3902:9:34" + }, + "referencedDeclaration": 4270, + "src": "3902:9:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "3901:19:34" + }, + "scope": 4683, + "src": "3836:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4588, + "nodeType": "Block", + "src": "4062:68:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4584, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "4099:21:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 4585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4099:23:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4583, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4079:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4079:44:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "functionReturnParameters": 4582, + "id": 4587, + "nodeType": "Return", + "src": "4072:51:34" + } + ] + }, + "id": 4589, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentElection", + "nameLocation": "3995:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4578, + "nodeType": "ParameterList", + "parameters": [], + "src": "4014:2:34" + }, + "returnParameters": { + "id": 4582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4581, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4589, + "src": "4040:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4580, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4579, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4040:12:34" + }, + "referencedDeclaration": 4299, + "src": "4040:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4039:22:34" + }, + "scope": 4683, + "src": "3986:144:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4603, + "nodeType": "Block", + "src": "4227:62:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4597, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "4244:14:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4244:16:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "elections", + "nodeType": "MemberAccess", + "referencedDeclaration": 4240, + "src": "4244:26:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref[] storage ref" + } + }, + "id": 4601, + "indexExpression": { + "id": 4600, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4591, + "src": "4271:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4244:38:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage", + "typeString": "struct ElectionStorage.ElectionData storage ref" + } + }, + "functionReturnParameters": 4596, + "id": 4602, + "nodeType": "Return", + "src": "4237:45:34" + } + ] + }, + "id": 4604, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getElectionAtIndex", + "nameLocation": "4145:19:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4591, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4170:10:34", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4165:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4590, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4165:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4164:17:34" + }, + "returnParameters": { + "id": 4596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4595, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4604, + "src": "4205:20:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 4594, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4593, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "4205:12:34" + }, + "referencedDeclaration": 4299, + "src": "4205:12:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "src": "4204:22:34" + }, + "scope": 4683, + "src": "4136:153:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4618, + "nodeType": "Block", + "src": "4376:67:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4612, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "4393:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4393:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4614, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4393:33:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4616, + "indexExpression": { + "id": 4615, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4606, + "src": "4427:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4393:43:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4611, + "id": 4617, + "nodeType": "Return", + "src": "4386:50:34" + } + ] + }, + "id": 4619, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallot", + "nameLocation": "4304:10:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4607, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4606, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4323:8:34", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4315:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4605, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4315:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4314:18:34" + }, + "returnParameters": { + "id": 4611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4610, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4619, + "src": "4356:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4609, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4608, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4356:10:34" + }, + "referencedDeclaration": 4309, + "src": "4356:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4355:20:34" + }, + "scope": 4683, + "src": "4295:148:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4636, + "nodeType": "Block", + "src": "4554:77:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 4630, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4623, + "src": "4591:10:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4629, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "4571:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:31:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "4571:43:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 4634, + "indexExpression": { + "id": 4633, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4621, + "src": "4615:8:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4571:53:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "functionReturnParameters": 4628, + "id": 4635, + "nodeType": "Return", + "src": "4564:60:34" + } + ] + }, + "id": 4637, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotInEpoch", + "nameLocation": "4458:17:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4624, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4621, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "4484:8:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4476:16:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4620, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4476:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4623, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "4499:10:34", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4494:15:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4622, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4494:4:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4475:35:34" + }, + "returnParameters": { + "id": 4628, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4627, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4637, + "src": "4534:18:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4626, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4625, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4534:10:34" + }, + "referencedDeclaration": 4309, + "src": "4534:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4533:20:34" + }, + "scope": 4683, + "src": "4449:182:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4652, + "nodeType": "Block", + "src": "4726:63:34", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4648, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4640, + "src": "4770:10:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + ], + "expression": { + "id": 4646, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "4753:3:34", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 4647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "4753:16:34", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 4649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4753:28:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 4645, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "4743:9:34", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 4650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4743:39:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4644, + "id": 4651, + "nodeType": "Return", + "src": "4736:46:34" + } + ] + }, + "id": 4653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_calculateBallotId", + "nameLocation": "4646:18:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4640, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "4682:10:34", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4665:27:34", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4638, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4665:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4639, + "nodeType": "ArrayTypeName", + "src": "4665:9:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "4664:29:34" + }, + "returnParameters": { + "id": 4644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4643, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4653, + "src": "4717:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4642, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4717:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4716:9:34" + }, + "scope": 4683, + "src": "4637:152:34", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4667, + "nodeType": "Block", + "src": "4874:53:34", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4665, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "expression": { + "id": 4661, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4656, + "src": "4891:6:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4662, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "4891:17:34", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 4663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "4891:24:34", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 4664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4919:1:34", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4891:29:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4660, + "id": 4666, + "nodeType": "Return", + "src": "4884:36:34" + } + ] + }, + "id": 4668, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ballotExists", + "nameLocation": "4804:13:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4656, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "4837:6:34", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4818:25:34", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 4655, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4654, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "4818:10:34" + }, + "referencedDeclaration": 4309, + "src": "4818:10:34", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "src": "4817:27:34" + }, + "returnParameters": { + "id": 4660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4659, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4668, + "src": "4868:4:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4658, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4868:4:34", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4867:6:34" + }, + "scope": 4683, + "src": "4795:132:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4681, + "nodeType": "Block", + "src": "5004:70:34", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4675, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "5021:19:34", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5021:21:34", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4677, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "5021:40:34", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 4679, + "indexExpression": { + "id": 4678, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "5062:4:34", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5021:46:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4674, + "id": 4680, + "nodeType": "Return", + "src": "5014:53:34" + } + ] + }, + "id": 4682, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getBallotVoted", + "nameLocation": "4942:15:34", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "user", + "nameLocation": "4966:4:34", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4958:12:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4669, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4958:7:34", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "4957:14:34" + }, + "returnParameters": { + "id": 4674, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4673, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4682, + "src": "4995:7:34", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4672, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4995:7:34", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4994:9:34" + }, + "scope": 4683, + "src": "4933:141:34", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4684, + "src": "203:4873:34", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:5046:34" + } + }, + "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressUtil {\n function isContract(address account) internal view returns (bool) {\n uint256 size;\n\n assembly {\n size := extcodesize(account)\n }\n\n return size > 0;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "exportedSymbols": { + "AddressUtil": [ + 1696 + ] + }, + "id": 1697, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1679, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:21" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1696, + "linearizedBaseContracts": [ + 1696 + ], + "name": "AddressUtil", + "nameLocation": "64:11:21", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1694, + "nodeType": "Block", + "src": "148:126:21", + "statements": [ + { + "assignments": [ + 1687 + ], + "declarations": [ + { + "constant": false, + "id": 1687, + "mutability": "mutable", + "name": "size", + "nameLocation": "166:4:21", + "nodeType": "VariableDeclaration", + "scope": 1694, + "src": "158:12:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1686, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "158:7:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 1688, + "nodeType": "VariableDeclarationStatement", + "src": "158:12:21" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "190:52:21", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "204:28:21", + "value": { + "arguments": [ + { + "name": "account", + "nodeType": "YulIdentifier", + "src": "224:7:21" + } + ], + "functionName": { + "name": "extcodesize", + "nodeType": "YulIdentifier", + "src": "212:11:21" + }, + "nodeType": "YulFunctionCall", + "src": "212:20:21" + }, + "variableNames": [ + { + "name": "size", + "nodeType": "YulIdentifier", + "src": "204:4:21" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1681, + "isOffset": false, + "isSlot": false, + "src": "224:7:21", + "valueSize": 1 + }, + { + "declaration": 1687, + "isOffset": false, + "isSlot": false, + "src": "204:4:21", + "valueSize": 1 + } + ], + "id": 1689, + "nodeType": "InlineAssembly", + "src": "181:61:21" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1690, + "name": "size", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1687, + "src": "259:4:21", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "266:1:21", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "259:8:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1685, + "id": 1693, + "nodeType": "Return", + "src": "252:15:21" + } + ] + }, + "id": 1695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isContract", + "nameLocation": "91:10:21", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1681, + "mutability": "mutable", + "name": "account", + "nameLocation": "110:7:21", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "102:15:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "102:7:21", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "101:17:21" + }, + "returnParameters": { + "id": 1685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1695, + "src": "142:4:21", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "142:4:21", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "141:6:21" + }, + "scope": 1696, + "src": "82:192:21", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1697, + "src": "56:220:21", + "usedErrors": [] + } + ], + "src": "31:246:21" + } + }, + "@synthetixio/core-contracts/contracts/errors/ChangeError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ChangeError {\n error NoChange();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "exportedSymbols": { + "ChangeError": [ + 25 + ] + }, + "id": 26, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 22, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:3" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ChangeError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 25, + "linearizedBaseContracts": [ + 25 + ], + "name": "ChangeError", + "nameLocation": "64:11:3", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 24, + "name": "NoChange", + "nameLocation": "88:8:3", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [], + "src": "96:2:3" + }, + "src": "82:17:3" + } + ], + "scope": 26, + "src": "56:45:3", + "usedErrors": [ + 24 + ] + } + ], + "src": "31:71:3" + } + }, + "@synthetixio/core-contracts/contracts/errors/AddressError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AddressError {\n error ZeroAddress();\n error NotAContract(address contr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ] + }, + "id": 16, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 8, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:1" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AddressError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 15, + "linearizedBaseContracts": [ + 15 + ], + "name": "AddressError", + "nameLocation": "64:12:1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 10, + "name": "ZeroAddress", + "nameLocation": "89:11:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "100:2:1" + }, + "src": "83:20:1" + }, + { + "id": 14, + "name": "NotAContract", + "nameLocation": "114:12:1", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 12, + "mutability": "mutable", + "name": "contr", + "nameLocation": "135:5:1", + "nodeType": "VariableDeclaration", + "scope": 14, + "src": "127:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 11, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "127:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "126:15:1" + }, + "src": "108:34:1" + } + ], + "scope": 16, + "src": "56:88:1", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:114:1" + } + }, + "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/utils/SetUtil.sol\";\n\ncontract ElectionStorage {\n struct ElectionStore {\n // True if initializeElectionModule was called\n bool initialized;\n // The address of the council NFT\n address councilToken;\n // Council member addresses\n SetUtil.AddressSet councilMembers;\n // Council token id's by council member address\n mapping(address => uint) councilTokenIds;\n // Array of EpochData's for each epoch\n EpochData[] epochs;\n // Array of ElectionData's for each election\n ElectionData[] elections;\n // Pointer to ElectionSettings\n // To be always used via store.settings[0] to avoid storage collisions\n mapping(uint => ElectionSettings) settings;\n }\n\n struct ElectionSettings {\n // Number of council members in the next epoch\n uint8 nextEpochSeatCount;\n // Minimum active council members. If too many are dismissed an emergency election is triggered\n uint8 minimumActiveMembers;\n // Minimum epoch duration when adjusting schedules\n uint64 minEpochDuration;\n // Minimum nomination period duration when adjusting schedules\n uint64 minNominationPeriodDuration;\n // Minimum voting period duration when adjusting schedules\n uint64 minVotingPeriodDuration;\n // Maximum size for tweaking epoch schedules (see tweakEpochSchedule)\n uint64 maxDateAdjustmentTolerance;\n // Default batch size when calling evaluate() with numBallots = 0\n uint defaultBallotEvaluationBatchSize;\n }\n\n struct EpochData {\n // Date at which the epoch started\n uint64 startDate;\n // Date at which the epoch's voting period will end\n uint64 endDate;\n // Date at which the epoch's nomination period will start\n uint64 nominationPeriodStartDate;\n // Date at which the epoch's voting period will start\n uint64 votingPeriodStartDate;\n }\n\n struct ElectionData {\n // True if ballots have been counted in this election\n bool evaluated;\n // True if NFTs have been re-shuffled in this election\n bool resolved;\n // Number of counted ballots in this election\n uint numEvaluatedBallots;\n // List of nominated candidates in this election\n SetUtil.AddressSet nominees;\n // List of winners of this election (requires evaluation)\n SetUtil.AddressSet winners;\n // List of all ballot ids in this election\n bytes32[] ballotIds;\n // BallotData by ballot id\n mapping(bytes32 => BallotData) ballotsById;\n // Ballot id that each user voted on\n mapping(address => bytes32) ballotIdsByAddress;\n // Number of votes for each candidate\n mapping(address => uint) candidateVotes;\n }\n\n struct BallotData {\n // Total accumulated votes in this ballot (needs evaluation)\n uint votes;\n // List of candidates in this ballot\n address[] candidates;\n // Vote power added per voter\n mapping(address => uint) votesByUser;\n }\n\n function _electionSettings() internal view returns (ElectionSettings storage) {\n return _electionStore().settings[0];\n }\n\n function _electionStore() internal pure returns (ElectionStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.election\")) - 1)\n store.slot := 0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/storage/ElectionStorage.sol", + "exportedSymbols": { + "ElectionStorage": [ + 4331 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 4332, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4220, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:33" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/SetUtil.sol", + "id": 4221, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4332, + "sourceUnit": 2289, + "src": "56:65:33", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ElectionStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4331, + "linearizedBaseContracts": [ + 4331 + ], + "name": "ElectionStorage", + "nameLocation": "132:15:33", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ElectionStorage.ElectionStore", + "id": 4246, + "members": [ + { + "constant": false, + "id": 4223, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "245:11:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "240:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4222, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "240:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4225, + "mutability": "mutable", + "name": "councilToken", + "nameLocation": "316:12:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "308:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4228, + "mutability": "mutable", + "name": "councilMembers", + "nameLocation": "393:14:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "374:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4227, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4226, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "374:18:33" + }, + "referencedDeclaration": 1788, + "src": "374:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4232, + "mutability": "mutable", + "name": "councilTokenIds", + "nameLocation": "498:15:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "473:40:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4231, + "keyType": { + "id": 4229, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "481:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "473:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4230, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "492:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4236, + "mutability": "mutable", + "name": "epochs", + "nameLocation": "582:6:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "570:18:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + }, + "typeName": { + "baseType": { + "id": 4234, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4233, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "570:9:33" + }, + "referencedDeclaration": 4270, + "src": "570:9:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "id": 4235, + "nodeType": "ArrayTypeName", + "src": "570:11:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_EpochData_$4270_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.EpochData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4240, + "mutability": "mutable", + "name": "elections", + "nameLocation": "666:9:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "651:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + }, + "typeName": { + "baseType": { + "id": 4238, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4237, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "651:12:33" + }, + "referencedDeclaration": 4299, + "src": "651:12:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "id": 4239, + "nodeType": "ArrayTypeName", + "src": "651:14:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_ElectionData_$4299_storage_$dyn_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4245, + "mutability": "mutable", + "name": "settings", + "nameLocation": "837:8:33", + "nodeType": "VariableDeclaration", + "scope": 4246, + "src": "803:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "typeName": { + "id": 4244, + "keyType": { + "id": 4241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "811:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "803:33:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings)" + }, + "valueType": { + "id": 4243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4242, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "819:16:33" + }, + "referencedDeclaration": 4261, + "src": "819:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionStore", + "nameLocation": "161:13:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "154:698:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionSettings", + "id": 4261, + "members": [ + { + "constant": false, + "id": 4248, + "mutability": "mutable", + "name": "nextEpochSeatCount", + "nameLocation": "953:18:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "947:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4247, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "947:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4250, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1091:20:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1085:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 4249, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1085:5:33", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4252, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "1187:16:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1180:23:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4251, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1180:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4254, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "1291:27:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1284:34:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4253, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1284:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4256, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "1402:23:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1395:30:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4255, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1395:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4258, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "1520:26:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1513:33:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4257, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1513:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4260, + "mutability": "mutable", + "name": "defaultBallotEvaluationBatchSize", + "nameLocation": "1635:32:33", + "nodeType": "VariableDeclaration", + "scope": 4261, + "src": "1630:37:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4259, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1630:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "name": "ElectionSettings", + "nameLocation": "865:16:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "858:816:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.EpochData", + "id": 4270, + "members": [ + { + "constant": false, + "id": 4263, + "mutability": "mutable", + "name": "startDate", + "nameLocation": "1757:9:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1750:16:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1750:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4265, + "mutability": "mutable", + "name": "endDate", + "nameLocation": "1843:7:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1836:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4264, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1836:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4267, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1933:25:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "1926:32:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4266, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1926:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4269, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2037:21:33", + "nodeType": "VariableDeclaration", + "scope": 4270, + "src": "2030:28:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 4268, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2030:6:33", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "name": "EpochData", + "nameLocation": "1687:9:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "1680:385:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.ElectionData", + "id": 4299, + "members": [ + { + "constant": false, + "id": 4272, + "mutability": "mutable", + "name": "evaluated", + "nameLocation": "2168:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2163:14:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4271, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2163:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4274, + "mutability": "mutable", + "name": "resolved", + "nameLocation": "2255:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2250:13:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4273, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2250:4:33", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4276, + "mutability": "mutable", + "name": "numEvaluatedBallots", + "nameLocation": "2332:19:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2327:24:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4275, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2327:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4279, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "2437:8:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2418:27:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4278, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4277, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2418:18:33" + }, + "referencedDeclaration": 1788, + "src": "2418:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4282, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2540:7:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2521:26:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4281, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4280, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2521:18:33" + }, + "referencedDeclaration": 1788, + "src": "2521:18:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4285, + "mutability": "mutable", + "name": "ballotIds", + "nameLocation": "2618:9:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2608:19:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 4283, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2608:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 4284, + "nodeType": "ArrayTypeName", + "src": "2608:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4290, + "mutability": "mutable", + "name": "ballotsById", + "nameLocation": "2703:11:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2672:42:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "typeName": { + "id": 4289, + "keyType": { + "id": 4286, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2680:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "2672:30:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData)" + }, + "valueType": { + "id": 4288, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4287, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2691:10:33" + }, + "referencedDeclaration": 4309, + "src": "2691:10:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4294, + "mutability": "mutable", + "name": "ballotIdsByAddress", + "nameLocation": "2797:18:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2769:46:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "typeName": { + "id": 4293, + "keyType": { + "id": 4291, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2777:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2769:27:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "valueType": { + "id": 4292, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2788:7:33", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4298, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2896:14:33", + "nodeType": "VariableDeclaration", + "scope": 4299, + "src": "2871:39:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4297, + "keyType": { + "id": 4295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2879:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2871:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4296, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2890:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "ElectionData", + "nameLocation": "2078:12:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2071:846:33", + "visibility": "public" + }, + { + "canonicalName": "ElectionStorage.BallotData", + "id": 4309, + "members": [ + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "votes", + "nameLocation": "3025:5:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3020:10:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4300, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3020:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4304, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3095:10:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3085:20:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3085:7:33", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4303, + "nodeType": "ArrayTypeName", + "src": "3085:9:33", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4308, + "mutability": "mutable", + "name": "votesByUser", + "nameLocation": "3178:11:33", + "nodeType": "VariableDeclaration", + "scope": 4309, + "src": "3153:36:33", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 4307, + "keyType": { + "id": 4305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3161:7:33", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "3153:24:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 4306, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3172:4:33", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + } + ], + "name": "BallotData", + "nameLocation": "2930:10:33", + "nodeType": "StructDefinition", + "scope": 4331, + "src": "2923:273:33", + "visibility": "public" + }, + { + "body": { + "id": 4321, + "nodeType": "Block", + "src": "3280:52:33", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4315, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3297:14:33", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3297:16:33", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "settings", + "nodeType": "MemberAccess", + "referencedDeclaration": 4245, + "src": "3297:25:33", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_ElectionSettings_$4261_storage_$", + "typeString": "mapping(uint256 => struct ElectionStorage.ElectionSettings storage ref)" + } + }, + "id": 4319, + "indexExpression": { + "hexValue": "30", + "id": 4318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3323:1:33", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3297:28:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage", + "typeString": "struct ElectionStorage.ElectionSettings storage ref" + } + }, + "functionReturnParameters": 4314, + "id": 4320, + "nodeType": "Return", + "src": "3290:35:33" + } + ] + }, + "id": 4322, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionSettings", + "nameLocation": "3211:17:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4310, + "nodeType": "ParameterList", + "parameters": [], + "src": "3228:2:33" + }, + "returnParameters": { + "id": 4314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4313, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4322, + "src": "3254:24:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 4312, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4311, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3254:16:33" + }, + "referencedDeclaration": 4261, + "src": "3254:16:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "src": "3253:26:33" + }, + "scope": 4331, + "src": "3202:130:33", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4329, + "nodeType": "Block", + "src": "3416:198:33", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "3435:173:33", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3518:80:33", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3532:66:33", + "type": "", + "value": "0x4a7bae7406c7467d50a80c6842d6ba8287c729469098e48fc594351749ba4b22" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "3518:10:33" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 4326, + "isOffset": false, + "isSlot": true, + "src": "3518:10:33", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 4328, + "nodeType": "InlineAssembly", + "src": "3426:182:33" + } + ] + }, + "id": 4330, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_electionStore", + "nameLocation": "3347:14:33", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4323, + "nodeType": "ParameterList", + "parameters": [], + "src": "3361:2:33" + }, + "returnParameters": { + "id": 4327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4326, + "mutability": "mutable", + "name": "store", + "nameLocation": "3409:5:33", + "nodeType": "VariableDeclaration", + "scope": 4330, + "src": "3387:27:33", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4325, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4324, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "3387:13:33" + }, + "referencedDeclaration": 4246, + "src": "3387:13:33", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "src": "3386:29:33" + }, + "scope": 4331, + "src": "3338:276:33", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4332, + "src": "123:3493:33", + "usedErrors": [] + } + ], + "src": "31:3586:33" + } + }, + "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../../storage/DebtShareStorage.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\nimport \"@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol\";\n\n/// @dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number\ncontract DebtShareManager is ElectionBase, DebtShareStorage {\n error DebtShareContractNotSet();\n error DebtShareSnapshotIdNotSet();\n\n event DebtShareContractSet(address contractAddress);\n event DebtShareSnapshotIdSet(uint snapshotId);\n\n function _setDebtShareSnapshotId(uint snapshotId) internal {\n DebtShareStore storage store = _debtShareStore();\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n store.debtShareIds[currentEpochIndex] = uint128(snapshotId);\n\n emit DebtShareSnapshotIdSet(snapshotId);\n }\n\n function _getDebtShareSnapshotId() internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n if (debtShareId == 0) {\n revert DebtShareSnapshotIdNotSet();\n }\n\n return debtShareId;\n }\n\n function _setDebtShareContract(address newDebtShareContractAddress) internal {\n DebtShareStore storage store = _debtShareStore();\n\n if (newDebtShareContractAddress == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newDebtShareContractAddress == address(store.debtShareContract)) {\n revert ChangeError.NoChange();\n }\n\n if (!AddressUtil.isContract(newDebtShareContractAddress)) {\n revert AddressError.NotAContract(newDebtShareContractAddress);\n }\n\n store.debtShareContract = IDebtShare(newDebtShareContractAddress);\n }\n\n function _getDebtShare(address user) internal view returns (uint) {\n DebtShareStore storage store = _debtShareStore();\n\n uint128 debtShareId = store.debtShareIds[_getCurrentEpochIndex()];\n\n return store.debtShareContract.balanceOfOnPeriod(user, uint(debtShareId));\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "DebtShareManager": [ + 7199 + ], + "DebtShareStorage": [ + 6681 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ICrossDomainMessenger": [ + 6416 + ], + "IDebtShare": [ + 6428 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 7200, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7022, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:46" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/storage/DebtShareStorage.sol", + "file": "../../storage/DebtShareStorage.sol", + "id": 7023, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7200, + "sourceUnit": 6682, + "src": "56:44:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 7024, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7200, + "sourceUnit": 1697, + "src": "101:69:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 7025, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7200, + "sourceUnit": 26, + "src": "171:70:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 7026, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7200, + "sourceUnit": 16, + "src": "242:71:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "id": 7027, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7200, + "sourceUnit": 4684, + "src": "314:82:46", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7029, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "521:12:46" + }, + "id": 7030, + "nodeType": "InheritanceSpecifier", + "src": "521:12:46" + }, + { + "baseName": { + "id": 7031, + "name": "DebtShareStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6681, + "src": "535:16:46" + }, + "id": 7032, + "nodeType": "InheritanceSpecifier", + "src": "535:16:46" + } + ], + "canonicalName": "DebtShareManager", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 7028, + "nodeType": "StructuredDocumentation", + "src": "398:94:46", + "text": "@dev Tracks user Synthetix v2 debt chains on the local chain at a particular block number" + }, + "fullyImplemented": true, + "id": 7199, + "linearizedBaseContracts": [ + 7199, + 6681, + 4683, + 4331 + ], + "name": "DebtShareManager", + "nameLocation": "501:16:46", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 7034, + "name": "DebtShareContractNotSet", + "nameLocation": "564:23:46", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 7033, + "nodeType": "ParameterList", + "parameters": [], + "src": "587:2:46" + }, + "src": "558:32:46" + }, + { + "id": 7036, + "name": "DebtShareSnapshotIdNotSet", + "nameLocation": "601:25:46", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 7035, + "nodeType": "ParameterList", + "parameters": [], + "src": "626:2:46" + }, + "src": "595:34:46" + }, + { + "anonymous": false, + "id": 7040, + "name": "DebtShareContractSet", + "nameLocation": "641:20:46", + "nodeType": "EventDefinition", + "parameters": { + "id": 7039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7038, + "indexed": false, + "mutability": "mutable", + "name": "contractAddress", + "nameLocation": "670:15:46", + "nodeType": "VariableDeclaration", + "scope": 7040, + "src": "662:23:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "661:25:46" + }, + "src": "635:52:46" + }, + { + "anonymous": false, + "id": 7044, + "name": "DebtShareSnapshotIdSet", + "nameLocation": "698:22:46", + "nodeType": "EventDefinition", + "parameters": { + "id": 7043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7042, + "indexed": false, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "726:10:46", + "nodeType": "VariableDeclaration", + "scope": 7044, + "src": "721:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7041, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "721:4:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "720:17:46" + }, + "src": "692:46:46" + }, + { + "body": { + "id": 7075, + "nodeType": "Block", + "src": "803:243:46", + "statements": [ + { + "assignments": [ + 7051 + ], + "declarations": [ + { + "constant": false, + "id": 7051, + "mutability": "mutable", + "name": "store", + "nameLocation": "836:5:46", + "nodeType": "VariableDeclaration", + "scope": 7075, + "src": "813:28:46", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7050, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7049, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6663, + "src": "813:14:46" + }, + "referencedDeclaration": 6663, + "src": "813:14:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7054, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7052, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "844:15:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7053, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "844:17:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "813:48:46" + }, + { + "assignments": [ + 7056 + ], + "declarations": [ + { + "constant": false, + "id": 7056, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "877:17:46", + "nodeType": "VariableDeclaration", + "scope": 7075, + "src": "872:22:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7055, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "872:4:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 7059, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7057, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "897:21:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "897:23:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "872:48:46" + }, + { + "expression": { + "id": 7069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 7060, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7051, + "src": "930:5:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7063, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6655, + "src": "930:18:46", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7064, + "indexExpression": { + "id": 7062, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7056, + "src": "949:17:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "930:37:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7067, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "978:10:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "970:7:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 7065, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "970:7:46", + "typeDescriptions": {} + } + }, + "id": 7068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:19:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "930:59:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 7070, + "nodeType": "ExpressionStatement", + "src": "930:59:46" + }, + { + "eventCall": { + "arguments": [ + { + "id": 7072, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7046, + "src": "1028:10:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 7071, + "name": "DebtShareSnapshotIdSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7044, + "src": "1005:22:46", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 7073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1005:34:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7074, + "nodeType": "EmitStatement", + "src": "1000:39:46" + } + ] + }, + "id": 7076, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareSnapshotId", + "nameLocation": "753:23:46", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7046, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "782:10:46", + "nodeType": "VariableDeclaration", + "scope": 7076, + "src": "777:15:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7045, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "777:4:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "776:17:46" + }, + "returnParameters": { + "id": 7048, + "nodeType": "ParameterList", + "parameters": [], + "src": "803:0:46" + }, + "scope": 7199, + "src": "744:302:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7105, + "nodeType": "Block", + "src": "1116:260:46", + "statements": [ + { + "assignments": [ + 7083 + ], + "declarations": [ + { + "constant": false, + "id": 7083, + "mutability": "mutable", + "name": "store", + "nameLocation": "1149:5:46", + "nodeType": "VariableDeclaration", + "scope": 7105, + "src": "1126:28:46", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7082, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7081, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6663, + "src": "1126:14:46" + }, + "referencedDeclaration": 6663, + "src": "1126:14:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7086, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7084, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "1157:15:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1157:17:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1126:48:46" + }, + { + "assignments": [ + 7088 + ], + "declarations": [ + { + "constant": false, + "id": 7088, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "1193:11:46", + "nodeType": "VariableDeclaration", + "scope": 7105, + "src": "1185:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7087, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "1185:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7094, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7089, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7083, + "src": "1207:5:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7090, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6655, + "src": "1207:18:46", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7093, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7091, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "1226:21:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1226:23:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1207:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1185:65:46" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "id": 7097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7095, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7088, + "src": "1264:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 7096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1279:1:46", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1264:16:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7102, + "nodeType": "IfStatement", + "src": "1260:81:46", + "trueBody": { + "id": 7101, + "nodeType": "Block", + "src": "1282:59:46", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7098, + "name": "DebtShareSnapshotIdNotSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7036, + "src": "1303:25:46", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1303:27:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7100, + "nodeType": "RevertStatement", + "src": "1296:34:46" + } + ] + } + }, + { + "expression": { + "id": 7103, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7088, + "src": "1358:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "functionReturnParameters": 7080, + "id": 7104, + "nodeType": "Return", + "src": "1351:18:46" + } + ] + }, + "id": 7106, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShareSnapshotId", + "nameLocation": "1061:23:46", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7077, + "nodeType": "ParameterList", + "parameters": [], + "src": "1084:2:46" + }, + "returnParameters": { + "id": 7080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7079, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7106, + "src": "1110:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7078, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1110:4:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1109:6:46" + }, + "scope": 7199, + "src": "1052:324:46", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7165, + "nodeType": "Block", + "src": "1459:543:46", + "statements": [ + { + "assignments": [ + 7113 + ], + "declarations": [ + { + "constant": false, + "id": 7113, + "mutability": "mutable", + "name": "store", + "nameLocation": "1492:5:46", + "nodeType": "VariableDeclaration", + "scope": 7165, + "src": "1469:28:46", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7112, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7111, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6663, + "src": "1469:14:46" + }, + "referencedDeclaration": 6663, + "src": "1469:14:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7116, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7114, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "1500:15:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1500:17:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1469:48:46" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7117, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7108, + "src": "1532:27:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 7120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1571:1:46", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 7119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1563:7:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1563:7:46", + "typeDescriptions": {} + } + }, + "id": 7121, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1563:10:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1532:41:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7129, + "nodeType": "IfStatement", + "src": "1528:105:46", + "trueBody": { + "id": 7128, + "nodeType": "Block", + "src": "1575:58:46", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7123, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1596:12:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7125, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1596:24:46", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1596:26:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7127, + "nodeType": "RevertStatement", + "src": "1589:33:46" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 7136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 7130, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7108, + "src": "1647:27:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "expression": { + "id": 7133, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7113, + "src": "1686:5:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6652, + "src": "1686:23:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + ], + "id": 7132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1678:7:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 7131, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1678:7:46", + "typeDescriptions": {} + } + }, + "id": 7135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1678:32:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1647:63:46", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7143, + "nodeType": "IfStatement", + "src": "1643:123:46", + "trueBody": { + "id": 7142, + "nodeType": "Block", + "src": "1712:54:46", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 7137, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1733:11:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 7139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1733:20:46", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 7140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1733:22:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7141, + "nodeType": "RevertStatement", + "src": "1726:29:46" + } + ] + } + }, + { + "condition": { + "id": 7148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1780:52:46", + "subExpression": { + "arguments": [ + { + "id": 7146, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7108, + "src": "1804:27:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7144, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "1781:11:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 7145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "1781:22:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 7147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1781:51:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 7156, + "nodeType": "IfStatement", + "src": "1776:144:46", + "trueBody": { + "id": 7155, + "nodeType": "Block", + "src": "1834:86:46", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 7152, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7108, + "src": "1881:27:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 7149, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1855:12:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 7151, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "1855:25:46", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 7153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1855:54:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7154, + "nodeType": "RevertStatement", + "src": "1848:61:46" + } + ] + } + }, + { + "expression": { + "id": 7163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 7157, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7113, + "src": "1930:5:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7159, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6652, + "src": "1930:23:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 7161, + "name": "newDebtShareContractAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7108, + "src": "1967:27:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7160, + "name": "IDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6428, + "src": "1956:10:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IDebtShare_$6428_$", + "typeString": "type(contract IDebtShare)" + } + }, + "id": 7162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1956:39:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "src": "1930:65:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7164, + "nodeType": "ExpressionStatement", + "src": "1930:65:46" + } + ] + }, + "id": 7166, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setDebtShareContract", + "nameLocation": "1391:21:46", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7108, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "1421:27:46", + "nodeType": "VariableDeclaration", + "scope": 7166, + "src": "1413:35:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7107, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1413:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1412:37:46" + }, + "returnParameters": { + "id": 7110, + "nodeType": "ParameterList", + "parameters": [], + "src": "1459:0:46" + }, + "scope": 7199, + "src": "1382:620:46", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 7197, + "nodeType": "Block", + "src": "2074:225:46", + "statements": [ + { + "assignments": [ + 7175 + ], + "declarations": [ + { + "constant": false, + "id": 7175, + "mutability": "mutable", + "name": "store", + "nameLocation": "2107:5:46", + "nodeType": "VariableDeclaration", + "scope": 7197, + "src": "2084:28:46", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 7174, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 7173, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6663, + "src": "2084:14:46" + }, + "referencedDeclaration": 6663, + "src": "2084:14:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 7178, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7176, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6680, + "src": "2115:15:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6663_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 7177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2115:17:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2084:48:46" + }, + { + "assignments": [ + 7180 + ], + "declarations": [ + { + "constant": false, + "id": 7180, + "mutability": "mutable", + "name": "debtShareId", + "nameLocation": "2151:11:46", + "nodeType": "VariableDeclaration", + "scope": 7197, + "src": "2143:19:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 7179, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "2143:7:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "visibility": "internal" + } + ], + "id": 7186, + "initialValue": { + "baseExpression": { + "expression": { + "id": 7181, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7175, + "src": "2165:5:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7182, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6655, + "src": "2165:18:46", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 7185, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 7183, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "2184:21:46", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 7184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2184:23:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2165:43:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2143:65:46" + }, + { + "expression": { + "arguments": [ + { + "id": 7190, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7168, + "src": "2268:4:46", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 7193, + "name": "debtShareId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7180, + "src": "2279:11:46", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + ], + "id": 7192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2274:4:46", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 7191, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2274:4:46", + "typeDescriptions": {} + } + }, + "id": 7194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2274:17:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "expression": { + "id": 7187, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7175, + "src": "2226:5:46", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6663_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 7188, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6652, + "src": "2226:23:46", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6428", + "typeString": "contract IDebtShare" + } + }, + "id": 7189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOfOnPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 6427, + "src": "2226:41:46", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (address,uint256) view external returns (uint256)" + } + }, + "id": 7195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2226:66:46", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7172, + "id": 7196, + "nodeType": "Return", + "src": "2219:73:46" + } + ] + }, + "id": 7198, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getDebtShare", + "nameLocation": "2017:13:46", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7168, + "mutability": "mutable", + "name": "user", + "nameLocation": "2039:4:46", + "nodeType": "VariableDeclaration", + "scope": 7198, + "src": "2031:12:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7167, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2031:7:46", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2030:14:46" + }, + "returnParameters": { + "id": 7172, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7171, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7198, + "src": "2068:4:46", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7170, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2068:4:46", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2067:6:46" + }, + "scope": 7199, + "src": "2008:291:46", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7200, + "src": "492:1809:46", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378, + 7034, + 7036 + ] + } + ], + "src": "31:2271:46" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\n\n/// @dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()\ncontract ElectionTally is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _evaluateNextBallotBatch(uint numBallots) internal {\n if (numBallots == 0) {\n numBallots = _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n ElectionData storage election = _getCurrentElection();\n uint totalBallots = election.ballotIds.length;\n\n uint firstBallotIndex = election.numEvaluatedBallots;\n\n uint lastBallotIndex = firstBallotIndex + numBallots;\n if (lastBallotIndex > totalBallots) {\n lastBallotIndex = totalBallots;\n }\n\n _evaluateBallotRange(election, firstBallotIndex, lastBallotIndex);\n }\n\n function _evaluateBallotRange(\n ElectionData storage election,\n uint fromIndex,\n uint toIndex\n ) private {\n ElectionSettings storage settings = _electionSettings();\n uint numSeats = settings.nextEpochSeatCount;\n\n for (uint ballotIndex = fromIndex; ballotIndex < toIndex; ballotIndex++) {\n bytes32 ballotId = election.ballotIds[ballotIndex];\n BallotData storage ballot = election.ballotsById[ballotId];\n\n _evaluateBallot(election, ballot, numSeats);\n }\n }\n\n function _evaluateBallot(\n ElectionData storage election,\n BallotData storage ballot,\n uint numSeats\n ) internal {\n uint ballotVotes = ballot.votes;\n\n uint numCandidates = ballot.candidates.length;\n for (uint candidateIndex = 0; candidateIndex < numCandidates; candidateIndex++) {\n address candidate = ballot.candidates[candidateIndex];\n\n uint currentCandidateVotes = election.candidateVotes[candidate];\n uint newCandidateVotes = currentCandidateVotes + ballotVotes;\n election.candidateVotes[candidate] = newCandidateVotes;\n\n _updateWinnerSet(election, candidate, newCandidateVotes, numSeats);\n }\n\n election.numEvaluatedBallots += 1;\n }\n\n function _updateWinnerSet(\n ElectionData storage election,\n address candidate,\n uint candidateVotes,\n uint numSeats\n ) private {\n SetUtil.AddressSet storage winners = election.winners;\n\n // Already a winner?\n if (winners.contains(candidate)) {\n return;\n }\n\n // Just take first empty seat if\n // the set is not complete yet.\n if (winners.length() < numSeats) {\n winners.add(candidate);\n\n return;\n }\n\n // Otherwise, replace the winner with the least votes\n // in the set.\n (address leastVotedWinner, uint leastVotes) = _findWinnerWithLeastVotes(election, winners);\n\n if (candidateVotes > leastVotes) {\n winners.replace(leastVotedWinner, candidate);\n }\n }\n\n function _findWinnerWithLeastVotes(ElectionData storage election, SetUtil.AddressSet storage winners)\n private\n view\n returns (address leastVotedWinner, uint leastVotes)\n {\n leastVotes = type(uint).max;\n\n uint numWinners = winners.length();\n\n for (uint8 winnerPosition = 1; winnerPosition <= numWinners; winnerPosition++) {\n address winner = winners.valueAt(winnerPosition);\n uint winnerVotes = election.candidateVotes[winner];\n\n if (winnerVotes < leastVotes) {\n leastVotes = winnerVotes;\n\n leastVotedWinner = winner;\n }\n }\n\n return (leastVotedWinner, leastVotes);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5962, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5632, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:37" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5633, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5962, + "sourceUnit": 4684, + "src": "56:28:37", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5635, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "211:12:37" + }, + "id": 5636, + "nodeType": "InheritanceSpecifier", + "src": "211:12:37" + } + ], + "canonicalName": "ElectionTally", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5634, + "nodeType": "StructuredDocumentation", + "src": "86:99:37", + "text": "@dev Defines core vote-counting / ballot-processing functionality in ElectionModule.evaluate()" + }, + "fullyImplemented": true, + "id": 5961, + "linearizedBaseContracts": [ + 5961, + 4683, + 4331 + ], + "name": "ElectionTally", + "nameLocation": "194:13:37", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5640, + "libraryName": { + "id": 5637, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "236:7:37" + }, + "nodeType": "UsingForDirective", + "src": "230:37:37", + "typeName": { + "id": 5639, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5638, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "248:18:37" + }, + "referencedDeclaration": 1788, + "src": "248:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 5694, + "nodeType": "Block", + "src": "333:548:37", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5645, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "347:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "361:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "347:15:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5655, + "nodeType": "IfStatement", + "src": "343:111:37", + "trueBody": { + "id": 5654, + "nodeType": "Block", + "src": "364:90:37", + "statements": [ + { + "expression": { + "id": 5652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5648, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "378:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5649, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "391:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "391:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5651, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "391:52:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "378:65:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5653, + "nodeType": "ExpressionStatement", + "src": "378:65:37" + } + ] + } + }, + { + "assignments": [ + 5658 + ], + "declarations": [ + { + "constant": false, + "id": 5658, + "mutability": "mutable", + "name": "election", + "nameLocation": "485:8:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "464:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5657, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5656, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "464:12:37" + }, + "referencedDeclaration": 4299, + "src": "464:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 5661, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5659, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "496:19:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 5660, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "496:21:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "464:53:37" + }, + { + "assignments": [ + 5663 + ], + "declarations": [ + { + "constant": false, + "id": 5663, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "532:12:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "527:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5662, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "527:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5667, + "initialValue": { + "expression": { + "expression": { + "id": 5664, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "547:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5665, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "547:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "547:25:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "527:45:37" + }, + { + "assignments": [ + 5669 + ], + "declarations": [ + { + "constant": false, + "id": 5669, + "mutability": "mutable", + "name": "firstBallotIndex", + "nameLocation": "588:16:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "583:21:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5668, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "583:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5672, + "initialValue": { + "expression": { + "id": 5670, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "607:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5671, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "607:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "583:52:37" + }, + { + "assignments": [ + 5674 + ], + "declarations": [ + { + "constant": false, + "id": 5674, + "mutability": "mutable", + "name": "lastBallotIndex", + "nameLocation": "651:15:37", + "nodeType": "VariableDeclaration", + "scope": 5694, + "src": "646:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5673, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5678, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5675, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "669:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5676, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5642, + "src": "688:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "669:29:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "646:52:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5679, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "712:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5680, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "730:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "712:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5687, + "nodeType": "IfStatement", + "src": "708:91:37", + "trueBody": { + "id": 5686, + "nodeType": "Block", + "src": "744:55:37", + "statements": [ + { + "expression": { + "id": 5684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5682, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "758:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5683, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5663, + "src": "776:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "758:30:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5685, + "nodeType": "ExpressionStatement", + "src": "758:30:37" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5689, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5658, + "src": "830:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5690, + "name": "firstBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5669, + "src": "840:16:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5691, + "name": "lastBallotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5674, + "src": "858:15:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5688, + "name": "_evaluateBallotRange", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5750, + "src": "809:20:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,uint256,uint256)" + } + }, + "id": 5692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "809:65:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5693, + "nodeType": "ExpressionStatement", + "src": "809:65:37" + } + ] + }, + "id": 5695, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateNextBallotBatch", + "nameLocation": "282:24:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5643, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5642, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "312:10:37", + "nodeType": "VariableDeclaration", + "scope": 5695, + "src": "307:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5641, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "307:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "306:17:37" + }, + "returnParameters": { + "id": 5644, + "nodeType": "ParameterList", + "parameters": [], + "src": "333:0:37" + }, + "scope": 5961, + "src": "273:608:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5749, + "nodeType": "Block", + "src": "1016:413:37", + "statements": [ + { + "assignments": [ + 5707 + ], + "declarations": [ + { + "constant": false, + "id": 5707, + "mutability": "mutable", + "name": "settings", + "nameLocation": "1051:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1026:33:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5706, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5705, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1026:16:37" + }, + "referencedDeclaration": 4261, + "src": "1026:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5708, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "1062:17:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1062:19:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1026:55:37" + }, + { + "assignments": [ + 5712 + ], + "declarations": [ + { + "constant": false, + "id": 5712, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1096:8:37", + "nodeType": "VariableDeclaration", + "scope": 5749, + "src": "1091:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5711, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1091:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5715, + "initialValue": { + "expression": { + "id": 5713, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5707, + "src": "1107:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5714, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "1107:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1091:43:37" + }, + { + "body": { + "id": 5747, + "nodeType": "Block", + "src": "1218:205:37", + "statements": [ + { + "assignments": [ + 5727 + ], + "declarations": [ + { + "constant": false, + "id": 5727, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1240:8:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1232:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 5726, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1232:7:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 5732, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5728, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1251:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1251:18:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 5731, + "indexExpression": { + "id": 5730, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1270:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1251:31:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1232:50:37" + }, + { + "assignments": [ + 5735 + ], + "declarations": [ + { + "constant": false, + "id": 5735, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1315:6:37", + "nodeType": "VariableDeclaration", + "scope": 5747, + "src": "1296:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5734, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5733, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1296:10:37" + }, + "referencedDeclaration": 4309, + "src": "1296:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 5740, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5736, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1324:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5737, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotsById", + "nodeType": "MemberAccess", + "referencedDeclaration": 4290, + "src": "1324:20:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_BallotData_$4309_storage_$", + "typeString": "mapping(bytes32 => struct ElectionStorage.BallotData storage ref)" + } + }, + "id": 5739, + "indexExpression": { + "id": 5738, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5727, + "src": "1345:8:37", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1324:30:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage", + "typeString": "struct ElectionStorage.BallotData storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1296:58:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5742, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5698, + "src": "1385:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5743, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5735, + "src": "1395:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + { + "id": 5744, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5712, + "src": "1403:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5741, + "name": "_evaluateBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5826, + "src": "1369:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_BallotData_$4309_storage_ptr_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct ElectionStorage.BallotData storage pointer,uint256)" + } + }, + "id": 5745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1369:43:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5746, + "nodeType": "ExpressionStatement", + "src": "1369:43:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5720, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1180:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5721, + "name": "toIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5702, + "src": "1194:7:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1180:21:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5748, + "initializationExpression": { + "assignments": [ + 5717 + ], + "declarations": [ + { + "constant": false, + "id": 5717, + "mutability": "mutable", + "name": "ballotIndex", + "nameLocation": "1155:11:37", + "nodeType": "VariableDeclaration", + "scope": 5748, + "src": "1150:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5716, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1150:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5719, + "initialValue": { + "id": 5718, + "name": "fromIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5700, + "src": "1169:9:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1150:28:37" + }, + "loopExpression": { + "expression": { + "id": 5724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1203:13:37", + "subExpression": { + "id": 5723, + "name": "ballotIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5717, + "src": "1203:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5725, + "nodeType": "ExpressionStatement", + "src": "1203:13:37" + }, + "nodeType": "ForStatement", + "src": "1145:278:37" + } + ] + }, + "id": 5750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallotRange", + "nameLocation": "896:20:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5703, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5698, + "mutability": "mutable", + "name": "election", + "nameLocation": "947:8:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "926:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5697, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5696, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "926:12:37" + }, + "referencedDeclaration": 4299, + "src": "926:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5700, + "mutability": "mutable", + "name": "fromIndex", + "nameLocation": "970:9:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "965:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5699, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "965:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5702, + "mutability": "mutable", + "name": "toIndex", + "nameLocation": "994:7:37", + "nodeType": "VariableDeclaration", + "scope": 5750, + "src": "989:12:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5701, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "989:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "916:91:37" + }, + "returnParameters": { + "id": 5704, + "nodeType": "ParameterList", + "parameters": [], + "src": "1016:0:37" + }, + "scope": 5961, + "src": "887:542:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5825, + "nodeType": "Block", + "src": "1572:616:37", + "statements": [ + { + "assignments": [ + 5762 + ], + "declarations": [ + { + "constant": false, + "id": 5762, + "mutability": "mutable", + "name": "ballotVotes", + "nameLocation": "1587:11:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1582:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5761, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1582:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5765, + "initialValue": { + "expression": { + "id": 5763, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1601:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5764, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1601:12:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1582:31:37" + }, + { + "assignments": [ + 5767 + ], + "declarations": [ + { + "constant": false, + "id": 5767, + "mutability": "mutable", + "name": "numCandidates", + "nameLocation": "1629:13:37", + "nodeType": "VariableDeclaration", + "scope": 5825, + "src": "1624:18:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5766, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1624:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5771, + "initialValue": { + "expression": { + "expression": { + "id": 5768, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1645:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1645:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1645:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1624:45:37" + }, + { + "body": { + "id": 5817, + "nodeType": "Block", + "src": "1759:379:37", + "statements": [ + { + "assignments": [ + 5783 + ], + "declarations": [ + { + "constant": false, + "id": 5783, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1781:9:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1773:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5782, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1773:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5788, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5784, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5756, + "src": "1793:6:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 5785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1793:17:37", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 5787, + "indexExpression": { + "id": 5786, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1811:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1793:33:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1773:53:37" + }, + { + "assignments": [ + 5790 + ], + "declarations": [ + { + "constant": false, + "id": 5790, + "mutability": "mutable", + "name": "currentCandidateVotes", + "nameLocation": "1846:21:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1841:26:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1841:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5795, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5791, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1870:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1870:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5794, + "indexExpression": { + "id": 5793, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "1894:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1870:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1841:63:37" + }, + { + "assignments": [ + 5797 + ], + "declarations": [ + { + "constant": false, + "id": 5797, + "mutability": "mutable", + "name": "newCandidateVotes", + "nameLocation": "1923:17:37", + "nodeType": "VariableDeclaration", + "scope": 5817, + "src": "1918:22:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5796, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1918:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5801, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5798, + "name": "currentCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5790, + "src": "1943:21:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5799, + "name": "ballotVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5762, + "src": "1967:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1943:35:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1918:60:37" + }, + { + "expression": { + "id": 5808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5802, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "1992:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "1992:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5806, + "indexExpression": { + "id": 5804, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2016:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1992:34:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5807, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2029:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1992:54:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5809, + "nodeType": "ExpressionStatement", + "src": "1992:54:37" + }, + { + "expression": { + "arguments": [ + { + "id": 5811, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2078:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5812, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5783, + "src": "2088:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5813, + "name": "newCandidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5797, + "src": "2099:17:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 5814, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5758, + "src": "2118:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5810, + "name": "_updateWinnerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5889, + "src": "2061:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ElectionData_$4299_storage_ptr_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,address,uint256,uint256)" + } + }, + "id": 5815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2061:66:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5816, + "nodeType": "ExpressionStatement", + "src": "2061:66:37" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5776, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1709:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5777, + "name": "numCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5767, + "src": "1726:13:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1709:30:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5818, + "initializationExpression": { + "assignments": [ + 5773 + ], + "declarations": [ + { + "constant": false, + "id": 5773, + "mutability": "mutable", + "name": "candidateIndex", + "nameLocation": "1689:14:37", + "nodeType": "VariableDeclaration", + "scope": 5818, + "src": "1684:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1684:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5775, + "initialValue": { + "hexValue": "30", + "id": 5774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1706:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1684:23:37" + }, + "loopExpression": { + "expression": { + "id": 5780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1741:16:37", + "subExpression": { + "id": 5779, + "name": "candidateIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5773, + "src": "1741:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5781, + "nodeType": "ExpressionStatement", + "src": "1741:16:37" + }, + "nodeType": "ForStatement", + "src": "1679:459:37" + }, + { + "expression": { + "id": 5823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5819, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5753, + "src": "2148:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5821, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "2148:28:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 5822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2180:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2148:33:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5824, + "nodeType": "ExpressionStatement", + "src": "2148:33:37" + } + ] + }, + "id": 5826, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_evaluateBallot", + "nameLocation": "1444:15:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5759, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5753, + "mutability": "mutable", + "name": "election", + "nameLocation": "1490:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1469:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5752, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5751, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1469:12:37" + }, + "referencedDeclaration": 4299, + "src": "1469:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5756, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1527:6:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1508:25:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 5755, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5754, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1508:10:37" + }, + "referencedDeclaration": 4309, + "src": "1508:10:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5758, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "1548:8:37", + "nodeType": "VariableDeclaration", + "scope": 5826, + "src": "1543:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5757, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1543:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1459:103:37" + }, + "returnParameters": { + "id": 5760, + "nodeType": "ParameterList", + "parameters": [], + "src": "1572:0:37" + }, + "scope": 5961, + "src": "1435:753:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5888, + "nodeType": "Block", + "src": "2352:663:37", + "statements": [ + { + "assignments": [ + 5842 + ], + "declarations": [ + { + "constant": false, + "id": 5842, + "mutability": "mutable", + "name": "winners", + "nameLocation": "2389:7:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2362:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5841, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5840, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2362:18:37" + }, + "referencedDeclaration": 1788, + "src": "2362:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 5845, + "initialValue": { + "expression": { + "id": 5843, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2399:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5844, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2399:16:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2362:53:37" + }, + { + "condition": { + "arguments": [ + { + "id": 5848, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2476:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5846, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2459:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2459:16:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 5849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2459:27:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5852, + "nodeType": "IfStatement", + "src": "2455:64:37", + "trueBody": { + "id": 5851, + "nodeType": "Block", + "src": "2488:31:37", + "statements": [ + { + "functionReturnParameters": 5837, + "id": 5850, + "nodeType": "Return", + "src": "2502:7:37" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5853, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2614:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5854, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2614:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2614:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5856, + "name": "numSeats", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5835, + "src": "2633:8:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2614:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5866, + "nodeType": "IfStatement", + "src": "2610:101:37", + "trueBody": { + "id": 5865, + "nodeType": "Block", + "src": "2643:68:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5861, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2669:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5858, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2657:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5860, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2657:11:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 5862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2657:22:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5863, + "nodeType": "ExpressionStatement", + "src": "2657:22:37" + }, + { + "functionReturnParameters": 5837, + "id": 5864, + "nodeType": "Return", + "src": "2694:7:37" + } + ] + } + }, + { + "assignments": [ + 5868, + 5870 + ], + "declarations": [ + { + "constant": false, + "id": 5868, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "2815:16:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2807:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2807:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5870, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "2838:10:37", + "nodeType": "VariableDeclaration", + "scope": 5888, + "src": "2833:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5869, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2833:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5875, + "initialValue": { + "arguments": [ + { + "id": 5872, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5829, + "src": "2878:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + { + "id": 5873, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2888:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + }, + { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + ], + "id": 5871, + "name": "_findWinnerWithLeastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5960, + "src": "2852:25:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_ElectionData_$4299_storage_ptr_$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_address_$_t_uint256_$", + "typeString": "function (struct ElectionStorage.ElectionData storage pointer,struct SetUtil.AddressSet storage pointer) view returns (address,uint256)" + } + }, + "id": 5874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2852:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2806:90:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5876, + "name": "candidateVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5833, + "src": "2911:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5877, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5870, + "src": "2928:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2911:27:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5887, + "nodeType": "IfStatement", + "src": "2907:102:37", + "trueBody": { + "id": 5886, + "nodeType": "Block", + "src": "2940:69:37", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5882, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5868, + "src": "2970:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5883, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5831, + "src": "2988:9:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 5879, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5842, + "src": "2954:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5881, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "replace", + "nodeType": "MemberAccess", + "referencedDeclaration": 1872, + "src": "2954:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address,address)" + } + }, + "id": 5884, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2954:44:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5885, + "nodeType": "ExpressionStatement", + "src": "2954:44:37" + } + ] + } + } + ] + }, + "id": 5889, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateWinnerSet", + "nameLocation": "2203:16:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5836, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5829, + "mutability": "mutable", + "name": "election", + "nameLocation": "2250:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2229:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5828, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5827, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2229:12:37" + }, + "referencedDeclaration": 4299, + "src": "2229:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5831, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2276:9:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2268:17:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5830, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2268:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5833, + "mutability": "mutable", + "name": "candidateVotes", + "nameLocation": "2300:14:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2295:19:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2295:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5835, + "mutability": "mutable", + "name": "numSeats", + "nameLocation": "2329:8:37", + "nodeType": "VariableDeclaration", + "scope": 5889, + "src": "2324:13:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5834, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2324:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2219:124:37" + }, + "returnParameters": { + "id": 5837, + "nodeType": "ParameterList", + "parameters": [], + "src": "2352:0:37" + }, + "scope": 5961, + "src": "2194:821:37", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5959, + "nodeType": "Block", + "src": "3216:508:37", + "statements": [ + { + "expression": { + "id": 5908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5902, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3226:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "expression": { + "arguments": [ + { + "id": 5905, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3244:4:37", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5904, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3244:4:37", + "typeDescriptions": {} + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 5903, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "3239:4:37", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3239:10:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 5907, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "src": "3239:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3226:27:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5909, + "nodeType": "ExpressionStatement", + "src": "3226:27:37" + }, + { + "assignments": [ + 5911 + ], + "declarations": [ + { + "constant": false, + "id": 5911, + "mutability": "mutable", + "name": "numWinners", + "nameLocation": "3269:10:37", + "nodeType": "VariableDeclaration", + "scope": 5959, + "src": "3264:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5910, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3264:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5915, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5912, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3282:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5913, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "3282:14:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 5914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3282:16:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3264:34:37" + }, + { + "body": { + "id": 5953, + "nodeType": "Block", + "src": "3388:282:37", + "statements": [ + { + "assignments": [ + 5927 + ], + "declarations": [ + { + "constant": false, + "id": 5927, + "mutability": "mutable", + "name": "winner", + "nameLocation": "3410:6:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3402:14:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5926, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3402:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 5932, + "initialValue": { + "arguments": [ + { + "id": 5930, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3435:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "expression": { + "id": 5928, + "name": "winners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5895, + "src": "3419:7:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 5929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "3419:15:37", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 5931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3419:31:37", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3402:48:37" + }, + { + "assignments": [ + 5934 + ], + "declarations": [ + { + "constant": false, + "id": 5934, + "mutability": "mutable", + "name": "winnerVotes", + "nameLocation": "3469:11:37", + "nodeType": "VariableDeclaration", + "scope": 5953, + "src": "3464:16:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5933, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3464:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5939, + "initialValue": { + "baseExpression": { + "expression": { + "id": 5935, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5892, + "src": "3483:8:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 5936, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "3483:23:37", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5938, + "indexExpression": { + "id": 5937, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3507:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3483:31:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3464:50:37" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5940, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3533:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 5941, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3547:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3533:24:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5952, + "nodeType": "IfStatement", + "src": "3529:131:37", + "trueBody": { + "id": 5951, + "nodeType": "Block", + "src": "3559:101:37", + "statements": [ + { + "expression": { + "id": 5945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5943, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3577:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5944, + "name": "winnerVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5934, + "src": "3590:11:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3577:24:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5946, + "nodeType": "ExpressionStatement", + "src": "3577:24:37" + }, + { + "expression": { + "id": 5949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 5947, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3620:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5948, + "name": "winner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5927, + "src": "3639:6:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3620:25:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5950, + "nodeType": "ExpressionStatement", + "src": "3620:25:37" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5922, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5920, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3340:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5921, + "name": "numWinners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5911, + "src": "3358:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3340:28:37", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5954, + "initializationExpression": { + "assignments": [ + 5917 + ], + "declarations": [ + { + "constant": false, + "id": 5917, + "mutability": "mutable", + "name": "winnerPosition", + "nameLocation": "3320:14:37", + "nodeType": "VariableDeclaration", + "scope": 5954, + "src": "3314:20:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 5916, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3314:5:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 5919, + "initialValue": { + "hexValue": "31", + "id": 5918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3337:1:37", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3314:24:37" + }, + "loopExpression": { + "expression": { + "id": 5924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3370:16:37", + "subExpression": { + "id": 5923, + "name": "winnerPosition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5917, + "src": "3370:14:37", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 5925, + "nodeType": "ExpressionStatement", + "src": "3370:16:37" + }, + "nodeType": "ForStatement", + "src": "3309:361:37" + }, + { + "expression": { + "components": [ + { + "id": 5955, + "name": "leastVotedWinner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5898, + "src": "3688:16:37", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5956, + "name": "leastVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5900, + "src": "3706:10:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 5957, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3687:30:37", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_address_$_t_uint256_$", + "typeString": "tuple(address,uint256)" + } + }, + "functionReturnParameters": 5901, + "id": 5958, + "nodeType": "Return", + "src": "3680:37:37" + } + ] + }, + "id": 5960, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_findWinnerWithLeastVotes", + "nameLocation": "3030:25:37", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5892, + "mutability": "mutable", + "name": "election", + "nameLocation": "3077:8:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3056:29:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 5891, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5890, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3056:12:37" + }, + "referencedDeclaration": 4299, + "src": "3056:12:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5895, + "mutability": "mutable", + "name": "winners", + "nameLocation": "3114:7:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3087:34:37", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5894, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5893, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "3087:18:37" + }, + "referencedDeclaration": 1788, + "src": "3087:18:37", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "src": "3055:67:37" + }, + "returnParameters": { + "id": 5901, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5898, + "mutability": "mutable", + "name": "leastVotedWinner", + "nameLocation": "3177:16:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3169:24:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5897, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3169:7:37", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5900, + "mutability": "mutable", + "name": "leastVotes", + "nameLocation": "3200:10:37", + "nodeType": "VariableDeclaration", + "scope": 5960, + "src": "3195:15:37", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5899, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3195:4:37", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3168:43:37" + }, + "scope": 5961, + "src": "3021:703:37", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5962, + "src": "185:3541:37", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3696:37" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IElectionModule.sol\";\nimport \"../submodules/election/ElectionSchedule.sol\";\nimport \"../submodules/election/ElectionCredentials.sol\";\nimport \"../submodules/election/ElectionVotes.sol\";\nimport \"../submodules/election/ElectionTally.sol\";\n\ncontract ElectionModule is\n IElectionModule,\n ElectionSchedule,\n ElectionCredentials,\n ElectionVotes,\n ElectionTally,\n OwnableMixin,\n InitializableMixin\n{\n using SetUtil for SetUtil.AddressSet;\n\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external virtual override onlyOwner onlyIfNotInitialized {\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n function _initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n ElectionStore storage store = _electionStore();\n\n uint8 seatCount = uint8(firstCouncil.length);\n if (minimumActiveMembers == 0 || minimumActiveMembers > seatCount) {\n revert InvalidMinimumActiveMembers();\n }\n\n ElectionSettings storage settings = _electionSettings();\n settings.minNominationPeriodDuration = 2 days;\n settings.minVotingPeriodDuration = 2 days;\n settings.minEpochDuration = 7 days;\n settings.maxDateAdjustmentTolerance = 7 days;\n settings.nextEpochSeatCount = uint8(firstCouncil.length);\n settings.minimumActiveMembers = minimumActiveMembers;\n settings.defaultBallotEvaluationBatchSize = 500;\n\n _createNewEpoch();\n\n EpochData storage firstEpoch = _getEpochAtIndex(0);\n uint64 epochStartDate = uint64(block.timestamp);\n _configureEpochSchedule(firstEpoch, epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n _createCouncilToken(councilTokenName, councilTokenSymbol);\n _addCouncilMembers(firstCouncil, 0);\n\n store.initialized = true;\n\n emit ElectionModuleInitialized();\n emit EpochStarted(0);\n }\n\n function isElectionModuleInitialized() public view override returns (bool) {\n return _isInitialized();\n }\n\n function _isInitialized() internal view override returns (bool) {\n return _electionStore().initialized;\n }\n\n function upgradeCouncilToken(address newCouncilTokenImplementation) external override onlyOwner onlyIfInitialized {\n CouncilToken(_electionStore().councilToken).upgradeTo(newCouncilTokenImplementation);\n\n emit CouncilTokenUpgraded(newCouncilTokenImplementation);\n }\n\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n true /*ensureChangesAreSmall = true*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external override onlyOwner onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination) {\n _adjustEpochSchedule(\n _getCurrentEpoch(),\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate,\n false /*!ensureChangesAreSmall = false*/\n );\n\n emit EpochScheduleUpdated(newNominationPeriodStartDate, newVotingPeriodStartDate, newEpochEndDate);\n }\n\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external override onlyOwner {\n _setMinEpochDurations(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n\n emit MinimumEpochDurationsChanged(newMinNominationPeriodDuration, newMinVotingPeriodDuration, newMinEpochDuration);\n }\n\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external override onlyOwner {\n if (newMaxDateAdjustmentTolerance == 0) revert InvalidElectionSettings();\n\n _electionSettings().maxDateAdjustmentTolerance = newMaxDateAdjustmentTolerance;\n\n emit MaxDateAdjustmentToleranceChanged(newMaxDateAdjustmentTolerance);\n }\n\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external override onlyOwner {\n if (newDefaultBallotEvaluationBatchSize == 0) revert InvalidElectionSettings();\n\n _electionSettings().defaultBallotEvaluationBatchSize = newDefaultBallotEvaluationBatchSize;\n\n emit DefaultBallotEvaluationBatchSizeChanged(newDefaultBallotEvaluationBatchSize);\n }\n\n function setNextEpochSeatCount(uint8 newSeatCount)\n external\n override\n onlyOwner\n onlyInPeriods(ElectionPeriod.Administration, ElectionPeriod.Nomination)\n {\n if (newSeatCount == 0) revert InvalidElectionSettings();\n\n _electionSettings().nextEpochSeatCount = newSeatCount;\n\n emit NextEpochSeatCountChanged(newSeatCount);\n }\n\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external override onlyOwner {\n if (newMinimumActiveMembers == 0) revert InvalidMinimumActiveMembers();\n\n _electionSettings().minimumActiveMembers = newMinimumActiveMembers;\n\n emit MinimumActiveMembersChanged(newMinimumActiveMembers);\n }\n\n function dismissMembers(address[] calldata membersToDismiss) external override onlyOwner {\n uint epochIndex = _getCurrentEpochIndex();\n\n _removeCouncilMembers(membersToDismiss, epochIndex);\n\n emit CouncilMembersDismissed(membersToDismiss, epochIndex);\n\n // Don't immediately jump to an election if the council still has enough members\n if (_getCurrentPeriod() != ElectionPeriod.Administration) return;\n if (_electionStore().councilMembers.length() >= _electionSettings().minimumActiveMembers) return;\n\n _jumpToNominationPeriod();\n\n emit EmergencyElectionStarted(epochIndex);\n }\n\n function nominate() public virtual override onlyInPeriods(ElectionPeriod.Nomination, ElectionPeriod.Vote) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (nominees.contains(msg.sender)) revert AlreadyNominated();\n\n nominees.add(msg.sender);\n\n emit CandidateNominated(msg.sender, _getCurrentEpochIndex());\n }\n\n function withdrawNomination() external override onlyInPeriod(ElectionPeriod.Nomination) {\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n if (!nominees.contains(msg.sender)) revert NotNominated();\n\n nominees.remove(msg.sender);\n\n emit NominationWithdrawn(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionVotes needs to be extended to specify what determines voting power\n function cast(address[] calldata candidates) public virtual override onlyInPeriod(ElectionPeriod.Vote) {\n _cast(msg.sender, candidates);\n }\n\n function _cast(address user, address[] calldata candidates) internal virtual {\n uint votePower = _getVotePower(user);\n\n if (votePower == 0) revert NoVotePower();\n\n _validateCandidates(candidates);\n\n bytes32 ballotId;\n\n uint epochIndex = _getCurrentEpochIndex();\n\n if (hasVoted(user)) {\n _withdrawCastedVote(user, epochIndex);\n }\n\n ballotId = _recordVote(user, votePower, candidates);\n\n emit VoteRecorded(user, ballotId, epochIndex, votePower);\n }\n\n function withdrawVote() external override onlyInPeriod(ElectionPeriod.Vote) {\n if (!hasVoted(msg.sender)) {\n revert VoteNotCasted();\n }\n\n _withdrawCastedVote(msg.sender, _getCurrentEpochIndex());\n }\n\n /// @dev ElectionTally needs to be extended to specify how votes are counted\n function evaluate(uint numBallots) external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (election.evaluated) revert ElectionAlreadyEvaluated();\n\n _evaluateNextBallotBatch(numBallots);\n\n uint currentEpochIndex = _getCurrentEpochIndex();\n\n uint totalBallots = election.ballotIds.length;\n if (election.numEvaluatedBallots < totalBallots) {\n emit ElectionBatchEvaluated(currentEpochIndex, election.numEvaluatedBallots, totalBallots);\n } else {\n election.evaluated = true;\n\n emit ElectionEvaluated(currentEpochIndex, totalBallots);\n }\n }\n\n /// @dev Burns previous NFTs and mints new ones\n function resolve() external override onlyInPeriod(ElectionPeriod.Evaluation) {\n ElectionData storage election = _getCurrentElection();\n\n if (!election.evaluated) revert ElectionNotEvaluated();\n\n uint newEpochIndex = _getCurrentEpochIndex() + 1;\n\n _removeAllCouncilMembers(newEpochIndex);\n _addCouncilMembers(election.winners.values(), newEpochIndex);\n\n election.resolved = true;\n\n _createNewEpoch();\n _copyScheduleFromPreviousEpoch();\n\n emit EpochStarted(newEpochIndex);\n }\n\n function getMinEpochDurations()\n external\n view\n override\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n )\n {\n ElectionSettings storage settings = _electionSettings();\n\n return (settings.minNominationPeriodDuration, settings.minVotingPeriodDuration, settings.minEpochDuration);\n }\n\n function getMaxDateAdjustmentTolerance() external view override returns (uint64) {\n return _electionSettings().maxDateAdjustmentTolerance;\n }\n\n function getDefaultBallotEvaluationBatchSize() external view override returns (uint) {\n return _electionSettings().defaultBallotEvaluationBatchSize;\n }\n\n function getNextEpochSeatCount() external view override returns (uint8) {\n return _electionSettings().nextEpochSeatCount;\n }\n\n function getMinimumActiveMembers() external view override returns (uint8) {\n return _electionSettings().minimumActiveMembers;\n }\n\n function getEpochIndex() external view override returns (uint) {\n return _getCurrentEpochIndex();\n }\n\n function getEpochStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().startDate;\n }\n\n function getEpochEndDate() external view override returns (uint64) {\n return _getCurrentEpoch().endDate;\n }\n\n function getNominationPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDate() external view override returns (uint64) {\n return _getCurrentEpoch().votingPeriodStartDate;\n }\n\n function getCurrentPeriod() external view override returns (uint) {\n return uint(_getCurrentPeriod());\n }\n\n function isNominated(address candidate) external view override returns (bool) {\n return _getCurrentElection().nominees.contains(candidate);\n }\n\n function getNominees() external view override returns (address[] memory) {\n return _getCurrentElection().nominees.values();\n }\n\n function calculateBallotId(address[] calldata candidates) external pure override returns (bytes32) {\n return _calculateBallotId(candidates);\n }\n\n function getBallotVoted(address user) public view override returns (bytes32) {\n return _getBallotVoted(user);\n }\n\n function hasVoted(address user) public view override returns (bool) {\n return _getBallotVoted(user) != bytes32(0);\n }\n\n function getVotePower(address user) external view override returns (uint) {\n return _getVotePower(user);\n }\n\n function getBallotVotes(bytes32 ballotId) external view override returns (uint) {\n return _getBallot(ballotId).votes;\n }\n\n function getBallotCandidates(bytes32 ballotId) external view override returns (address[] memory) {\n return _getBallot(ballotId).candidates;\n }\n\n function isElectionEvaluated() public view override returns (bool) {\n return _getCurrentElection().evaluated;\n }\n\n function getCandidateVotes(address candidate) external view override returns (uint) {\n return _getCurrentElection().candidateVotes[candidate];\n }\n\n function getElectionWinners() external view override returns (address[] memory) {\n return _getCurrentElection().winners.values();\n }\n\n function getCouncilToken() public view override returns (address) {\n return _electionStore().councilToken;\n }\n\n function getCouncilMembers() external view override returns (address[] memory) {\n return _electionStore().councilMembers.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionModule": [ + 4141 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionTally": [ + 5961 + ], + "ElectionVotes": [ + 6279 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IElectionModule": [ + 2778 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "MathUtil": [ + 1708 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 4142, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3007, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:30" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 3008, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 33, + "src": "56:68:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 3009, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 477, + "src": "125:74:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 3010, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 69, + "src": "200:84:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "../interfaces/IElectionModule.sol", + "id": 3011, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 2779, + "src": "285:43:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "file": "../submodules/election/ElectionSchedule.sol", + "id": 3012, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5631, + "src": "329:53:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "file": "../submodules/election/ElectionCredentials.sol", + "id": 3013, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5066, + "src": "383:56:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "file": "../submodules/election/ElectionVotes.sol", + "id": 3014, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 6280, + "src": "440:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionTally.sol", + "file": "../submodules/election/ElectionTally.sol", + "id": 3015, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4142, + "sourceUnit": 5962, + "src": "491:50:30", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 3016, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "574:15:30" + }, + "id": 3017, + "nodeType": "InheritanceSpecifier", + "src": "574:15:30" + }, + { + "baseName": { + "id": 3018, + "name": "ElectionSchedule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5630, + "src": "595:16:30" + }, + "id": 3019, + "nodeType": "InheritanceSpecifier", + "src": "595:16:30" + }, + { + "baseName": { + "id": 3020, + "name": "ElectionCredentials", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5065, + "src": "617:19:30" + }, + "id": 3021, + "nodeType": "InheritanceSpecifier", + "src": "617:19:30" + }, + { + "baseName": { + "id": 3022, + "name": "ElectionVotes", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6279, + "src": "642:13:30" + }, + "id": 3023, + "nodeType": "InheritanceSpecifier", + "src": "642:13:30" + }, + { + "baseName": { + "id": 3024, + "name": "ElectionTally", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5961, + "src": "661:13:30" + }, + "id": 3025, + "nodeType": "InheritanceSpecifier", + "src": "661:13:30" + }, + { + "baseName": { + "id": 3026, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "680:12:30" + }, + "id": 3027, + "nodeType": "InheritanceSpecifier", + "src": "680:12:30" + }, + { + "baseName": { + "id": 3028, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "698:18:30" + }, + "id": 3029, + "nodeType": "InheritanceSpecifier", + "src": "698:18:30" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 6379 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4141, + "linearizedBaseContracts": [ + 4141, + 68, + 476, + 494, + 5961, + 6279, + 5065, + 5630, + 4683, + 4331, + 2778 + ], + "name": "ElectionModule", + "nameLocation": "552:14:30", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3033, + "libraryName": { + "id": 3030, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "729:7:30" + }, + "nodeType": "UsingForDirective", + "src": "723:37:30", + "typeName": { + "id": 3032, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3031, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "741:18:30" + }, + "referencedDeclaration": 1788, + "src": "741:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2506 + ], + "body": { + "id": 3066, + "nodeType": "Block", + "src": "1129:274:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3057, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3035, + "src": "1178:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3058, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3037, + "src": "1208:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3059, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3040, + "src": "1240:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3060, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3042, + "src": "1266:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 3061, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3044, + "src": "1300:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3062, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3046, + "src": "1339:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3063, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3048, + "src": "1374:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3056, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3213, + "src": "1139:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 3064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1139:257:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3065, + "nodeType": "ExpressionStatement", + "src": "1139:257:30" + } + ] + }, + "functionSelector": "ee695137", + "id": 3067, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3052, + "kind": "modifierInvocation", + "modifierName": { + "id": 3051, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1098:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "1098:9:30" + }, + { + "id": 3054, + "kind": "modifierInvocation", + "modifierName": { + "id": 3053, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1108:20:30" + }, + "nodeType": "ModifierInvocation", + "src": "1108:20:30" + } + ], + "name": "initializeElectionModule", + "nameLocation": "775:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1089:8:30" + }, + "parameters": { + "id": 3049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3035, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "823:16:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "809:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3034, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3037, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "863:18:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "849:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "849:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3040, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "908:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "891:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3038, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3039, + "nodeType": "ArrayTypeName", + "src": "891:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3042, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "936:20:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "930:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3041, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "930:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3044, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "973:25:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "966:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3043, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "966:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3046, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1015:21:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1008:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3045, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1008:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3048, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1053:12:30", + "nodeType": "VariableDeclaration", + "scope": 3067, + "src": "1046:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3047, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1046:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "799:272:30" + }, + "returnParameters": { + "id": 3055, + "nodeType": "ParameterList", + "parameters": [], + "src": "1129:0:30" + }, + "scope": 4141, + "src": "766:637:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "external" + }, + { + "body": { + "id": 3212, + "nodeType": "Block", + "src": "1725:1202:30", + "statements": [ + { + "assignments": [ + 3087 + ], + "declarations": [ + { + "constant": false, + "id": 3087, + "mutability": "mutable", + "name": "store", + "nameLocation": "1757:5:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1735:27:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 3086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3085, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "1735:13:30" + }, + "referencedDeclaration": 4246, + "src": "1735:13:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 3090, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3088, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1765:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1765:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1735:46:30" + }, + { + "assignments": [ + 3092 + ], + "declarations": [ + { + "constant": false, + "id": 3092, + "mutability": "mutable", + "name": "seatCount", + "nameLocation": "1798:9:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1792:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3091, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1792:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "id": 3098, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3095, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "1816:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1816:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3094, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1810:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3093, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1810:5:30", + "typeDescriptions": {} + } + }, + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1810:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1792:44:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3099, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1850:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1874:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1850:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3102, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "1879:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 3103, + "name": "seatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3092, + "src": "1902:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1879:32:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1850:61:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3110, + "nodeType": "IfStatement", + "src": "1846:128:30", + "trueBody": { + "id": 3109, + "nodeType": "Block", + "src": "1913:61:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3106, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "1934:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3108, + "nodeType": "RevertStatement", + "src": "1927:36:30" + } + ] + } + }, + { + "assignments": [ + 3113 + ], + "declarations": [ + { + "constant": false, + "id": 3113, + "mutability": "mutable", + "name": "settings", + "nameLocation": "2009:8:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "1984:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3112, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3111, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "1984:16:30" + }, + "referencedDeclaration": 4261, + "src": "1984:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3116, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3114, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "2020:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2020:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1984:55:30" + }, + { + "expression": { + "id": 3121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3117, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2049:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3119, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "2049:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2088:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2049:45:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3122, + "nodeType": "ExpressionStatement", + "src": "2049:45:30" + }, + { + "expression": { + "id": 3127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3123, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2104:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3125, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "2104:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "32", + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2139:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_172800_by_1", + "typeString": "int_const 172800" + }, + "value": "2" + }, + "src": "2104:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3128, + "nodeType": "ExpressionStatement", + "src": "2104:41:30" + }, + { + "expression": { + "id": 3133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3129, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2155:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "2155:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2183:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2155:34:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3134, + "nodeType": "ExpressionStatement", + "src": "2155:34:30" + }, + { + "expression": { + "id": 3139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3135, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2199:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "2199:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "37", + "id": 3138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2237:6:30", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_604800_by_1", + "typeString": "int_const 604800" + }, + "value": "7" + }, + "src": "2199:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3140, + "nodeType": "ExpressionStatement", + "src": "2199:44:30" + }, + { + "expression": { + "id": 3149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3141, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2253:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3143, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "2253:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "expression": { + "id": 3146, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2289:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2289:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2283:5:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3144, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2283:5:30", + "typeDescriptions": {} + } + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2283:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2253:56:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3150, + "nodeType": "ExpressionStatement", + "src": "2253:56:30" + }, + { + "expression": { + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3151, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2319:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "2319:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3154, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3076, + "src": "2351:20:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "2319:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3156, + "nodeType": "ExpressionStatement", + "src": "2319:52:30" + }, + { + "expression": { + "id": 3161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3157, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3113, + "src": "2381:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3159, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "2381:41:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "353030", + "id": 3160, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2425:3:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_500_by_1", + "typeString": "int_const 500" + }, + "value": "500" + }, + "src": "2381:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3162, + "nodeType": "ExpressionStatement", + "src": "2381:47:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3163, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "2439:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2439:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3165, + "nodeType": "ExpressionStatement", + "src": "2439:17:30" + }, + { + "assignments": [ + 3168 + ], + "declarations": [ + { + "constant": false, + "id": 3168, + "mutability": "mutable", + "name": "firstEpoch", + "nameLocation": "2485:10:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2467:28:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 3167, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3166, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "2467:9:30" + }, + "referencedDeclaration": 4270, + "src": "2467:9:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 3172, + "initialValue": { + "arguments": [ + { + "hexValue": "30", + "id": 3170, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2515:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3169, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "2498:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2498:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2467:50:30" + }, + { + "assignments": [ + 3174 + ], + "declarations": [ + { + "constant": false, + "id": 3174, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2534:14:30", + "nodeType": "VariableDeclaration", + "scope": 3212, + "src": "2527:21:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3173, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2527:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 3180, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 3177, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "2558:5:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 3178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "2558:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2551:6:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 3175, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2551:6:30", + "typeDescriptions": {} + } + }, + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2527:47:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3182, + "name": "firstEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3168, + "src": "2608:10:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3183, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3174, + "src": "2620:14:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3184, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3078, + "src": "2636:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3185, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3080, + "src": "2663:21:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3186, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3082, + "src": "2686:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3181, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "2584:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2584:115:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3188, + "nodeType": "ExpressionStatement", + "src": "2584:115:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3190, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3069, + "src": "2730:16:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 3191, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3071, + "src": "2748:18:30", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 3189, + "name": "_createCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2710:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 3192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2710:57:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3193, + "nodeType": "ExpressionStatement", + "src": "2710:57:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3195, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3074, + "src": "2796:12:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "hexValue": "30", + "id": 3196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2810:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3194, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "2777:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2777:35:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3198, + "nodeType": "ExpressionStatement", + "src": "2777:35:30" + }, + { + "expression": { + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3199, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "2823:5:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "2823:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2843:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2823:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3204, + "nodeType": "ExpressionStatement", + "src": "2823:24:30" + }, + { + "eventCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3205, + "name": "ElectionModuleInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4380, + "src": "2863:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2863:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3207, + "nodeType": "EmitStatement", + "src": "2858:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "hexValue": "30", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2918:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3208, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "2905:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3211, + "nodeType": "EmitStatement", + "src": "2900:20:30" + } + ] + }, + "id": 3213, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initializeElectionModule", + "nameLocation": "1418:25:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3069, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1467:16:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1453:30:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1453:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3071, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1507:18:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1493:32:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3070, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1493:6:30", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3074, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "1552:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1535:29:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1535:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3073, + "nodeType": "ArrayTypeName", + "src": "1535:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3076, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "1580:20:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1574:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3075, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1574:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3078, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "1617:25:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1610:32:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3077, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1610:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3080, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "1659:21:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1652:28:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3079, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1652:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3082, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "1697:12:30", + "nodeType": "VariableDeclaration", + "scope": 3213, + "src": "1690:19:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3081, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1690:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1443:272:30" + }, + "returnParameters": { + "id": 3084, + "nodeType": "ParameterList", + "parameters": [], + "src": "1725:0:30" + }, + "scope": 4141, + "src": "1409:1518:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2512 + ], + "body": { + "id": 3222, + "nodeType": "Block", + "src": "3008:40:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3219, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3234 + ], + "referencedDeclaration": 3234, + "src": "3025:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 3220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3025:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3218, + "id": 3221, + "nodeType": "Return", + "src": "3018:23:30" + } + ] + }, + "functionSelector": "c5798523", + "id": 3223, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "2942:27:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3215, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2984:8:30" + }, + "parameters": { + "id": 3214, + "nodeType": "ParameterList", + "parameters": [], + "src": "2969:2:30" + }, + "returnParameters": { + "id": 3218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3223, + "src": "3002:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3216, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3002:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3001:6:30" + }, + "scope": 4141, + "src": "2933:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 3233, + "nodeType": "Block", + "src": "3118:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3229, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3135:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3135:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "3135:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3228, + "id": 3232, + "nodeType": "Return", + "src": "3128:35:30" + } + ] + }, + "id": 3234, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "3063:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3225, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3094:8:30" + }, + "parameters": { + "id": 3224, + "nodeType": "ParameterList", + "parameters": [], + "src": "3077:2:30" + }, + "returnParameters": { + "id": 3228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3227, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3234, + "src": "3112:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3226, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3112:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3111:6:30" + }, + "scope": 4141, + "src": "3054:116:30", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2518 + ], + "body": { + "id": 3257, + "nodeType": "Block", + "src": "3290:168:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3250, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3354:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3245, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3313:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3313:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3247, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3313:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3244, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3300:12:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 3248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:43:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 3249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 6321, + "src": "3300:53:30", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 3251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:84:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3252, + "nodeType": "ExpressionStatement", + "src": "3300:84:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3254, + "name": "newCouncilTokenImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3236, + "src": "3421:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3253, + "name": "CouncilTokenUpgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4394, + "src": "3400:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 3255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3400:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3256, + "nodeType": "EmitStatement", + "src": "3395:56:30" + } + ] + }, + "functionSelector": "54520478", + "id": 3258, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3240, + "kind": "modifierInvocation", + "modifierName": { + "id": 3239, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3262:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3262:9:30" + }, + { + "id": 3242, + "kind": "modifierInvocation", + "modifierName": { + "id": 3241, + "name": "onlyIfInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 49, + "src": "3272:17:30" + }, + "nodeType": "ModifierInvocation", + "src": "3272:17:30" + } + ], + "name": "upgradeCouncilToken", + "nameLocation": "3185:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3238, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3253:8:30" + }, + "parameters": { + "id": 3237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3236, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "3213:29:30", + "nodeType": "VariableDeclaration", + "scope": 3258, + "src": "3205:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3205:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3204:39:30" + }, + "returnParameters": { + "id": 3243, + "nodeType": "ParameterList", + "parameters": [], + "src": "3290:0:30" + }, + "scope": 4141, + "src": "3176:282:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2528 + ], + "body": { + "id": 3291, + "nodeType": "Block", + "src": "3716:348:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3277, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "3760:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3760:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3279, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3792:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3280, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "3834:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3281, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "3872:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "74727565", + "id": 3282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3901:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3276, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "3726:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3726:222:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3284, + "nodeType": "ExpressionStatement", + "src": "3726:222:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3286, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3260, + "src": "3985:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3287, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3262, + "src": "4015:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3288, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3264, + "src": "4041:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3285, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "3964:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3964:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3290, + "nodeType": "EmitStatement", + "src": "3959:98:30" + } + ] + }, + "functionSelector": "8f701997", + "id": 3292, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3268, + "kind": "modifierInvocation", + "modifierName": { + "id": 3267, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3634:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "3634:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3270, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3658:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "3658:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3272, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "3689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "3689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3274, + "kind": "modifierInvocation", + "modifierName": { + "id": 3269, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "3644:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "3644:71:30" + } + ], + "name": "tweakEpochSchedule", + "nameLocation": "3473:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3266, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3625:8:30" + }, + "parameters": { + "id": 3265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3260, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3508:28:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3501:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3259, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3501:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3262, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3553:24:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3546:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3261, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3546:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3264, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3594:15:30", + "nodeType": "VariableDeclaration", + "scope": 3292, + "src": "3587:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3263, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3587:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3491:124:30" + }, + "returnParameters": { + "id": 3275, + "nodeType": "ParameterList", + "parameters": [], + "src": "3716:0:30" + }, + "scope": 4141, + "src": "3464:600:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2538 + ], + "body": { + "id": 3325, + "nodeType": "Block", + "src": "4323:351:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3311, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "4367:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4367:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 3313, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4399:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3314, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4441:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3315, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4479:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "hexValue": "66616c7365", + "id": 3316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4508:5:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 3310, + "name": "_adjustEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5403, + "src": "4333:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_bool_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,bool)" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4333:225:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3318, + "nodeType": "ExpressionStatement", + "src": "4333:225:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3320, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3294, + "src": "4595:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3321, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3296, + "src": "4625:24:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3322, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3298, + "src": "4651:15:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3319, + "name": "EpochScheduleUpdated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4421, + "src": "4574:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4574:93:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3324, + "nodeType": "EmitStatement", + "src": "4569:98:30" + } + ] + }, + "functionSelector": "c14d0528", + "id": 3326, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3302, + "kind": "modifierInvocation", + "modifierName": { + "id": 3301, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4241:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4241:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3304, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4265:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "4265:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3306, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "4296:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "4296:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3308, + "kind": "modifierInvocation", + "modifierName": { + "id": 3303, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "4251:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "4251:71:30" + } + ], + "name": "modifyEpochSchedule", + "nameLocation": "4079:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3300, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4232:8:30" + }, + "parameters": { + "id": 3299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3294, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "4115:28:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4108:35:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3293, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4108:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3296, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "4160:24:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4153:31:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3295, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4153:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3298, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "4201:15:30", + "nodeType": "VariableDeclaration", + "scope": 3326, + "src": "4194:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3297, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4194:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4098:124:30" + }, + "returnParameters": { + "id": 3309, + "nodeType": "ParameterList", + "parameters": [], + "src": "4323:0:30" + }, + "scope": 4141, + "src": "4070:604:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2548 + ], + "body": { + "id": 3350, + "nodeType": "Block", + "src": "4870:244:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3339, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "4902:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3340, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "4934:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3341, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "4962:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3338, + "name": "_setMinEpochDurations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5563, + "src": "4880:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4880:102:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3343, + "nodeType": "ExpressionStatement", + "src": "4880:102:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3345, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3328, + "src": "5027:30:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3346, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3330, + "src": "5059:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 3347, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "5087:19:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3344, + "name": "MinimumEpochDurationsChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4429, + "src": "4998:28:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64)" + } + }, + "id": 3348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4998:109:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3349, + "nodeType": "EmitStatement", + "src": "4993:114:30" + } + ] + }, + "functionSelector": "a25a9f3a", + "id": 3351, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3336, + "kind": "modifierInvocation", + "modifierName": { + "id": 3335, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4860:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "4860:9:30" + } + ], + "name": "setMinEpochDurations", + "nameLocation": "4689:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3334, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4851:8:30" + }, + "parameters": { + "id": 3333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3328, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "4726:30:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4719:37:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3327, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4719:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3330, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "4773:26:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4766:33:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3329, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4766:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3332, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "4816:19:30", + "nodeType": "VariableDeclaration", + "scope": 3351, + "src": "4809:26:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4809:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4709:132:30" + }, + "returnParameters": { + "id": 3337, + "nodeType": "ParameterList", + "parameters": [], + "src": "4870:0:30" + }, + "scope": 4141, + "src": "4680:434:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2554 + ], + "body": { + "id": 3376, + "nodeType": "Block", + "src": "5225:258:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 3361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3359, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5239:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3360, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5272:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5239:34:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3365, + "nodeType": "IfStatement", + "src": "5235:72:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3362, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5282:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5282:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3364, + "nodeType": "RevertStatement", + "src": "5275:32:30" + } + }, + { + "expression": { + "id": 3370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3366, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5318:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5318:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3368, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "5318:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3369, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5367:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5318:78:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 3371, + "nodeType": "ExpressionStatement", + "src": "5318:78:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3373, + "name": "newMaxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3353, + "src": "5446:29:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 3372, + "name": "MaxDateAdjustmentToleranceChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4433, + "src": "5412:33:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint64_$returns$__$", + "typeString": "function (uint64)" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5412:64:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3375, + "nodeType": "EmitStatement", + "src": "5407:69:30" + } + ] + }, + "functionSelector": "3ac1c5fe", + "id": 3377, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3357, + "kind": "modifierInvocation", + "modifierName": { + "id": 3356, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5215:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5215:9:30" + } + ], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "5129:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3355, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5206:8:30" + }, + "parameters": { + "id": 3354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3353, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "5166:29:30", + "nodeType": "VariableDeclaration", + "scope": 3377, + "src": "5159:36:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3352, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5159:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5158:38:30" + }, + "returnParameters": { + "id": 3358, + "nodeType": "ParameterList", + "parameters": [], + "src": "5225:0:30" + }, + "scope": 4141, + "src": "5120:363:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2560 + ], + "body": { + "id": 3402, + "nodeType": "Block", + "src": "5604:288:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3385, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5618:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5657:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5618:40:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3391, + "nodeType": "IfStatement", + "src": "5614:78:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3388, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "5667:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5667:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3390, + "nodeType": "RevertStatement", + "src": "5660:32:30" + } + }, + { + "expression": { + "id": 3396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3392, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "5703:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5703:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3394, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "5703:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3395, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5758:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5703:90:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3397, + "nodeType": "ExpressionStatement", + "src": "5703:90:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3399, + "name": "newDefaultBallotEvaluationBatchSize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3379, + "src": "5849:35:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3398, + "name": "DefaultBallotEvaluationBatchSizeChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4437, + "src": "5809:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5809:76:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3401, + "nodeType": "EmitStatement", + "src": "5804:81:30" + } + ] + }, + "functionSelector": "64deab73", + "id": 3403, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3383, + "kind": "modifierInvocation", + "modifierName": { + "id": 3382, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5594:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5594:9:30" + } + ], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "5498:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3381, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5585:8:30" + }, + "parameters": { + "id": 3380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3379, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "5539:35:30", + "nodeType": "VariableDeclaration", + "scope": 3403, + "src": "5534:40:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3378, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5534:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5533:42:30" + }, + "returnParameters": { + "id": 3384, + "nodeType": "ParameterList", + "parameters": [], + "src": "5604:0:30" + }, + "scope": 4141, + "src": "5489:403:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2566 + ], + "body": { + "id": 3434, + "nodeType": "Block", + "src": "6085:191:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3417, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6099:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3418, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6115:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6099:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3423, + "nodeType": "IfStatement", + "src": "6095:55:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3420, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "6125:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3421, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6125:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3422, + "nodeType": "RevertStatement", + "src": "6118:32:30" + } + }, + { + "expression": { + "id": 3428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3424, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6161:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6161:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3426, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "6161:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3427, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6202:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6161:53:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3429, + "nodeType": "ExpressionStatement", + "src": "6161:53:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3431, + "name": "newSeatCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3405, + "src": "6256:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3430, + "name": "NextEpochSeatCountChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4441, + "src": "6230:25:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6230:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3433, + "nodeType": "EmitStatement", + "src": "6225:44:30" + } + ] + }, + "functionSelector": "4b5dacac", + "id": 3435, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3409, + "kind": "modifierInvocation", + "modifierName": { + "id": 3408, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5991:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "5991:9:30" + }, + { + "arguments": [ + { + "expression": { + "id": 3411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6023:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "6023:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3413, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "6054:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "6054:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3415, + "kind": "modifierInvocation", + "modifierName": { + "id": 3410, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "6009:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "6009:71:30" + } + ], + "name": "setNextEpochSeatCount", + "nameLocation": "5907:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3407, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5974:8:30" + }, + "parameters": { + "id": 3406, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3405, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "5935:12:30", + "nodeType": "VariableDeclaration", + "scope": 3435, + "src": "5929:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3404, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5929:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "5928:20:30" + }, + "returnParameters": { + "id": 3416, + "nodeType": "ParameterList", + "parameters": [], + "src": "6085:0:30" + }, + "scope": 4141, + "src": "5898:378:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2572 + ], + "body": { + "id": 3460, + "nodeType": "Block", + "src": "6374:232:30", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3443, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6388:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6415:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6388:28:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3449, + "nodeType": "IfStatement", + "src": "6384:70:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3446, + "name": "InvalidMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4372, + "src": "6425:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6425:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3448, + "nodeType": "RevertStatement", + "src": "6418:36:30" + } + }, + { + "expression": { + "id": 3454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3450, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "6465:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6465:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3452, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "6465:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 3453, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6508:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "6465:66:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 3455, + "nodeType": "ExpressionStatement", + "src": "6465:66:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3457, + "name": "newMinimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "6575:23:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3456, + "name": "MinimumActiveMembersChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4445, + "src": "6547:27:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint8_$returns$__$", + "typeString": "function (uint8)" + } + }, + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6547:52:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3459, + "nodeType": "EmitStatement", + "src": "6542:57:30" + } + ] + }, + "functionSelector": "0438d06e", + "id": 3461, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3441, + "kind": "modifierInvocation", + "modifierName": { + "id": 3440, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6364:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6364:9:30" + } + ], + "name": "setMinimumActiveMembers", + "nameLocation": "6291:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3439, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6355:8:30" + }, + "parameters": { + "id": 3438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3437, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "6321:23:30", + "nodeType": "VariableDeclaration", + "scope": 3461, + "src": "6315:29:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3436, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "6315:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "6314:31:30" + }, + "returnParameters": { + "id": 3442, + "nodeType": "ParameterList", + "parameters": [], + "src": "6374:0:30" + }, + "scope": 4141, + "src": "6282:324:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2579 + ], + "body": { + "id": 3510, + "nodeType": "Block", + "src": "6701:547:30", + "statements": [ + { + "assignments": [ + 3471 + ], + "declarations": [ + { + "constant": false, + "id": 3471, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "6716:10:30", + "nodeType": "VariableDeclaration", + "scope": 3510, + "src": "6711:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3470, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6711:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3474, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3472, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "6729:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6729:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6711:41:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3476, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6785:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3477, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6803:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3475, + "name": "_removeCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4900, + "src": "6763:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6763:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3479, + "nodeType": "ExpressionStatement", + "src": "6763:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3481, + "name": "membersToDismiss", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3464, + "src": "6854:16:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + { + "id": 3482, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "6872:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3480, + "name": "CouncilMembersDismissed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4413, + "src": "6830:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6830:53:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3484, + "nodeType": "EmitStatement", + "src": "6825:58:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 3489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3485, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "6987:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6987:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 3487, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7010:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "7010:29:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "6987:52:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3491, + "nodeType": "IfStatement", + "src": "6983:65:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3490, + "nodeType": "Return", + "src": "7041:7:30" + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3492, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "7061:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 3493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 3494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "7061:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3495, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "7061:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 3496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7061:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3497, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7105:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3498, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7105:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3499, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "7105:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "7061:84:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3502, + "nodeType": "IfStatement", + "src": "7057:97:30", + "trueBody": { + "functionReturnParameters": 3469, + "id": 3501, + "nodeType": "Return", + "src": "7147:7:30" + } + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3503, + "name": "_jumpToNominationPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5455, + "src": "7164:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7164:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3505, + "nodeType": "ExpressionStatement", + "src": "7164:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3507, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3471, + "src": "7230:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3506, + "name": "EmergencyElectionStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4495, + "src": "7205:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7205:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3509, + "nodeType": "EmitStatement", + "src": "7200:41:30" + } + ] + }, + "functionSelector": "9a25eaf3", + "id": 3511, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 3468, + "kind": "modifierInvocation", + "modifierName": { + "id": 3467, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "6691:9:30" + }, + "nodeType": "ModifierInvocation", + "src": "6691:9:30" + } + ], + "name": "dismissMembers", + "nameLocation": "6621:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3466, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6682:8:30" + }, + "parameters": { + "id": 3465, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3464, + "mutability": "mutable", + "name": "membersToDismiss", + "nameLocation": "6655:16:30", + "nodeType": "VariableDeclaration", + "scope": 3511, + "src": "6636:35:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3462, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6636:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3463, + "nodeType": "ArrayTypeName", + "src": "6636:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6635:37:30" + }, + "returnParameters": { + "id": 3469, + "nodeType": "ParameterList", + "parameters": [], + "src": "6701:0:30" + }, + "scope": 4141, + "src": "6612:636:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2583 + ], + "body": { + "id": 3553, + "nodeType": "Block", + "src": "7360:262:30", + "statements": [ + { + "assignments": [ + 3525 + ], + "declarations": [ + { + "constant": false, + "id": 3525, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7397:8:30", + "nodeType": "VariableDeclaration", + "scope": 3553, + "src": "7370:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3524, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3523, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7370:18:30" + }, + "referencedDeclaration": 1788, + "src": "7370:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3529, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3526, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7408:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3527, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7408:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3528, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7408:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7370:68:30" + }, + { + "condition": { + "arguments": [ + { + "expression": { + "id": 3532, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7471:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7471:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3530, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7453:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3531, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7453:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7453:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3538, + "nodeType": "IfStatement", + "src": "7449:60:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3535, + "name": "AlreadyNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4348, + "src": "7491:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7491:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3537, + "nodeType": "RevertStatement", + "src": "7484:25:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3542, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7533:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7533:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3539, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3525, + "src": "7520:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3541, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "7520:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7520:24:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3545, + "nodeType": "ExpressionStatement", + "src": "7520:24:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3547, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7579:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7579:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3549, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7591:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7591:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3546, + "name": "CandidateNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4451, + "src": "7560:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7560:55:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3552, + "nodeType": "EmitStatement", + "src": "7555:60:30" + } + ] + }, + "functionSelector": "fcd7e1d7", + "id": 3554, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3515, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7312:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7312:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "expression": { + "id": 3517, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7339:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "7339:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3519, + "kind": "modifierInvocation", + "modifierName": { + "id": 3514, + "name": "onlyInPeriods", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5116, + "src": "7298:13:30" + }, + "nodeType": "ModifierInvocation", + "src": "7298:61:30" + } + ], + "name": "nominate", + "nameLocation": "7263:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3513, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7289:8:30" + }, + "parameters": { + "id": 3512, + "nodeType": "ParameterList", + "parameters": [], + "src": "7271:2:30" + }, + "returnParameters": { + "id": 3520, + "nodeType": "ParameterList", + "parameters": [], + "src": "7360:0:30" + }, + "scope": 4141, + "src": "7254:368:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 2587 + ], + "body": { + "id": 3595, + "nodeType": "Block", + "src": "7716:263:30", + "statements": [ + { + "assignments": [ + 3566 + ], + "declarations": [ + { + "constant": false, + "id": 3566, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "7753:8:30", + "nodeType": "VariableDeclaration", + "scope": 3595, + "src": "7726:35:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 3565, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3564, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "7726:18:30" + }, + "referencedDeclaration": 1788, + "src": "7726:18:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 3570, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3567, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "7764:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7764:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "7764:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7726:68:30" + }, + { + "condition": { + "id": 3576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "7809:30:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7828:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7828:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3571, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7810:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3572, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "7810:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7810:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3580, + "nodeType": "IfStatement", + "src": "7805:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3577, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "7848:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7848:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3579, + "nodeType": "RevertStatement", + "src": "7841:21:30" + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3584, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7889:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7889:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 3581, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3566, + "src": "7873:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 3583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "7873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 3586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7873:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3587, + "nodeType": "ExpressionStatement", + "src": "7873:27:30" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 3589, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7936:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7936:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3591, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "7948:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7948:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3588, + "name": "NominationWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4457, + "src": "7916:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7916:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3594, + "nodeType": "EmitStatement", + "src": "7911:61:30" + } + ] + }, + "functionSelector": "d11801cf", + "id": 3596, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3558, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "7689:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "7689:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3560, + "kind": "modifierInvocation", + "modifierName": { + "id": 3557, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "7676:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "7676:39:30" + } + ], + "name": "withdrawNomination", + "nameLocation": "7637:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3556, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7667:8:30" + }, + "parameters": { + "id": 3555, + "nodeType": "ParameterList", + "parameters": [], + "src": "7655:2:30" + }, + "returnParameters": { + "id": 3561, + "nodeType": "ParameterList", + "parameters": [], + "src": "7716:0:30" + }, + "scope": 4141, + "src": "7628:351:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2594 + ], + "body": { + "id": 3614, + "nodeType": "Block", + "src": "8176:46:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3609, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8192:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8192:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3611, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3600, + "src": "8204:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3608, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3674, + "src": "8186:5:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 3612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8186:29:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3613, + "nodeType": "ExpressionStatement", + "src": "8186:29:30" + } + ] + }, + "documentation": { + "id": 3597, + "nodeType": "StructuredDocumentation", + "src": "7985:83:30", + "text": "@dev ElectionVotes needs to be extended to specify what determines voting power" + }, + "functionSelector": "84ae670c", + "id": 3615, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3604, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8155:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8155:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3606, + "kind": "modifierInvocation", + "modifierName": { + "id": 3603, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8142:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8142:33:30" + } + ], + "name": "cast", + "nameLocation": "8082:4:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3602, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8133:8:30" + }, + "parameters": { + "id": 3601, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3600, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8106:10:30", + "nodeType": "VariableDeclaration", + "scope": 3615, + "src": "8087:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3598, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8087:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3599, + "nodeType": "ArrayTypeName", + "src": "8087:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8086:31:30" + }, + "returnParameters": { + "id": 3607, + "nodeType": "ParameterList", + "parameters": [], + "src": "8176:0:30" + }, + "scope": 4141, + "src": "8073:149:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 3673, + "nodeType": "Block", + "src": "8305:446:30", + "statements": [ + { + "assignments": [ + 3624 + ], + "declarations": [ + { + "constant": false, + "id": 3624, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8320:9:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8315:14:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3623, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8315:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3628, + "initialValue": { + "arguments": [ + { + "id": 3626, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8346:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3625, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "8332:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8332:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8315:36:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 3629, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8366:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 3630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8379:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8366:14:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3635, + "nodeType": "IfStatement", + "src": "8362:40:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3632, + "name": "NoVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4354, + "src": "8389:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8389:13:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3634, + "nodeType": "RevertStatement", + "src": "8382:20:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3637, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8433:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3636, + "name": "_validateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6067, + "src": "8413:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 3638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8413:31:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3639, + "nodeType": "ExpressionStatement", + "src": "8413:31:30" + }, + { + "assignments": [ + 3641 + ], + "declarations": [ + { + "constant": false, + "id": 3641, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "8463:8:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8455:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3640, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "8455:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 3642, + "nodeType": "VariableDeclarationStatement", + "src": "8455:16:30" + }, + { + "assignments": [ + 3644 + ], + "declarations": [ + { + "constant": false, + "id": 3644, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "8487:10:30", + "nodeType": "VariableDeclaration", + "scope": 3673, + "src": "8482:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3643, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8482:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3647, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3645, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8500:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8500:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8482:41:30" + }, + { + "condition": { + "arguments": [ + { + "id": 3649, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8547:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3648, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8538:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8538:14:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3657, + "nodeType": "IfStatement", + "src": "8534:82:30", + "trueBody": { + "id": 3656, + "nodeType": "Block", + "src": "8554:62:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3652, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8588:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3653, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8594:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3651, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8568:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8568:37:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3655, + "nodeType": "ExpressionStatement", + "src": "8568:37:30" + } + ] + } + }, + { + "expression": { + "id": 3664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 3658, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8626:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 3660, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8649:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3661, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8655:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3662, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3620, + "src": "8666:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3659, + "name": "_recordVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6150, + "src": "8637:11:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_address_$dyn_calldata_ptr_$returns$_t_bytes32_$", + "typeString": "function (address,uint256,address[] calldata) returns (bytes32)" + } + }, + "id": 3663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8637:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "8626:51:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 3665, + "nodeType": "ExpressionStatement", + "src": "8626:51:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3667, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3617, + "src": "8706:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 3668, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3641, + "src": "8712:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 3669, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3644, + "src": "8722:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3670, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3624, + "src": "8734:9:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3666, + "name": "VoteRecorded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4467, + "src": "8693:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 3671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8693:51:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3672, + "nodeType": "EmitStatement", + "src": "8688:56:30" + } + ] + }, + "id": 3674, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_cast", + "nameLocation": "8237:5:30", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 3621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3617, + "mutability": "mutable", + "name": "user", + "nameLocation": "8251:4:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8243:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8243:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3620, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "8276:10:30", + "nodeType": "VariableDeclaration", + "scope": 3674, + "src": "8257:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3618, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8257:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3619, + "nodeType": "ArrayTypeName", + "src": "8257:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "8242:45:30" + }, + "returnParameters": { + "id": 3622, + "nodeType": "ParameterList", + "parameters": [], + "src": "8305:0:30" + }, + "scope": 4141, + "src": "8228:523:30", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2598 + ], + "body": { + "id": 3699, + "nodeType": "Block", + "src": "8833:157:30", + "statements": [ + { + "condition": { + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "8847:21:30", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 3683, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8857:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8857:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3682, + "name": "hasVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "8848:8:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8848:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3691, + "nodeType": "IfStatement", + "src": "8843:74:30", + "trueBody": { + "id": 3690, + "nodeType": "Block", + "src": "8870:47:30", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3687, + "name": "VoteNotCasted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4356, + "src": "8891:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8891:15:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3689, + "nodeType": "RevertStatement", + "src": "8884:22:30" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 3693, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8947:3:30", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "8947:10:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3695, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "8959:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8959:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3692, + "name": "_withdrawCastedVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6235, + "src": "8927:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8927:56:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3698, + "nodeType": "ExpressionStatement", + "src": "8927:56:30" + } + ] + }, + "functionSelector": "d83eb231", + "id": 3700, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3678, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "8812:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "8812:19:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3680, + "kind": "modifierInvocation", + "modifierName": { + "id": 3677, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "8799:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "8799:33:30" + } + ], + "name": "withdrawVote", + "nameLocation": "8766:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3676, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8790:8:30" + }, + "parameters": { + "id": 3675, + "nodeType": "ParameterList", + "parameters": [], + "src": "8778:2:30" + }, + "returnParameters": { + "id": 3681, + "nodeType": "ParameterList", + "parameters": [], + "src": "8833:0:30" + }, + "scope": 4141, + "src": "8757:233:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2604 + ], + "body": { + "id": 3763, + "nodeType": "Block", + "src": "9170:599:30", + "statements": [ + { + "assignments": [ + 3713 + ], + "declarations": [ + { + "constant": false, + "id": 3713, + "mutability": "mutable", + "name": "election", + "nameLocation": "9201:8:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9180:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3711, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9180:12:30" + }, + "referencedDeclaration": 4299, + "src": "9180:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3716, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3714, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9212:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9212:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9180:53:30" + }, + { + "condition": { + "expression": { + "id": 3717, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9248:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3718, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9248:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3722, + "nodeType": "IfStatement", + "src": "9244:57:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3719, + "name": "ElectionAlreadyEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4346, + "src": "9275:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9275:26:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3721, + "nodeType": "RevertStatement", + "src": "9268:33:30" + } + }, + { + "expression": { + "arguments": [ + { + "id": 3724, + "name": "numBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3703, + "src": "9337:10:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3723, + "name": "_evaluateNextBallotBatch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5695, + "src": "9312:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9312:36:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3726, + "nodeType": "ExpressionStatement", + "src": "9312:36:30" + }, + { + "assignments": [ + 3728 + ], + "declarations": [ + { + "constant": false, + "id": 3728, + "mutability": "mutable", + "name": "currentEpochIndex", + "nameLocation": "9364:17:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9359:22:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3727, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9359:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3731, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3729, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "9384:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9384:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9359:48:30" + }, + { + "assignments": [ + 3733 + ], + "declarations": [ + { + "constant": false, + "id": 3733, + "mutability": "mutable", + "name": "totalBallots", + "nameLocation": "9423:12:30", + "nodeType": "VariableDeclaration", + "scope": 3763, + "src": "9418:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3732, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9418:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3737, + "initialValue": { + "expression": { + "expression": { + "id": 3734, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9438:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3735, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "9438:18:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 3736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "9438:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9418:45:30" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 3738, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9477:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3739, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9477:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 3740, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9508:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9477:43:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3761, + "nodeType": "Block", + "src": "9643:120:30", + "statements": [ + { + "expression": { + "id": 3754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3750, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9657:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9657:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9678:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "9657:25:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3755, + "nodeType": "ExpressionStatement", + "src": "9657:25:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3757, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9720:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3758, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9739:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3756, + "name": "ElectionEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4483, + "src": "9702:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256)" + } + }, + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9702:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3760, + "nodeType": "EmitStatement", + "src": "9697:55:30" + } + ] + }, + "id": 3762, + "nodeType": "IfStatement", + "src": "9473:290:30", + "trueBody": { + "id": 3749, + "nodeType": "Block", + "src": "9522:115:30", + "statements": [ + { + "eventCall": { + "arguments": [ + { + "id": 3743, + "name": "currentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3728, + "src": "9564:17:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "expression": { + "id": 3744, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3713, + "src": "9583:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3745, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "numEvaluatedBallots", + "nodeType": "MemberAccess", + "referencedDeclaration": 4276, + "src": "9583:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 3746, + "name": "totalBallots", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3733, + "src": "9613:12:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3742, + "name": "ElectionBatchEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4491, + "src": "9541:22:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9541:85:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3748, + "nodeType": "EmitStatement", + "src": "9536:90:30" + } + ] + } + } + ] + }, + "documentation": { + "id": 3701, + "nodeType": "StructuredDocumentation", + "src": "8996:76:30", + "text": "@dev ElectionTally needs to be extended to specify how votes are counted" + }, + "functionSelector": "37143233", + "id": 3764, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3707, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9143:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3708, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9143:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3709, + "kind": "modifierInvocation", + "modifierName": { + "id": 3706, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9130:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9130:39:30" + } + ], + "name": "evaluate", + "nameLocation": "9086:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3705, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9121:8:30" + }, + "parameters": { + "id": 3704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3703, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "9100:10:30", + "nodeType": "VariableDeclaration", + "scope": 3764, + "src": "9095:15:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3702, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9095:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "9094:17:30" + }, + "returnParameters": { + "id": 3710, + "nodeType": "ParameterList", + "parameters": [], + "src": "9170:0:30" + }, + "scope": 4141, + "src": "9077:692:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2608 + ], + "body": { + "id": 3821, + "nodeType": "Block", + "src": "9904:462:30", + "statements": [ + { + "assignments": [ + 3775 + ], + "declarations": [ + { + "constant": false, + "id": 3775, + "mutability": "mutable", + "name": "election", + "nameLocation": "9935:8:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "9914:29:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 3774, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3773, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "9914:12:30" + }, + "referencedDeclaration": 4299, + "src": "9914:12:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 3778, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3776, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "9946:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9946:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9914:53:30" + }, + { + "condition": { + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "9982:19:30", + "subExpression": { + "expression": { + "id": 3779, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "9983:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3780, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "9983:18:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3785, + "nodeType": "IfStatement", + "src": "9978:54:30", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3782, + "name": "ElectionNotEvaluated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4344, + "src": "10010:20:30", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10010:22:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3784, + "nodeType": "RevertStatement", + "src": "10003:29:30" + } + }, + { + "assignments": [ + 3787 + ], + "declarations": [ + { + "constant": false, + "id": 3787, + "mutability": "mutable", + "name": "newEpochIndex", + "nameLocation": "10048:13:30", + "nodeType": "VariableDeclaration", + "scope": 3821, + "src": "10043:18:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3786, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10043:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 3792, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3788, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "10064:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10064:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 3790, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10090:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "10064:27:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10043:48:30" + }, + { + "expression": { + "arguments": [ + { + "id": 3794, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10127:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3793, + "name": "_removeAllCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4816, + "src": "10102:24:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10102:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3796, + "nodeType": "ExpressionStatement", + "src": "10102:39:30" + }, + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 3798, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10170:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "10170:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3800, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "10170:23:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10170:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 3802, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10197:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3797, + "name": "_addCouncilMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4858, + "src": "10151:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_uint256_$returns$__$", + "typeString": "function (address[] memory,uint256)" + } + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10151:60:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3804, + "nodeType": "ExpressionStatement", + "src": "10151:60:30" + }, + { + "expression": { + "id": 3809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 3805, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3775, + "src": "10222:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "resolved", + "nodeType": "MemberAccess", + "referencedDeclaration": 4274, + "src": "10222:17:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 3808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10242:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10222:24:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3810, + "nodeType": "ExpressionStatement", + "src": "10222:24:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3811, + "name": "_createNewEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4523, + "src": "10257:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10257:17:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3813, + "nodeType": "ExpressionStatement", + "src": "10257:17:30" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3814, + "name": "_copyScheduleFromPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5512, + "src": "10284:30:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 3815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10284:32:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3816, + "nodeType": "ExpressionStatement", + "src": "10284:32:30" + }, + { + "eventCall": { + "arguments": [ + { + "id": 3818, + "name": "newEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3787, + "src": "10345:13:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3817, + "name": "EpochStarted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4384, + "src": "10332:12:30", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10332:27:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3820, + "nodeType": "EmitStatement", + "src": "10327:32:30" + } + ] + }, + "documentation": { + "id": 3765, + "nodeType": "StructuredDocumentation", + "src": "9775:47:30", + "text": "@dev Burns previous NFTs and mints new ones" + }, + "functionSelector": "2810e1d6", + "id": 3822, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 3769, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "9877:14:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3770, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "9877:25:30", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 3771, + "kind": "modifierInvocation", + "modifierName": { + "id": 3768, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 5084, + "src": "9864:12:30" + }, + "nodeType": "ModifierInvocation", + "src": "9864:39:30" + } + ], + "name": "resolve", + "nameLocation": "9836:7:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3767, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "9855:8:30" + }, + "parameters": { + "id": 3766, + "nodeType": "ParameterList", + "parameters": [], + "src": "9843:2:30" + }, + "returnParameters": { + "id": 3772, + "nodeType": "ParameterList", + "parameters": [], + "src": "9904:0:30" + }, + "scope": 4141, + "src": "9827:539:30", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2618 + ], + "body": { + "id": 3846, + "nodeType": "Block", + "src": "10611:189:30", + "statements": [ + { + "assignments": [ + 3834 + ], + "declarations": [ + { + "constant": false, + "id": 3834, + "mutability": "mutable", + "name": "settings", + "nameLocation": "10646:8:30", + "nodeType": "VariableDeclaration", + "scope": 3846, + "src": "10621:33:30", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 3833, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 3832, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "10621:16:30" + }, + "referencedDeclaration": 4261, + "src": "10621:16:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 3837, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3835, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10657:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10657:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "10621:55:30" + }, + { + "expression": { + "components": [ + { + "expression": { + "id": 3838, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10695:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3839, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "10695:36:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3840, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10733:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3841, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "10733:32:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 3842, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3834, + "src": "10767:8:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3843, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "10767:25:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "id": 3844, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "10694:99:30", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint64_$_t_uint64_$_t_uint64_$", + "typeString": "tuple(uint64,uint64,uint64)" + } + }, + "functionReturnParameters": 3831, + "id": 3845, + "nodeType": "Return", + "src": "10687:106:30" + } + ] + }, + "functionSelector": "8625c053", + "id": 3847, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "10381:20:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3824, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10442:8:30" + }, + "parameters": { + "id": 3823, + "nodeType": "ParameterList", + "parameters": [], + "src": "10401:2:30" + }, + "returnParameters": { + "id": 3831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3826, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "10488:27:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10481:34:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3825, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10481:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3828, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "10536:23:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10529:30:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3827, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10529:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 3830, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "10580:16:30", + "nodeType": "VariableDeclaration", + "scope": 3847, + "src": "10573:23:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3829, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10573:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10467:139:30" + }, + "scope": 4141, + "src": "10372:428:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2624 + ], + "body": { + "id": 3857, + "nodeType": "Block", + "src": "10887:70:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3853, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "10904:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10904:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3855, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "10904:46:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3852, + "id": 3856, + "nodeType": "Return", + "src": "10897:53:30" + } + ] + }, + "functionSelector": "e9544a51", + "id": 3858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "10815:29:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "10861:8:30" + }, + "parameters": { + "id": 3848, + "nodeType": "ParameterList", + "parameters": [], + "src": "10844:2:30" + }, + "returnParameters": { + "id": 3852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3858, + "src": "10879:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "10879:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "10878:8:30" + }, + "scope": 4141, + "src": "10806:151:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2630 + ], + "body": { + "id": 3868, + "nodeType": "Block", + "src": "11048:76:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3864, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11065:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11065:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3866, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultBallotEvaluationBatchSize", + "nodeType": "MemberAccess", + "referencedDeclaration": 4260, + "src": "11065:52:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3863, + "id": 3867, + "nodeType": "Return", + "src": "11058:59:30" + } + ] + }, + "functionSelector": "0f98dfba", + "id": 3869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "10972:35:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3860, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11024:8:30" + }, + "parameters": { + "id": 3859, + "nodeType": "ParameterList", + "parameters": [], + "src": "11007:2:30" + }, + "returnParameters": { + "id": 3863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3862, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3869, + "src": "11042:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3861, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11042:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11041:6:30" + }, + "scope": 4141, + "src": "10963:161:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2636 + ], + "body": { + "id": 3879, + "nodeType": "Block", + "src": "11202:62:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3875, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11219:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11219:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nextEpochSeatCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 4248, + "src": "11219:38:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3874, + "id": 3878, + "nodeType": "Return", + "src": "11212:45:30" + } + ] + }, + "functionSelector": "447068ef", + "id": 3880, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "11139:21:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3871, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11177:8:30" + }, + "parameters": { + "id": 3870, + "nodeType": "ParameterList", + "parameters": [], + "src": "11160:2:30" + }, + "returnParameters": { + "id": 3874, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3873, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3880, + "src": "11195:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3872, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11195:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11194:7:30" + }, + "scope": 4141, + "src": "11130:134:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2642 + ], + "body": { + "id": 3890, + "nodeType": "Block", + "src": "11344:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3886, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "11361:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 3887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11361:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 3888, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minimumActiveMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4250, + "src": "11361:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 3885, + "id": 3889, + "nodeType": "Return", + "src": "11354:47:30" + } + ] + }, + "functionSelector": "85160425", + "id": 3891, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "11279:23:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11319:8:30" + }, + "parameters": { + "id": 3881, + "nodeType": "ParameterList", + "parameters": [], + "src": "11302:2:30" + }, + "returnParameters": { + "id": 3885, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3884, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3891, + "src": "11337:5:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 3883, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "11337:5:30", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "11336:7:30" + }, + "scope": 4141, + "src": "11270:138:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2648 + ], + "body": { + "id": 3900, + "nodeType": "Block", + "src": "11477:47:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3897, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4536, + "src": "11494:21:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11494:23:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3896, + "id": 3899, + "nodeType": "Return", + "src": "11487:30:30" + } + ] + }, + "functionSelector": "ffe7f643", + "id": 3901, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "11423:13:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3893, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11453:8:30" + }, + "parameters": { + "id": 3892, + "nodeType": "ParameterList", + "parameters": [], + "src": "11436:2:30" + }, + "returnParameters": { + "id": 3896, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3895, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3901, + "src": "11471:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3894, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "11471:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "11470:6:30" + }, + "scope": 4141, + "src": "11414:110:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2654 + ], + "body": { + "id": 3911, + "nodeType": "Block", + "src": "11599:52:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3907, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11616:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3908, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11616:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "11616:28:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3906, + "id": 3910, + "nodeType": "Return", + "src": "11609:35:30" + } + ] + }, + "functionSelector": "ce04e44c", + "id": 3912, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "11539:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3903, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11573:8:30" + }, + "parameters": { + "id": 3902, + "nodeType": "ParameterList", + "parameters": [], + "src": "11556:2:30" + }, + "returnParameters": { + "id": 3906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3905, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3912, + "src": "11591:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3904, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11591:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11590:8:30" + }, + "scope": 4141, + "src": "11530:121:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2660 + ], + "body": { + "id": 3922, + "nodeType": "Block", + "src": "11724:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3918, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11741:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11741:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3920, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "11741:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3917, + "id": 3921, + "nodeType": "Return", + "src": "11734:33:30" + } + ] + }, + "functionSelector": "362c906d", + "id": 3923, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "11666:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3914, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11698:8:30" + }, + "parameters": { + "id": 3913, + "nodeType": "ParameterList", + "parameters": [], + "src": "11681:2:30" + }, + "returnParameters": { + "id": 3917, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3916, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3923, + "src": "11716:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3915, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11716:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11715:8:30" + }, + "scope": 4141, + "src": "11657:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2666 + ], + "body": { + "id": 3933, + "nodeType": "Block", + "src": "11860:68:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3929, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "11877:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11877:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "11877:44:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3928, + "id": 3932, + "nodeType": "Return", + "src": "11870:51:30" + } + ] + }, + "functionSelector": "e420d7f9", + "id": 3934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "11789:28:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3925, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11834:8:30" + }, + "parameters": { + "id": 3924, + "nodeType": "ParameterList", + "parameters": [], + "src": "11817:2:30" + }, + "returnParameters": { + "id": 3928, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3927, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3934, + "src": "11852:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3926, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "11852:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "11851:8:30" + }, + "scope": 4141, + "src": "11780:148:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2672 + ], + "body": { + "id": 3944, + "nodeType": "Block", + "src": "12010:64:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3940, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "12027:16:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:18:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 3942, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "12027:40:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 3939, + "id": 3943, + "nodeType": "Return", + "src": "12020:47:30" + } + ] + }, + "functionSelector": "e1509015", + "id": 3945, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "11943:24:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3936, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "11984:8:30" + }, + "parameters": { + "id": 3935, + "nodeType": "ParameterList", + "parameters": [], + "src": "11967:2:30" + }, + "returnParameters": { + "id": 3939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3938, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3945, + "src": "12002:6:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 3937, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "12002:6:30", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "12001:8:30" + }, + "scope": 4141, + "src": "11934:140:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2678 + ], + "body": { + "id": 3957, + "nodeType": "Block", + "src": "12146:49:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3953, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "12168:17:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12168:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12163:4:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3951, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12163:4:30", + "typeDescriptions": {} + } + }, + "id": 3955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12163:25:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3950, + "id": 3956, + "nodeType": "Return", + "src": "12156:32:30" + } + ] + }, + "functionSelector": "086146d2", + "id": 3958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "12089:16:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3947, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12122:8:30" + }, + "parameters": { + "id": 3946, + "nodeType": "ParameterList", + "parameters": [], + "src": "12105:2:30" + }, + "returnParameters": { + "id": 3950, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3949, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3958, + "src": "12140:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3948, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12140:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12139:6:30" + }, + "scope": 4141, + "src": "12080:115:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2686 + ], + "body": { + "id": 3973, + "nodeType": "Block", + "src": "12279:74:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3970, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3960, + "src": "12336:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3966, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12296:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3968, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12296:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3969, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "12296:39:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 3971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12296:50:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3965, + "id": 3972, + "nodeType": "Return", + "src": "12289:57:30" + } + ] + }, + "functionSelector": "3a3e6c81", + "id": 3974, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "12210:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3962, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12255:8:30" + }, + "parameters": { + "id": 3961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3960, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "12230:9:30", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12222:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12222:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12221:19:30" + }, + "returnParameters": { + "id": 3965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3964, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3974, + "src": "12273:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3963, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12273:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12272:6:30" + }, + "scope": 4141, + "src": "12201:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2693 + ], + "body": { + "id": 3987, + "nodeType": "Block", + "src": "12432:63:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3981, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "12449:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 3982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 3983, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "12449:30:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3984, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "12449:37:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12449:39:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 3980, + "id": 3986, + "nodeType": "Return", + "src": "12442:46:30" + } + ] + }, + "functionSelector": "9636f67c", + "id": 3988, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "12368:11:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3976, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12396:8:30" + }, + "parameters": { + "id": 3975, + "nodeType": "ParameterList", + "parameters": [], + "src": "12379:2:30" + }, + "returnParameters": { + "id": 3980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3979, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3988, + "src": "12414:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3977, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12414:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3978, + "nodeType": "ArrayTypeName", + "src": "12414:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12413:18:30" + }, + "scope": 4141, + "src": "12359:136:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2702 + ], + "body": { + "id": 4001, + "nodeType": "Block", + "src": "12600:54:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 3998, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3991, + "src": "12636:10:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 3997, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "12617:18:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 3999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12617:30:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 3996, + "id": 4000, + "nodeType": "Return", + "src": "12610:37:30" + } + ] + }, + "functionSelector": "edc968ba", + "id": 4002, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "12510:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3993, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12573:8:30" + }, + "parameters": { + "id": 3992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3991, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "12547:10:30", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12528:29:30", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3989, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12528:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3990, + "nodeType": "ArrayTypeName", + "src": "12528:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "12527:31:30" + }, + "returnParameters": { + "id": 3996, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3995, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4002, + "src": "12591:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 3994, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12591:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12590:9:30" + }, + "scope": 4141, + "src": "12501:153:30", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2710 + ], + "body": { + "id": 4014, + "nodeType": "Block", + "src": "12737:45:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4011, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4004, + "src": "12770:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4010, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12754:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 4009, + "id": 4013, + "nodeType": "Return", + "src": "12747:28:30" + } + ] + }, + "functionSelector": "95ff6584", + "id": 4015, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "12669:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4006, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12710:8:30" + }, + "parameters": { + "id": 4005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4004, + "mutability": "mutable", + "name": "user", + "nameLocation": "12692:4:30", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12684:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4003, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12684:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12683:14:30" + }, + "returnParameters": { + "id": 4009, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4008, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4015, + "src": "12728:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4007, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12728:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "12727:9:30" + }, + "scope": 4141, + "src": "12660:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2718 + ], + "body": { + "id": 4032, + "nodeType": "Block", + "src": "12856:59:30", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 4024, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4017, + "src": "12889:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4023, + "name": "_getBallotVoted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "12873:15:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bytes32_$", + "typeString": "function (address) view returns (bytes32)" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12873:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 4028, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12906:1:30", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12898:7:30", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 4026, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "12898:7:30", + "typeDescriptions": {} + } + }, + "id": 4029, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12898:10:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "12873:35:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4022, + "id": 4031, + "nodeType": "Return", + "src": "12866:42:30" + } + ] + }, + "functionSelector": "09eef43e", + "id": 4033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "12797:8:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4019, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12832:8:30" + }, + "parameters": { + "id": 4018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4017, + "mutability": "mutable", + "name": "user", + "nameLocation": "12814:4:30", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12806:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4016, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12806:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12805:14:30" + }, + "returnParameters": { + "id": 4022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4021, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4033, + "src": "12850:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12850:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "12849:6:30" + }, + "scope": 4141, + "src": "12788:127:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2726 + ], + "body": { + "id": 4045, + "nodeType": "Block", + "src": "12995:43:30", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4042, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "13026:4:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4041, + "name": "_getVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6278, + "src": "13012:13:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 4043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13012:19:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4040, + "id": 4044, + "nodeType": "Return", + "src": "13005:26:30" + } + ] + }, + "functionSelector": "bb9c0920", + "id": 4046, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "12930:12:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4037, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "12971:8:30" + }, + "parameters": { + "id": 4036, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "user", + "nameLocation": "12951:4:30", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12943:12:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4034, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12943:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "12942:14:30" + }, + "returnParameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4039, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4046, + "src": "12989:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12989:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "12988:6:30" + }, + "scope": 4141, + "src": "12921:117:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2734 + ], + "body": { + "id": 4059, + "nodeType": "Block", + "src": "13124:50:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4055, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4048, + "src": "13152:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4054, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13141:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13141:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4057, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "13141:26:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4053, + "id": 4058, + "nodeType": "Return", + "src": "13134:33:30" + } + ] + }, + "functionSelector": "7a3bc0ee", + "id": 4060, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "13053:14:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4050, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13100:8:30" + }, + "parameters": { + "id": 4049, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4048, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13076:8:30", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13068:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4047, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13068:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13067:18:30" + }, + "returnParameters": { + "id": 4053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4052, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4060, + "src": "13118:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4051, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13118:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13117:6:30" + }, + "scope": 4141, + "src": "13044:130:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2743 + ], + "body": { + "id": 4074, + "nodeType": "Block", + "src": "13277:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 4070, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4062, + "src": "13305:8:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 4069, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "13294:10:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 4071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13294:20:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 4072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "13294:31:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 4068, + "id": 4073, + "nodeType": "Return", + "src": "13287:38:30" + } + ] + }, + "functionSelector": "655aaaca", + "id": 4075, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "13189:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4064, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13241:8:30" + }, + "parameters": { + "id": 4063, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4062, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "13217:8:30", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13209:16:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4061, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "13209:7:30", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "13208:18:30" + }, + "returnParameters": { + "id": 4068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4067, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4075, + "src": "13259:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4065, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13259:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4066, + "nodeType": "ArrayTypeName", + "src": "13259:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13258:18:30" + }, + "scope": 4141, + "src": "13180:152:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2749 + ], + "body": { + "id": 4085, + "nodeType": "Block", + "src": "13405:55:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4081, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13422:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13422:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4083, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "evaluated", + "nodeType": "MemberAccess", + "referencedDeclaration": 4272, + "src": "13422:31:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4080, + "id": 4084, + "nodeType": "Return", + "src": "13415:38:30" + } + ] + }, + "functionSelector": "e327b585", + "id": 4086, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "13347:19:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4077, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13381:8:30" + }, + "parameters": { + "id": 4076, + "nodeType": "ParameterList", + "parameters": [], + "src": "13366:2:30" + }, + "returnParameters": { + "id": 4080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4079, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4086, + "src": "13399:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4078, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13399:4:30", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "13398:6:30" + }, + "scope": 4141, + "src": "13338:122:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2757 + ], + "body": { + "id": 4100, + "nodeType": "Block", + "src": "13550:71:30", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4094, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13567:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13567:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4096, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "13567:36:30", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4098, + "indexExpression": { + "id": 4097, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4088, + "src": "13604:9:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13567:47:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4093, + "id": 4099, + "nodeType": "Return", + "src": "13560:54:30" + } + ] + }, + "functionSelector": "d82f25f0", + "id": 4101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "13475:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4090, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13526:8:30" + }, + "parameters": { + "id": 4089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4088, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "13501:9:30", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13493:17:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4087, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13492:19:30" + }, + "returnParameters": { + "id": 4093, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4092, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4101, + "src": "13544:4:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4091, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13544:4:30", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "13543:6:30" + }, + "scope": 4141, + "src": "13466:155:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2764 + ], + "body": { + "id": 4114, + "nodeType": "Block", + "src": "13707:62:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4108, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "13724:19:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:21:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 4110, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "13724:29:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13724:36:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13724:38:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4107, + "id": 4113, + "nodeType": "Return", + "src": "13717:45:30" + } + ] + }, + "functionSelector": "f2516dbf", + "id": 4115, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "13636:18:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4103, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13671:8:30" + }, + "parameters": { + "id": 4102, + "nodeType": "ParameterList", + "parameters": [], + "src": "13654:2:30" + }, + "returnParameters": { + "id": 4107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4106, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4115, + "src": "13689:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13689:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4105, + "nodeType": "ArrayTypeName", + "src": "13689:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13688:18:30" + }, + "scope": 4141, + "src": "13627:142:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2770 + ], + "body": { + "id": 4125, + "nodeType": "Block", + "src": "13841:53:30", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4121, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13858:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13858:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4123, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "13858:29:30", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4120, + "id": 4124, + "nodeType": "Return", + "src": "13851:36:30" + } + ] + }, + "functionSelector": "c07de0d3", + "id": 4126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "13784:15:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4117, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13814:8:30" + }, + "parameters": { + "id": 4116, + "nodeType": "ParameterList", + "parameters": [], + "src": "13799:2:30" + }, + "returnParameters": { + "id": 4120, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4119, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4126, + "src": "13832:7:30", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13832:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "13831:9:30" + }, + "scope": 4141, + "src": "13775:119:30", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2777 + ], + "body": { + "id": 4139, + "nodeType": "Block", + "src": "13979:64:30", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4133, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "13996:14:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:16:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4135, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "13996:31:30", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 4136, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "13996:38:30", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 4137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13996:40:30", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 4132, + "id": 4138, + "nodeType": "Return", + "src": "13989:47:30" + } + ] + }, + "functionSelector": "606a6b76", + "id": 4140, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "13909:17:30", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4128, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "13943:8:30" + }, + "parameters": { + "id": 4127, + "nodeType": "ParameterList", + "parameters": [], + "src": "13926:2:30" + }, + "returnParameters": { + "id": 4132, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4131, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4140, + "src": "13961:16:30", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13961:7:30", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4130, + "nodeType": "ArrayTypeName", + "src": "13961:9:30", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "13960:18:30" + }, + "scope": 4141, + "src": "13900:143:30", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4142, + "src": "543:13502:30", + "usedErrors": [ + 5, + 19, + 29, + 31, + 1995, + 1997, + 1999, + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:14015:30" + } + }, + "@synthetixio/core-contracts/contracts/errors/InitError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary InitError {\n error AlreadyInitialized();\n error NotInitialized();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "exportedSymbols": { + "InitError": [ + 32 + ] + }, + "id": 33, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 27, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:4" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "InitError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 32, + "linearizedBaseContracts": [ + 32 + ], + "name": "InitError", + "nameLocation": "64:9:4", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 29, + "name": "AlreadyInitialized", + "nameLocation": "86:18:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [], + "src": "104:2:4" + }, + "src": "80:27:4" + }, + { + "id": 31, + "name": "NotInitialized", + "nameLocation": "118:14:4", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:4" + }, + "src": "112:23:4" + } + ], + "scope": 33, + "src": "56:81:4", + "usedErrors": [ + 29, + 31 + ] + } + ], + "src": "31:107:4" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableStorage.sol\";\nimport \"../errors/AccessError.sol\";\n\ncontract OwnableMixin is OwnableStorage {\n modifier onlyOwner() {\n _onlyOwner();\n\n _;\n }\n\n modifier onlyOwnerIfSet() {\n address owner = _getOwner();\n\n // if owner is set then check if msg.sender is the owner\n if (owner != address(0)) {\n _onlyOwner();\n }\n\n _;\n }\n\n function _onlyOwner() internal view {\n if (msg.sender != _getOwner()) {\n revert AccessError.Unauthorized(msg.sender);\n }\n }\n\n function _getOwner() internal view returns (address) {\n return _ownableStore().owner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 477, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 416, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:13" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "file": "./OwnableStorage.sol", + "id": 417, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 495, + "src": "56:30:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 418, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 477, + "sourceUnit": 7, + "src": "87:35:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 419, + "name": "OwnableStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 494, + "src": "149:14:13" + }, + "id": 420, + "nodeType": "InheritanceSpecifier", + "src": "149:14:13" + } + ], + "canonicalName": "OwnableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 476, + "linearizedBaseContracts": [ + 476, + 494 + ], + "name": "OwnableMixin", + "nameLocation": "133:12:13", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 426, + "nodeType": "Block", + "src": "191:41:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 422, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "201:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "201:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "201:12:13" + }, + { + "id": 425, + "nodeType": "PlaceholderStatement", + "src": "224:1:13" + } + ] + }, + "id": 427, + "name": "onlyOwner", + "nameLocation": "179:9:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:13" + }, + "src": "170:62:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 446, + "nodeType": "Block", + "src": "264:193:13", + "statements": [ + { + "assignments": [ + 430 + ], + "declarations": [ + { + "constant": false, + "id": 430, + "mutability": "mutable", + "name": "owner", + "nameLocation": "282:5:13", + "nodeType": "VariableDeclaration", + "scope": 446, + "src": "274:13:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 433, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 431, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "290:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "290:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "274:27:13" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 434, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 430, + "src": "381:5:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "398:1:13", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "390:7:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "390:7:13", + "typeDescriptions": {} + } + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "390:10:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "381:19:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 444, + "nodeType": "IfStatement", + "src": "377:62:13", + "trueBody": { + "id": 443, + "nodeType": "Block", + "src": "402:37:13", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 440, + "name": "_onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 465, + "src": "416:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$__$", + "typeString": "function () view" + } + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "416:12:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 442, + "nodeType": "ExpressionStatement", + "src": "416:12:13" + } + ] + } + }, + { + "id": 445, + "nodeType": "PlaceholderStatement", + "src": "449:1:13" + } + ] + }, + "id": 447, + "name": "onlyOwnerIfSet", + "nameLocation": "247:14:13", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 428, + "nodeType": "ParameterList", + "parameters": [], + "src": "261:2:13" + }, + "src": "238:219:13", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 464, + "nodeType": "Block", + "src": "499:115:13", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 450, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "513:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "513:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 452, + "name": "_getOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 475, + "src": "527:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "527:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "513:25:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 463, + "nodeType": "IfStatement", + "src": "509:99:13", + "trueBody": { + "id": 462, + "nodeType": "Block", + "src": "540:68:13", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 458, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "586:3:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "586:10:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 455, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "561:11:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "561:24:13", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "561:36:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 461, + "nodeType": "RevertStatement", + "src": "554:43:13" + } + ] + } + } + ] + }, + "id": 465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyOwner", + "nameLocation": "472:10:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [], + "src": "482:2:13" + }, + "returnParameters": { + "id": 449, + "nodeType": "ParameterList", + "parameters": [], + "src": "499:0:13" + }, + "scope": 476, + "src": "463:151:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 474, + "nodeType": "Block", + "src": "673:45:13", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 470, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "690:13:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "690:15:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 472, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "690:21:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 469, + "id": 473, + "nodeType": "Return", + "src": "683:28:13" + } + ] + }, + "id": 475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getOwner", + "nameLocation": "629:9:13", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 466, + "nodeType": "ParameterList", + "parameters": [], + "src": "638:2:13" + }, + "returnParameters": { + "id": 469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 468, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 475, + "src": "664:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 467, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "664:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "663:9:13" + }, + "scope": 476, + "src": "620:98:13", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 477, + "src": "124:596:13", + "usedErrors": [] + } + ], + "src": "31:690:13" + } + }, + "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../errors/InitError.sol\";\n\nabstract contract InitializableMixin {\n modifier onlyIfInitialized() {\n if (!_isInitialized()) {\n revert InitError.NotInitialized();\n }\n\n _;\n }\n\n modifier onlyIfNotInitialized() {\n if (_isInitialized()) {\n revert InitError.AlreadyInitialized();\n }\n\n _;\n }\n\n function _isInitialized() internal view virtual returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "exportedSymbols": { + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ] + }, + "id": 69, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 34, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:5" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 35, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 69, + "sourceUnit": 33, + "src": "56:33:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "InitializableMixin", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 68, + "linearizedBaseContracts": [ + 68 + ], + "name": "InitializableMixin", + "nameLocation": "109:18:5", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 48, + "nodeType": "Block", + "src": "163:109:5", + "statements": [ + { + "condition": { + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "177:17:5", + "subExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 37, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "178:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "178:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 46, + "nodeType": "IfStatement", + "src": "173:81:5", + "trueBody": { + "id": 45, + "nodeType": "Block", + "src": "196:58:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 40, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "217:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "217:24:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "217:26:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 44, + "nodeType": "RevertStatement", + "src": "210:33:5" + } + ] + } + }, + { + "id": 47, + "nodeType": "PlaceholderStatement", + "src": "264:1:5" + } + ] + }, + "id": 49, + "name": "onlyIfInitialized", + "nameLocation": "143:17:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 36, + "nodeType": "ParameterList", + "parameters": [], + "src": "160:2:5" + }, + "src": "134:138:5", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 61, + "nodeType": "Block", + "src": "310:112:5", + "statements": [ + { + "condition": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 51, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 67, + "src": "324:14:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 52, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "324:16:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 59, + "nodeType": "IfStatement", + "src": "320:84:5", + "trueBody": { + "id": 58, + "nodeType": "Block", + "src": "342:62:5", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 53, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "363:9:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "363:28:5", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "363:30:5", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 57, + "nodeType": "RevertStatement", + "src": "356:37:5" + } + ] + } + }, + { + "id": 60, + "nodeType": "PlaceholderStatement", + "src": "414:1:5" + } + ] + }, + "id": 62, + "name": "onlyIfNotInitialized", + "nameLocation": "287:20:5", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "307:2:5" + }, + "src": "278:144:5", + "virtual": false, + "visibility": "internal" + }, + { + "id": 67, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "437:14:5", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 63, + "nodeType": "ParameterList", + "parameters": [], + "src": "451:2:5" + }, + "returnParameters": { + "id": 66, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 65, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 67, + "src": "485:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 64, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "485:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "484:6:5" + }, + "scope": 68, + "src": "428:63:5", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 69, + "src": "91:402:5", + "usedErrors": [] + } + ], + "src": "31:463:5" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module for electing a council, represented by a set of NFT holders\ninterface IElectionModule {\n // ---------------------------------------\n // Initialization\n // ---------------------------------------\n\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) external;\n\n /// @notice Shows whether the module has been initialized\n function isElectionModuleInitialized() external view returns (bool);\n\n // ---------------------------------------\n // Owner write functions\n // ---------------------------------------\n\n /// @notice Upgrades the implementation of the existing council NFT token\n function upgradeCouncilToken(address newCouncilTokenImplementation) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)\n function tweakEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Adjusts the current epoch schedule requiring that the current period remains Administration\n function modifyEpochSchedule(\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate\n ) external;\n\n /// @notice Determines minimum values for epoch schedule adjustments\n function setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) external;\n\n /// @notice Determines adjustment size for tweakEpochSchedule\n function setMaxDateAdjustmentTolerance(uint64 newMaxDateAdjustmentTolerance) external;\n\n /// @notice Determines batch size when evaluate() is called with numBallots = 0\n function setDefaultBallotEvaluationBatchSize(uint newDefaultBallotEvaluationBatchSize) external;\n\n /// @notice Determines the number of council members in the next epoch\n function setNextEpochSeatCount(uint8 newSeatCount) external;\n\n /// @notice Determines the minimum number of council members before triggering an emergency election\n function setMinimumActiveMembers(uint8 newMinimumActiveMembers) external;\n\n /// @notice Allows the owner to remove one or more council members, triggering an election if a threshold is met\n function dismissMembers(address[] calldata members) external;\n\n // ---------------------------------------\n // User write functions\n // ---------------------------------------\n\n /// @notice Allows anyone to self-nominate during the Nomination period\n function nominate() external;\n\n /// @notice Self-withdrawal of nominations during the Nomination period\n function withdrawNomination() external;\n\n /// @notice Allows anyone with vote power to vote on nominated candidates during the Voting period\n function cast(address[] calldata candidates) external;\n\n /// @notice Allows votes to be withdraw\n function withdrawVote() external;\n\n /// @notice Processes ballots in batches during the Evaluation period (after epochEndDate)\n function evaluate(uint numBallots) external;\n\n /// @notice Shuffles NFTs and resolves an election after it has been evaluated\n function resolve() external;\n\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Exposes minimum durations required when adjusting epoch schedules\n function getMinEpochDurations()\n external\n view\n returns (\n uint64 minNominationPeriodDuration,\n uint64 minVotingPeriodDuration,\n uint64 minEpochDuration\n );\n\n /// @notice Exposes maximum size of adjustments when calling tweakEpochSchedule\n function getMaxDateAdjustmentTolerance() external view returns (uint64);\n\n /// @notice Shows the default batch size when calling evaluate() with numBallots = 0\n function getDefaultBallotEvaluationBatchSize() external view returns (uint);\n\n /// @notice Shows the number of council members that the next epoch will have\n function getNextEpochSeatCount() external view returns (uint8);\n\n /// @notice Returns the minimum active members that the council needs to avoid an emergency election\n function getMinimumActiveMembers() external view returns (uint8);\n\n /// @notice Returns the index of the current epoch. The first epoch's index is 1\n function getEpochIndex() external view returns (uint);\n\n /// @notice Returns the date in which the current epoch started\n function getEpochStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the current epoch will end\n function getEpochEndDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the current epoch will start\n function getNominationPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the current epoch will start\n function getVotingPeriodStartDate() external view returns (uint64);\n\n /// @notice Returns the current period type: Administration, Nomination, Voting, Evaluation\n function getCurrentPeriod() external view returns (uint);\n\n /// @notice Shows if a candidate has been nominated in the current epoch\n function isNominated(address candidate) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the current epoch\n function getNominees() external view returns (address[] memory);\n\n /// @notice Hashes a list of candidates (used for identifying and storing ballots)\n function calculateBallotId(address[] calldata candidates) external pure returns (bytes32);\n\n /// @notice Returns the ballot id that user voted on in the current election\n function getBallotVoted(address user) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the current election\n function hasVoted(address user) external view returns (bool);\n\n /// @notice Returns the vote power of user in the current election\n function getVotePower(address user) external view returns (uint);\n\n /// @notice Returns the number of votes given to a particular ballot\n function getBallotVotes(bytes32 ballotId) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has\n function getBallotCandidates(bytes32 ballotId) external view returns (address[] memory);\n\n /// @notice Returns whether all ballots in the current election have been counted\n function isElectionEvaluated() external view returns (bool);\n\n /// @notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated\n function getCandidateVotes(address candidate) external view returns (uint);\n\n /// @notice Returns the winners of the current election. Requires the election to be partially or totally evaluated\n function getElectionWinners() external view returns (address[] memory);\n\n /// @notice Returns the address of the council NFT token\n function getCouncilToken() external view returns (address);\n\n /// @notice Returns the current NFT token holders\n function getCouncilMembers() external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "exportedSymbols": { + "IElectionModule": [ + 2778 + ] + }, + "id": 2779, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2486, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:27" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2487, + "nodeType": "StructuredDocumentation", + "src": "56:78:27", + "text": "@title Module for electing a council, represented by a set of NFT holders" + }, + "fullyImplemented": false, + "id": 2778, + "linearizedBaseContracts": [ + 2778 + ], + "name": "IElectionModule", + "nameLocation": "144:15:27", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2488, + "nodeType": "StructuredDocumentation", + "src": "283:73:27", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "ee695137", + "id": 2506, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "370:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2490, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "418:16:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "404:30:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2489, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "404:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2492, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "458:18:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "444:32:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2491, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "444:6:27", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2495, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "503:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "486:29:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2493, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "486:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2494, + "nodeType": "ArrayTypeName", + "src": "486:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2497, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "531:20:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "525:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2496, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "525:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2499, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "568:25:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "561:32:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2498, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "561:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2501, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "610:21:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "603:28:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2500, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "603:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2503, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "648:12:27", + "nodeType": "VariableDeclaration", + "scope": 2506, + "src": "641:19:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2502, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "641:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "394:272:27" + }, + "returnParameters": { + "id": 2505, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:0:27" + }, + "scope": 2778, + "src": "361:315:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2507, + "nodeType": "StructuredDocumentation", + "src": "682:57:27", + "text": "@notice Shows whether the module has been initialized" + }, + "functionSelector": "c5798523", + "id": 2512, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionModuleInitialized", + "nameLocation": "753:27:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2508, + "nodeType": "ParameterList", + "parameters": [], + "src": "780:2:27" + }, + "returnParameters": { + "id": 2511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2510, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2512, + "src": "806:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2509, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "806:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "805:6:27" + }, + "scope": 2778, + "src": "744:68:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2513, + "nodeType": "StructuredDocumentation", + "src": "942:73:27", + "text": "@notice Upgrades the implementation of the existing council NFT token" + }, + "functionSelector": "54520478", + "id": 2518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeCouncilToken", + "nameLocation": "1029:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2515, + "mutability": "mutable", + "name": "newCouncilTokenImplementation", + "nameLocation": "1057:29:27", + "nodeType": "VariableDeclaration", + "scope": 2518, + "src": "1049:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2514, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1049:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1048:39:27" + }, + "returnParameters": { + "id": 2517, + "nodeType": "ParameterList", + "parameters": [], + "src": "1096:0:27" + }, + "scope": 2778, + "src": "1020:77:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2519, + "nodeType": "StructuredDocumentation", + "src": "1103:167:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration, and that changes are small (see setMaxDateAdjustmentTolerance)" + }, + "functionSelector": "8f701997", + "id": 2528, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tweakEpochSchedule", + "nameLocation": "1284:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2521, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1319:28:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1312:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2520, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1312:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1364:24:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1357:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2522, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1357:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2525, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1405:15:27", + "nodeType": "VariableDeclaration", + "scope": 2528, + "src": "1398:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2524, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1398:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1302:124:27" + }, + "returnParameters": { + "id": 2527, + "nodeType": "ParameterList", + "parameters": [], + "src": "1435:0:27" + }, + "scope": 2778, + "src": "1275:161:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2529, + "nodeType": "StructuredDocumentation", + "src": "1442:103:27", + "text": "@notice Adjusts the current epoch schedule requiring that the current period remains Administration" + }, + "functionSelector": "c14d0528", + "id": 2538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "modifyEpochSchedule", + "nameLocation": "1559:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2531, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "1595:28:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1588:35:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2530, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1588:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2533, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "1640:24:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1633:31:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2532, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2535, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "1681:15:27", + "nodeType": "VariableDeclaration", + "scope": 2538, + "src": "1674:22:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2534, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1674:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1578:124:27" + }, + "returnParameters": { + "id": 2537, + "nodeType": "ParameterList", + "parameters": [], + "src": "1711:0:27" + }, + "scope": 2778, + "src": "1550:162:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2539, + "nodeType": "StructuredDocumentation", + "src": "1718:68:27", + "text": "@notice Determines minimum values for epoch schedule adjustments" + }, + "functionSelector": "a25a9f3a", + "id": 2548, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinEpochDurations", + "nameLocation": "1800:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2541, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "1837:30:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1830:37:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2540, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1830:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2543, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "1884:26:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1877:33:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2542, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1877:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2545, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "1927:19:27", + "nodeType": "VariableDeclaration", + "scope": 2548, + "src": "1920:26:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2544, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1920:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1820:132:27" + }, + "returnParameters": { + "id": 2547, + "nodeType": "ParameterList", + "parameters": [], + "src": "1961:0:27" + }, + "scope": 2778, + "src": "1791:171:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2549, + "nodeType": "StructuredDocumentation", + "src": "1968:61:27", + "text": "@notice Determines adjustment size for tweakEpochSchedule" + }, + "functionSelector": "3ac1c5fe", + "id": 2554, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMaxDateAdjustmentTolerance", + "nameLocation": "2043:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2551, + "mutability": "mutable", + "name": "newMaxDateAdjustmentTolerance", + "nameLocation": "2080:29:27", + "nodeType": "VariableDeclaration", + "scope": 2554, + "src": "2073:36:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2550, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2073:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2072:38:27" + }, + "returnParameters": { + "id": 2553, + "nodeType": "ParameterList", + "parameters": [], + "src": "2119:0:27" + }, + "scope": 2778, + "src": "2034:86:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2555, + "nodeType": "StructuredDocumentation", + "src": "2126:79:27", + "text": "@notice Determines batch size when evaluate() is called with numBallots = 0" + }, + "functionSelector": "64deab73", + "id": 2560, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDefaultBallotEvaluationBatchSize", + "nameLocation": "2219:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2557, + "mutability": "mutable", + "name": "newDefaultBallotEvaluationBatchSize", + "nameLocation": "2260:35:27", + "nodeType": "VariableDeclaration", + "scope": 2560, + "src": "2255:40:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2556, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2255:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2254:42:27" + }, + "returnParameters": { + "id": 2559, + "nodeType": "ParameterList", + "parameters": [], + "src": "2305:0:27" + }, + "scope": 2778, + "src": "2210:96:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2561, + "nodeType": "StructuredDocumentation", + "src": "2312:70:27", + "text": "@notice Determines the number of council members in the next epoch" + }, + "functionSelector": "4b5dacac", + "id": 2566, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setNextEpochSeatCount", + "nameLocation": "2396:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2563, + "mutability": "mutable", + "name": "newSeatCount", + "nameLocation": "2424:12:27", + "nodeType": "VariableDeclaration", + "scope": 2566, + "src": "2418:18:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2562, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2418:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2417:20:27" + }, + "returnParameters": { + "id": 2565, + "nodeType": "ParameterList", + "parameters": [], + "src": "2446:0:27" + }, + "scope": 2778, + "src": "2387:60:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2567, + "nodeType": "StructuredDocumentation", + "src": "2453:100:27", + "text": "@notice Determines the minimum number of council members before triggering an emergency election" + }, + "functionSelector": "0438d06e", + "id": 2572, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setMinimumActiveMembers", + "nameLocation": "2567:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2570, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2569, + "mutability": "mutable", + "name": "newMinimumActiveMembers", + "nameLocation": "2597:23:27", + "nodeType": "VariableDeclaration", + "scope": 2572, + "src": "2591:29:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2568, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2591:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "2590:31:27" + }, + "returnParameters": { + "id": 2571, + "nodeType": "ParameterList", + "parameters": [], + "src": "2630:0:27" + }, + "scope": 2778, + "src": "2558:73:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2573, + "nodeType": "StructuredDocumentation", + "src": "2637:112:27", + "text": "@notice Allows the owner to remove one or more council members, triggering an election if a threshold is met" + }, + "functionSelector": "9a25eaf3", + "id": 2579, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "dismissMembers", + "nameLocation": "2763:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2577, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2576, + "mutability": "mutable", + "name": "members", + "nameLocation": "2797:7:27", + "nodeType": "VariableDeclaration", + "scope": 2579, + "src": "2778:26:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2778:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2575, + "nodeType": "ArrayTypeName", + "src": "2778:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2777:28:27" + }, + "returnParameters": { + "id": 2578, + "nodeType": "ParameterList", + "parameters": [], + "src": "2814:0:27" + }, + "scope": 2778, + "src": "2754:61:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2580, + "nodeType": "StructuredDocumentation", + "src": "2944:71:27", + "text": "@notice Allows anyone to self-nominate during the Nomination period" + }, + "functionSelector": "fcd7e1d7", + "id": 2583, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominate", + "nameLocation": "3029:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2581, + "nodeType": "ParameterList", + "parameters": [], + "src": "3037:2:27" + }, + "returnParameters": { + "id": 2582, + "nodeType": "ParameterList", + "parameters": [], + "src": "3048:0:27" + }, + "scope": 2778, + "src": "3020:29:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2584, + "nodeType": "StructuredDocumentation", + "src": "3055:71:27", + "text": "@notice Self-withdrawal of nominations during the Nomination period" + }, + "functionSelector": "d11801cf", + "id": 2587, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawNomination", + "nameLocation": "3140:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2585, + "nodeType": "ParameterList", + "parameters": [], + "src": "3158:2:27" + }, + "returnParameters": { + "id": 2586, + "nodeType": "ParameterList", + "parameters": [], + "src": "3169:0:27" + }, + "scope": 2778, + "src": "3131:39:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2588, + "nodeType": "StructuredDocumentation", + "src": "3176:98:27", + "text": "@notice Allows anyone with vote power to vote on nominated candidates during the Voting period" + }, + "functionSelector": "84ae670c", + "id": 2594, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "cast", + "nameLocation": "3288:4:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2591, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3312:10:27", + "nodeType": "VariableDeclaration", + "scope": 2594, + "src": "3293:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2589, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3293:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2590, + "nodeType": "ArrayTypeName", + "src": "3293:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3292:31:27" + }, + "returnParameters": { + "id": 2593, + "nodeType": "ParameterList", + "parameters": [], + "src": "3332:0:27" + }, + "scope": 2778, + "src": "3279:54:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2595, + "nodeType": "StructuredDocumentation", + "src": "3339:39:27", + "text": "@notice Allows votes to be withdraw" + }, + "functionSelector": "d83eb231", + "id": 2598, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "withdrawVote", + "nameLocation": "3392:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2596, + "nodeType": "ParameterList", + "parameters": [], + "src": "3404:2:27" + }, + "returnParameters": { + "id": 2597, + "nodeType": "ParameterList", + "parameters": [], + "src": "3415:0:27" + }, + "scope": 2778, + "src": "3383:33:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2599, + "nodeType": "StructuredDocumentation", + "src": "3422:90:27", + "text": "@notice Processes ballots in batches during the Evaluation period (after epochEndDate)" + }, + "functionSelector": "37143233", + "id": 2604, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "evaluate", + "nameLocation": "3526:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2602, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2601, + "mutability": "mutable", + "name": "numBallots", + "nameLocation": "3540:10:27", + "nodeType": "VariableDeclaration", + "scope": 2604, + "src": "3535:15:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2600, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3535:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3534:17:27" + }, + "returnParameters": { + "id": 2603, + "nodeType": "ParameterList", + "parameters": [], + "src": "3560:0:27" + }, + "scope": 2778, + "src": "3517:44:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2605, + "nodeType": "StructuredDocumentation", + "src": "3567:78:27", + "text": "@notice Shuffles NFTs and resolves an election after it has been evaluated" + }, + "functionSelector": "2810e1d6", + "id": 2608, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "resolve", + "nameLocation": "3659:7:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2606, + "nodeType": "ParameterList", + "parameters": [], + "src": "3666:2:27" + }, + "returnParameters": { + "id": 2607, + "nodeType": "ParameterList", + "parameters": [], + "src": "3677:0:27" + }, + "scope": 2778, + "src": "3650:28:27", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2609, + "nodeType": "StructuredDocumentation", + "src": "3801:77:27", + "text": "@notice Exposes minimum durations required when adjusting epoch schedules" + }, + "functionSelector": "8625c053", + "id": 2618, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinEpochDurations", + "nameLocation": "3892:20:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2610, + "nodeType": "ParameterList", + "parameters": [], + "src": "3912:2:27" + }, + "returnParameters": { + "id": 2617, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2612, + "mutability": "mutable", + "name": "minNominationPeriodDuration", + "nameLocation": "3982:27:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "3975:34:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2611, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3975:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2614, + "mutability": "mutable", + "name": "minVotingPeriodDuration", + "nameLocation": "4030:23:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4023:30:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2613, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4023:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2616, + "mutability": "mutable", + "name": "minEpochDuration", + "nameLocation": "4074:16:27", + "nodeType": "VariableDeclaration", + "scope": 2618, + "src": "4067:23:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2615, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4067:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "3961:139:27" + }, + "scope": 2778, + "src": "3883:218:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2619, + "nodeType": "StructuredDocumentation", + "src": "4107:79:27", + "text": "@notice Exposes maximum size of adjustments when calling tweakEpochSchedule" + }, + "functionSelector": "e9544a51", + "id": 2624, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMaxDateAdjustmentTolerance", + "nameLocation": "4200:29:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2620, + "nodeType": "ParameterList", + "parameters": [], + "src": "4229:2:27" + }, + "returnParameters": { + "id": 2623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2622, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2624, + "src": "4255:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2621, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "4255:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "4254:8:27" + }, + "scope": 2778, + "src": "4191:72:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2625, + "nodeType": "StructuredDocumentation", + "src": "4269:84:27", + "text": "@notice Shows the default batch size when calling evaluate() with numBallots = 0" + }, + "functionSelector": "0f98dfba", + "id": 2630, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDefaultBallotEvaluationBatchSize", + "nameLocation": "4367:35:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2626, + "nodeType": "ParameterList", + "parameters": [], + "src": "4402:2:27" + }, + "returnParameters": { + "id": 2629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2628, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2630, + "src": "4428:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2627, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4428:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4427:6:27" + }, + "scope": 2778, + "src": "4358:76:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2631, + "nodeType": "StructuredDocumentation", + "src": "4440:77:27", + "text": "@notice Shows the number of council members that the next epoch will have" + }, + "functionSelector": "447068ef", + "id": 2636, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNextEpochSeatCount", + "nameLocation": "4531:21:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2632, + "nodeType": "ParameterList", + "parameters": [], + "src": "4552:2:27" + }, + "returnParameters": { + "id": 2635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2634, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2636, + "src": "4578:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2633, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4578:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4577:7:27" + }, + "scope": 2778, + "src": "4522:63:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2637, + "nodeType": "StructuredDocumentation", + "src": "4591:100:27", + "text": "@notice Returns the minimum active members that the council needs to avoid an emergency election" + }, + "functionSelector": "85160425", + "id": 2642, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinimumActiveMembers", + "nameLocation": "4705:23:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2638, + "nodeType": "ParameterList", + "parameters": [], + "src": "4728:2:27" + }, + "returnParameters": { + "id": 2641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2642, + "src": "4754:5:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2639, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4754:5:27", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "4753:7:27" + }, + "scope": 2778, + "src": "4696:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2643, + "nodeType": "StructuredDocumentation", + "src": "4767:80:27", + "text": "@notice Returns the index of the current epoch. The first epoch's index is 1" + }, + "functionSelector": "ffe7f643", + "id": 2648, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochIndex", + "nameLocation": "4861:13:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2644, + "nodeType": "ParameterList", + "parameters": [], + "src": "4874:2:27" + }, + "returnParameters": { + "id": 2647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2646, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2648, + "src": "4900:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2645, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4900:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4899:6:27" + }, + "scope": 2778, + "src": "4852:54:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2649, + "nodeType": "StructuredDocumentation", + "src": "4912:63:27", + "text": "@notice Returns the date in which the current epoch started" + }, + "functionSelector": "ce04e44c", + "id": 2654, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDate", + "nameLocation": "4989:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2650, + "nodeType": "ParameterList", + "parameters": [], + "src": "5006:2:27" + }, + "returnParameters": { + "id": 2653, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2652, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2654, + "src": "5032:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2651, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5032:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5031:8:27" + }, + "scope": 2778, + "src": "4980:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2655, + "nodeType": "StructuredDocumentation", + "src": "5046:64:27", + "text": "@notice Returns the date in which the current epoch will end" + }, + "functionSelector": "362c906d", + "id": 2660, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDate", + "nameLocation": "5124:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2656, + "nodeType": "ParameterList", + "parameters": [], + "src": "5139:2:27" + }, + "returnParameters": { + "id": 2659, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2658, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2660, + "src": "5165:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2657, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5165:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5164:8:27" + }, + "scope": 2778, + "src": "5115:58:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2661, + "nodeType": "StructuredDocumentation", + "src": "5179:91:27", + "text": "@notice Returns the date in which the Nomination period in the current epoch will start" + }, + "functionSelector": "e420d7f9", + "id": 2666, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDate", + "nameLocation": "5284:28:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2662, + "nodeType": "ParameterList", + "parameters": [], + "src": "5312:2:27" + }, + "returnParameters": { + "id": 2665, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2664, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2666, + "src": "5338:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2663, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5338:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5337:8:27" + }, + "scope": 2778, + "src": "5275:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2667, + "nodeType": "StructuredDocumentation", + "src": "5352:87:27", + "text": "@notice Returns the date in which the Voting period in the current epoch will start" + }, + "functionSelector": "e1509015", + "id": 2672, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDate", + "nameLocation": "5453:24:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2668, + "nodeType": "ParameterList", + "parameters": [], + "src": "5477:2:27" + }, + "returnParameters": { + "id": 2671, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2670, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2672, + "src": "5503:6:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2669, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5503:6:27", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "5502:8:27" + }, + "scope": 2778, + "src": "5444:67:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2673, + "nodeType": "StructuredDocumentation", + "src": "5517:91:27", + "text": "@notice Returns the current period type: Administration, Nomination, Voting, Evaluation" + }, + "functionSelector": "086146d2", + "id": 2678, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCurrentPeriod", + "nameLocation": "5622:16:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2674, + "nodeType": "ParameterList", + "parameters": [], + "src": "5638:2:27" + }, + "returnParameters": { + "id": 2677, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2676, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2678, + "src": "5664:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2675, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5664:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5663:6:27" + }, + "scope": 2778, + "src": "5613:57:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2679, + "nodeType": "StructuredDocumentation", + "src": "5676:72:27", + "text": "@notice Shows if a candidate has been nominated in the current epoch" + }, + "functionSelector": "3a3e6c81", + "id": 2686, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isNominated", + "nameLocation": "5762:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2681, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "5782:9:27", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5774:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5774:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5773:19:27" + }, + "returnParameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2684, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2686, + "src": "5816:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2683, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5816:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5815:6:27" + }, + "scope": 2778, + "src": "5753:69:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2687, + "nodeType": "StructuredDocumentation", + "src": "5828:75:27", + "text": "@notice Returns a list of all nominated candidates in the current epoch" + }, + "functionSelector": "9636f67c", + "id": 2693, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominees", + "nameLocation": "5917:11:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2688, + "nodeType": "ParameterList", + "parameters": [], + "src": "5928:2:27" + }, + "returnParameters": { + "id": 2692, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2691, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2693, + "src": "5954:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2689, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5954:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2690, + "nodeType": "ArrayTypeName", + "src": "5954:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5953:18:27" + }, + "scope": 2778, + "src": "5908:64:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2694, + "nodeType": "StructuredDocumentation", + "src": "5978:82:27", + "text": "@notice Hashes a list of candidates (used for identifying and storing ballots)" + }, + "functionSelector": "edc968ba", + "id": 2702, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "calculateBallotId", + "nameLocation": "6074:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2698, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2697, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6111:10:27", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6092:29:27", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2695, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6092:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2696, + "nodeType": "ArrayTypeName", + "src": "6092:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6091:31:27" + }, + "returnParameters": { + "id": 2701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2700, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2702, + "src": "6146:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2699, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6146:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6145:9:27" + }, + "scope": 2778, + "src": "6065:90:27", + "stateMutability": "pure", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2703, + "nodeType": "StructuredDocumentation", + "src": "6161:76:27", + "text": "@notice Returns the ballot id that user voted on in the current election" + }, + "functionSelector": "95ff6584", + "id": 2710, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVoted", + "nameLocation": "6251:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2706, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2705, + "mutability": "mutable", + "name": "user", + "nameLocation": "6274:4:27", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6266:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6266:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6265:14:27" + }, + "returnParameters": { + "id": 2709, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2708, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2710, + "src": "6303:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2707, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6303:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6302:9:27" + }, + "scope": 2778, + "src": "6242:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2711, + "nodeType": "StructuredDocumentation", + "src": "6318:61:27", + "text": "@notice Returns if user has voted in the current election" + }, + "functionSelector": "09eef43e", + "id": 2718, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVoted", + "nameLocation": "6393:8:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2713, + "mutability": "mutable", + "name": "user", + "nameLocation": "6410:4:27", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6402:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2712, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6402:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6401:14:27" + }, + "returnParameters": { + "id": 2717, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2716, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2718, + "src": "6439:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2715, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6439:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "6438:6:27" + }, + "scope": 2778, + "src": "6384:61:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2719, + "nodeType": "StructuredDocumentation", + "src": "6451:66:27", + "text": "@notice Returns the vote power of user in the current election" + }, + "functionSelector": "bb9c0920", + "id": 2726, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotePower", + "nameLocation": "6531:12:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "user", + "nameLocation": "6552:4:27", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6544:12:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2720, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6544:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6543:14:27" + }, + "returnParameters": { + "id": 2725, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2724, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2726, + "src": "6581:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2723, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6581:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6580:6:27" + }, + "scope": 2778, + "src": "6522:65:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2727, + "nodeType": "StructuredDocumentation", + "src": "6593:68:27", + "text": "@notice Returns the number of votes given to a particular ballot" + }, + "functionSelector": "7a3bc0ee", + "id": 2734, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotes", + "nameLocation": "6675:14:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2730, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2729, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6698:8:27", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6690:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2728, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6690:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6689:18:27" + }, + "returnParameters": { + "id": 2733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2732, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2734, + "src": "6731:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2731, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6731:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6730:6:27" + }, + "scope": 2778, + "src": "6666:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2735, + "nodeType": "StructuredDocumentation", + "src": "6743:71:27", + "text": "@notice Returns the list of candidates that a particular ballot has" + }, + "functionSelector": "655aaaca", + "id": 2743, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidates", + "nameLocation": "6828:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2738, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2737, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "6856:8:27", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6848:16:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2736, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6848:7:27", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "6847:18:27" + }, + "returnParameters": { + "id": 2742, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2741, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2743, + "src": "6889:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6889:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2740, + "nodeType": "ArrayTypeName", + "src": "6889:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6888:18:27" + }, + "scope": 2778, + "src": "6819:88:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2744, + "nodeType": "StructuredDocumentation", + "src": "6913:81:27", + "text": "@notice Returns whether all ballots in the current election have been counted" + }, + "functionSelector": "e327b585", + "id": 2749, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isElectionEvaluated", + "nameLocation": "7008:19:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2745, + "nodeType": "ParameterList", + "parameters": [], + "src": "7027:2:27" + }, + "returnParameters": { + "id": 2748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2747, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2749, + "src": "7053:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2746, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7053:4:27", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7052:6:27" + }, + "scope": 2778, + "src": "6999:60:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2750, + "nodeType": "StructuredDocumentation", + "src": "7065:120:27", + "text": "@notice Returns the number of votes a candidate received. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "d82f25f0", + "id": 2757, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotes", + "nameLocation": "7199:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2753, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2752, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "7225:9:27", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7217:17:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7217:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7216:19:27" + }, + "returnParameters": { + "id": 2756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2755, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2757, + "src": "7259:4:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2754, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7259:4:27", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "7258:6:27" + }, + "scope": 2778, + "src": "7190:75:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2758, + "nodeType": "StructuredDocumentation", + "src": "7271:115:27", + "text": "@notice Returns the winners of the current election. Requires the election to be partially or totally evaluated" + }, + "functionSelector": "f2516dbf", + "id": 2764, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinners", + "nameLocation": "7400:18:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2759, + "nodeType": "ParameterList", + "parameters": [], + "src": "7418:2:27" + }, + "returnParameters": { + "id": 2763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2762, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2764, + "src": "7444:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7444:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2761, + "nodeType": "ArrayTypeName", + "src": "7444:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7443:18:27" + }, + "scope": 2778, + "src": "7391:71:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2765, + "nodeType": "StructuredDocumentation", + "src": "7468:56:27", + "text": "@notice Returns the address of the council NFT token" + }, + "functionSelector": "c07de0d3", + "id": 2770, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilToken", + "nameLocation": "7538:15:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2766, + "nodeType": "ParameterList", + "parameters": [], + "src": "7553:2:27" + }, + "returnParameters": { + "id": 2769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2768, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2770, + "src": "7579:7:27", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7579:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "7578:9:27" + }, + "scope": 2778, + "src": "7529:59:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2771, + "nodeType": "StructuredDocumentation", + "src": "7594:49:27", + "text": "@notice Returns the current NFT token holders" + }, + "functionSelector": "606a6b76", + "id": 2777, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCouncilMembers", + "nameLocation": "7657:17:27", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2772, + "nodeType": "ParameterList", + "parameters": [], + "src": "7674:2:27" + }, + "returnParameters": { + "id": 2776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2775, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2777, + "src": "7700:16:27", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7700:7:27", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2774, + "nodeType": "ArrayTypeName", + "src": "7700:9:27", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7699:18:27" + }, + "scope": 2778, + "src": "7648:70:27", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2779, + "src": "134:7586:27", + "usedErrors": [] + } + ], + "src": "31:7690:27" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/InitError.sol\";\n\n/// @dev Provides core schedule functionality. I.e. dates, periods, etc\ncontract ElectionSchedule is ElectionBase {\n /// @dev Used to allow certain functions to only operate within a given period\n modifier onlyInPeriod(ElectionPeriod period) {\n _onlyInPeriod(period);\n\n _;\n }\n\n function _onlyInPeriod(ElectionPeriod period) private view {\n if (_getCurrentPeriod() != period) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Only allow to run in any of the given two periods\n modifier onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) {\n _onlyInPeriods(period1, period2);\n\n _;\n }\n\n function _onlyInPeriods(ElectionPeriod period1, ElectionPeriod period2) private view {\n ElectionPeriod currentPeriod = _getCurrentPeriod();\n\n if (currentPeriod != period1 && currentPeriod != period2) {\n revert NotCallableInCurrentPeriod();\n }\n }\n\n /// @dev Determines the current period type according to the current time and the epoch's dates\n function _getCurrentPeriod() internal view returns (ElectionPeriod) {\n if (!_electionStore().initialized) {\n revert InitError.NotInitialized();\n }\n\n EpochData storage epoch = _getCurrentEpoch();\n\n uint64 currentTime = uint64(block.timestamp);\n\n if (currentTime >= epoch.endDate) {\n return ElectionPeriod.Evaluation;\n }\n\n if (currentTime >= epoch.votingPeriodStartDate) {\n return ElectionPeriod.Vote;\n }\n\n if (currentTime >= epoch.nominationPeriodStartDate) {\n return ElectionPeriod.Nomination;\n }\n\n return ElectionPeriod.Administration;\n }\n\n /// @dev Sets dates within an epoch, with validations\n function _configureEpochSchedule(\n EpochData storage epoch,\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) internal {\n _validateEpochSchedule(epochStartDate, nominationPeriodStartDate, votingPeriodStartDate, epochEndDate);\n\n epoch.startDate = epochStartDate;\n epoch.nominationPeriodStartDate = nominationPeriodStartDate;\n epoch.votingPeriodStartDate = votingPeriodStartDate;\n epoch.endDate = epochEndDate;\n }\n\n /// @dev Ensures epoch dates are in the correct order, durations are above minimums, etc\n function _validateEpochSchedule(\n uint64 epochStartDate,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate\n ) private view {\n if (\n epochEndDate <= votingPeriodStartDate ||\n votingPeriodStartDate <= nominationPeriodStartDate ||\n nominationPeriodStartDate <= epochStartDate\n ) {\n revert InvalidEpochConfiguration();\n }\n\n uint64 epochDuration = epochEndDate - epochStartDate;\n uint64 votingPeriodDuration = epochEndDate - votingPeriodStartDate;\n uint64 nominationPeriodDuration = votingPeriodStartDate - nominationPeriodStartDate;\n\n ElectionSettings storage settings = _electionSettings();\n\n if (\n epochDuration < settings.minEpochDuration ||\n nominationPeriodDuration < settings.minNominationPeriodDuration ||\n votingPeriodDuration < settings.minVotingPeriodDuration\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n /// @dev Changes epoch dates, with validations\n function _adjustEpochSchedule(\n EpochData storage epoch,\n uint64 newNominationPeriodStartDate,\n uint64 newVotingPeriodStartDate,\n uint64 newEpochEndDate,\n bool ensureChangesAreSmall\n ) internal {\n uint64 maxDateAdjustmentTolerance = _electionSettings().maxDateAdjustmentTolerance;\n ElectionPeriod initialPeriod = _getCurrentPeriod();\n\n if (ensureChangesAreSmall) {\n if (\n _uint64AbsDifference(newEpochEndDate, epoch.endDate) > maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newNominationPeriodStartDate, epoch.nominationPeriodStartDate) >\n maxDateAdjustmentTolerance ||\n _uint64AbsDifference(newVotingPeriodStartDate, epoch.votingPeriodStartDate) > maxDateAdjustmentTolerance\n ) {\n revert InvalidEpochConfiguration();\n }\n }\n\n _configureEpochSchedule(\n epoch,\n epoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n\n if (_getCurrentPeriod() != initialPeriod) {\n revert ChangesCurrentPeriod();\n }\n }\n\n /// @dev Moves schedule forward to immediately jump to the nomination period\n function _jumpToNominationPeriod() internal {\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 nominationPeriodDuration = _getNominationPeriodDuration(currentEpoch);\n uint64 votingPeriodDuration = _getVotingPeriodDuration(currentEpoch);\n\n // Keep the previous durations, but shift everything back\n // so that nominations start now\n uint64 newNominationPeriodStartDate = uint64(block.timestamp);\n uint64 newVotingPeriodStartDate = newNominationPeriodStartDate + nominationPeriodDuration;\n uint64 newEpochEndDate = newVotingPeriodStartDate + votingPeriodDuration;\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpoch.startDate,\n newNominationPeriodStartDate,\n newVotingPeriodStartDate,\n newEpochEndDate\n );\n }\n\n /// @dev Copies the current epoch schedule to the next epoch, maintaining durations\n function _copyScheduleFromPreviousEpoch() internal {\n EpochData storage previousEpoch = _getPreviousEpoch();\n EpochData storage currentEpoch = _getCurrentEpoch();\n\n uint64 currentEpochStartDate = uint64(block.timestamp);\n uint64 currentEpochEndDate = currentEpochStartDate + _getEpochDuration(previousEpoch);\n uint64 currentVotingPeriodStartDate = currentEpochEndDate - _getVotingPeriodDuration(previousEpoch);\n uint64 currentNominationPeriodStartDate = currentVotingPeriodStartDate - _getNominationPeriodDuration(previousEpoch);\n\n _configureEpochSchedule(\n currentEpoch,\n currentEpochStartDate,\n currentNominationPeriodStartDate,\n currentVotingPeriodStartDate,\n currentEpochEndDate\n );\n }\n\n /// @dev Sets the minimum epoch durations, with validations\n function _setMinEpochDurations(\n uint64 newMinNominationPeriodDuration,\n uint64 newMinVotingPeriodDuration,\n uint64 newMinEpochDuration\n ) internal {\n ElectionSettings storage settings = _electionSettings();\n\n if (newMinNominationPeriodDuration == 0 || newMinVotingPeriodDuration == 0 || newMinEpochDuration == 0) {\n revert InvalidElectionSettings();\n }\n\n settings.minNominationPeriodDuration = newMinNominationPeriodDuration;\n settings.minVotingPeriodDuration = newMinVotingPeriodDuration;\n settings.minEpochDuration = newMinEpochDuration;\n }\n\n function _uint64AbsDifference(uint64 valueA, uint64 valueB) private pure returns (uint64) {\n return valueA > valueB ? valueA - valueB : valueB - valueA;\n }\n\n function _getEpochDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.startDate;\n }\n\n function _getVotingPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.endDate - epoch.votingPeriodStartDate;\n }\n\n function _getNominationPeriodDuration(EpochData storage epoch) private view returns (uint64) {\n return epoch.votingPeriodStartDate - epoch.nominationPeriodStartDate;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionSchedule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionSchedule": [ + 5630 + ], + "ElectionStorage": [ + 4331 + ], + "InitError": [ + 32 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 5631, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5067, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:36" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5068, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 4684, + "src": "56:28:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "id": 5069, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5631, + "sourceUnit": 33, + "src": "85:68:36", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5071, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "256:12:36" + }, + "id": 5072, + "nodeType": "InheritanceSpecifier", + "src": "256:12:36" + } + ], + "canonicalName": "ElectionSchedule", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5070, + "nodeType": "StructuredDocumentation", + "src": "155:72:36", + "text": "@dev Provides core schedule functionality. I.e. dates, periods, etc" + }, + "fullyImplemented": true, + "id": 5630, + "linearizedBaseContracts": [ + 5630, + 4683, + 4331 + ], + "name": "ElectionSchedule", + "nameLocation": "236:16:36", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 5083, + "nodeType": "Block", + "src": "403:50:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5079, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5076, + "src": "427:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5078, + "name": "_onlyInPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5100, + "src": "413:13:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "413:21:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5081, + "nodeType": "ExpressionStatement", + "src": "413:21:36" + }, + { + "id": 5082, + "nodeType": "PlaceholderStatement", + "src": "445:1:36" + } + ] + }, + "documentation": { + "id": 5073, + "nodeType": "StructuredDocumentation", + "src": "275:78:36", + "text": "@dev Used to allow certain functions to only operate within a given period" + }, + "id": 5084, + "name": "onlyInPeriod", + "nameLocation": "367:12:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5076, + "mutability": "mutable", + "name": "period", + "nameLocation": "395:6:36", + "nodeType": "VariableDeclaration", + "scope": 5084, + "src": "380:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5075, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5074, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "380:14:36" + }, + "referencedDeclaration": 4342, + "src": "380:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "379:23:36" + }, + "src": "358:95:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5099, + "nodeType": "Block", + "src": "518:111:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5090, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "532:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "532:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5092, + "name": "period", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5087, + "src": "555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "532:29:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5098, + "nodeType": "IfStatement", + "src": "528:95:36", + "trueBody": { + "id": 5097, + "nodeType": "Block", + "src": "563:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5094, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "584:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "584:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5096, + "nodeType": "RevertStatement", + "src": "577:35:36" + } + ] + } + } + ] + }, + "id": 5100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriod", + "nameLocation": "468:13:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5087, + "mutability": "mutable", + "name": "period", + "nameLocation": "497:6:36", + "nodeType": "VariableDeclaration", + "scope": 5100, + "src": "482:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5086, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5085, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "482:14:36" + }, + "referencedDeclaration": 4342, + "src": "482:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "481:23:36" + }, + "returnParameters": { + "id": 5089, + "nodeType": "ParameterList", + "parameters": [], + "src": "518:0:36" + }, + "scope": 5630, + "src": "459:170:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5115, + "nodeType": "Block", + "src": "769:61:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5110, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5104, + "src": "794:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + { + "id": 5111, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5107, + "src": "803:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + ], + "id": 5109, + "name": "_onlyInPeriods", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5144, + "src": "779:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_enum$_ElectionPeriod_$4342_$_t_enum$_ElectionPeriod_$4342_$returns$__$", + "typeString": "function (enum ElectionBase.ElectionPeriod,enum ElectionBase.ElectionPeriod) view" + } + }, + "id": 5112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5113, + "nodeType": "ExpressionStatement", + "src": "779:32:36" + }, + { + "id": 5114, + "nodeType": "PlaceholderStatement", + "src": "822:1:36" + } + ] + }, + "documentation": { + "id": 5101, + "nodeType": "StructuredDocumentation", + "src": "635:58:36", + "text": "@dev Only allow to run in any of the given two periods" + }, + "id": 5116, + "name": "onlyInPeriods", + "nameLocation": "707:13:36", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 5108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5104, + "mutability": "mutable", + "name": "period1", + "nameLocation": "736:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "721:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5103, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5102, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "721:14:36" + }, + "referencedDeclaration": 4342, + "src": "721:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5107, + "mutability": "mutable", + "name": "period2", + "nameLocation": "760:7:36", + "nodeType": "VariableDeclaration", + "scope": 5116, + "src": "745:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5106, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5105, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "745:14:36" + }, + "referencedDeclaration": 4342, + "src": "745:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "720:48:36" + }, + "src": "698:132:36", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5143, + "nodeType": "Block", + "src": "921:195:36", + "statements": [ + { + "assignments": [ + 5127 + ], + "declarations": [ + { + "constant": false, + "id": 5127, + "mutability": "mutable", + "name": "currentPeriod", + "nameLocation": "946:13:36", + "nodeType": "VariableDeclaration", + "scope": 5143, + "src": "931:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5126, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5125, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "931:14:36" + }, + "referencedDeclaration": 4342, + "src": "931:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5130, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5128, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "962:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "962:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "931:50:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5131, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "996:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5132, + "name": "period1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "1013:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "996:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5134, + "name": "currentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5127, + "src": "1024:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5135, + "name": "period2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5122, + "src": "1041:7:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "1024:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "996:52:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5142, + "nodeType": "IfStatement", + "src": "992:118:36", + "trueBody": { + "id": 5141, + "nodeType": "Block", + "src": "1050:60:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5138, + "name": "NotCallableInCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4364, + "src": "1071:26:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1071:28:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5140, + "nodeType": "RevertStatement", + "src": "1064:35:36" + } + ] + } + } + ] + }, + "id": 5144, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_onlyInPeriods", + "nameLocation": "845:14:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "period1", + "nameLocation": "875:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "860:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5118, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5117, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "860:14:36" + }, + "referencedDeclaration": 4342, + "src": "860:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5122, + "mutability": "mutable", + "name": "period2", + "nameLocation": "899:7:36", + "nodeType": "VariableDeclaration", + "scope": 5144, + "src": "884:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5121, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5120, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "884:14:36" + }, + "referencedDeclaration": 4342, + "src": "884:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "859:48:36" + }, + "returnParameters": { + "id": 5124, + "nodeType": "ParameterList", + "parameters": [], + "src": "921:0:36" + }, + "scope": 5630, + "src": "836:280:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5206, + "nodeType": "Block", + "src": "1290:595:36", + "statements": [ + { + "condition": { + "id": 5154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1304:29:36", + "subExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5151, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1305:14:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1305:16:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5153, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 4223, + "src": "1305:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5161, + "nodeType": "IfStatement", + "src": "1300:93:36", + "trueBody": { + "id": 5160, + "nodeType": "Block", + "src": "1335:58:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 5155, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1356:9:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 5157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 31, + "src": "1356:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1356:26:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5159, + "nodeType": "RevertStatement", + "src": "1349:33:36" + } + ] + } + }, + { + "assignments": [ + 5164 + ], + "declarations": [ + { + "constant": false, + "id": 5164, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "1421:5:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1403:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5163, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5162, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1403:9:36" + }, + "referencedDeclaration": 4270, + "src": "1403:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5167, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5165, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "1429:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1403:44:36" + }, + { + "assignments": [ + 5169 + ], + "declarations": [ + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "currentTime", + "nameLocation": "1465:11:36", + "nodeType": "VariableDeclaration", + "scope": 5206, + "src": "1458:18:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5168, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1458:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5175, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5172, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1486:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "1486:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5171, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1479:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5170, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1479:6:36", + "typeDescriptions": {} + } + }, + "id": 5174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1479:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1458:44:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5179, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5176, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1517:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5177, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1532:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "1532:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1517:28:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5184, + "nodeType": "IfStatement", + "src": "1513:91:36", + "trueBody": { + "id": 5183, + "nodeType": "Block", + "src": "1547:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5180, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1568:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Evaluation", + "nodeType": "MemberAccess", + "referencedDeclaration": 4341, + "src": "1568:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5182, + "nodeType": "Return", + "src": "1561:32:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5185, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1618:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5186, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1633:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5187, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "1633:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1618:42:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5193, + "nodeType": "IfStatement", + "src": "1614:99:36", + "trueBody": { + "id": 5192, + "nodeType": "Block", + "src": "1662:51:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5189, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1683:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4340, + "src": "1683:19:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5191, + "nodeType": "Return", + "src": "1676:26:36" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5194, + "name": "currentTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1727:11:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 5195, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5164, + "src": "1742:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "1742:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "1727:46:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5202, + "nodeType": "IfStatement", + "src": "1723:109:36", + "trueBody": { + "id": 5201, + "nodeType": "Block", + "src": "1775:57:36", + "statements": [ + { + "expression": { + "expression": { + "id": 5198, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1796:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 4339, + "src": "1796:25:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5200, + "nodeType": "Return", + "src": "1789:32:36" + } + ] + } + }, + { + "expression": { + "expression": { + "id": 5203, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4342, + "src": "1849:14:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4338, + "src": "1849:29:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "functionReturnParameters": 5150, + "id": 5205, + "nodeType": "Return", + "src": "1842:36:36" + } + ] + }, + "documentation": { + "id": 5145, + "nodeType": "StructuredDocumentation", + "src": "1122:95:36", + "text": "@dev Determines the current period type according to the current time and the epoch's dates" + }, + "id": 5207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCurrentPeriod", + "nameLocation": "1231:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5146, + "nodeType": "ParameterList", + "parameters": [], + "src": "1248:2:36" + }, + "returnParameters": { + "id": 5150, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5149, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5207, + "src": "1274:14:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5148, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5147, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "1274:14:36" + }, + "referencedDeclaration": 4342, + "src": "1274:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "src": "1273:16:36" + }, + "scope": 5630, + "src": "1222:663:36", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5253, + "nodeType": "Block", + "src": "2170:330:36", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 5223, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2203:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5224, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2219:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5225, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2246:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5226, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2269:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5222, + "name": "_validateEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "2180:22:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (uint64,uint64,uint64,uint64) view" + } + }, + "id": 5227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2180:102:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5228, + "nodeType": "ExpressionStatement", + "src": "2180:102:36" + }, + { + "expression": { + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5229, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2293:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5231, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "2293:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5232, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5213, + "src": "2311:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2293:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5234, + "nodeType": "ExpressionStatement", + "src": "2293:32:36" + }, + { + "expression": { + "id": 5239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5235, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2335:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5237, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "2335:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5238, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2369:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2335:59:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5240, + "nodeType": "ExpressionStatement", + "src": "2335:59:36" + }, + { + "expression": { + "id": 5245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5241, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2404:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5243, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "2404:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5244, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5217, + "src": "2434:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2404:51:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5246, + "nodeType": "ExpressionStatement", + "src": "2404:51:36" + }, + { + "expression": { + "id": 5251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5247, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2465:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5249, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "2465:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5250, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5219, + "src": "2481:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2465:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5252, + "nodeType": "ExpressionStatement", + "src": "2465:28:36" + } + ] + }, + "documentation": { + "id": 5208, + "nodeType": "StructuredDocumentation", + "src": "1891:53:36", + "text": "@dev Sets dates within an epoch, with validations" + }, + "id": 5254, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_configureEpochSchedule", + "nameLocation": "1958:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5211, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "2009:5:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "1991:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5210, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5209, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "1991:9:36" + }, + "referencedDeclaration": 4270, + "src": "1991:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5213, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2031:14:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2024:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5212, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2024:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5215, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2062:25:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2055:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5214, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2055:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5217, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2104:21:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2097:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5216, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2097:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5219, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2142:12:36", + "nodeType": "VariableDeclaration", + "scope": 5254, + "src": "2135:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2135:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1981:179:36" + }, + "returnParameters": { + "id": 5221, + "nodeType": "ParameterList", + "parameters": [], + "src": "2170:0:36" + }, + "scope": 5630, + "src": "1949:551:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5325, + "nodeType": "Block", + "src": "2790:851:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5266, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "2817:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5267, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2833:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2817:37:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5269, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "2870:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5270, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2895:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2870:50:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:103:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5273, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "2936:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "id": 5274, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "2965:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "2936:43:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2817:162:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5281, + "nodeType": "IfStatement", + "src": "2800:249:36", + "trueBody": { + "id": 5280, + "nodeType": "Block", + "src": "2990:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5277, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3011:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3011:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5279, + "nodeType": "RevertStatement", + "src": "3004:34:36" + } + ] + } + }, + { + "assignments": [ + 5283 + ], + "declarations": [ + { + "constant": false, + "id": 5283, + "mutability": "mutable", + "name": "epochDuration", + "nameLocation": "3066:13:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3059:20:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5282, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3059:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5287, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5284, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3082:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5285, + "name": "epochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5257, + "src": "3097:14:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3082:29:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3059:52:36" + }, + { + "assignments": [ + 5289 + ], + "declarations": [ + { + "constant": false, + "id": 5289, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "3128:20:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3121:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5288, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3121:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5293, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5290, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5263, + "src": "3151:12:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5291, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3166:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3151:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3121:66:36" + }, + { + "assignments": [ + 5295 + ], + "declarations": [ + { + "constant": false, + "id": 5295, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "3204:24:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3197:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5294, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3197:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5299, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5296, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5261, + "src": "3231:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5297, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5259, + "src": "3255:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3231:49:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3197:83:36" + }, + { + "assignments": [ + 5302 + ], + "declarations": [ + { + "constant": false, + "id": 5302, + "mutability": "mutable", + "name": "settings", + "nameLocation": "3316:8:36", + "nodeType": "VariableDeclaration", + "scope": 5325, + "src": "3291:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5301, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5300, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "3291:16:36" + }, + "referencedDeclaration": 4261, + "src": "3291:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5305, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5303, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3327:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3327:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3291:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5306, + "name": "epochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3374:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5307, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3390:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5308, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "3390:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3374:41:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5310, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5295, + "src": "3431:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5311, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3458:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5312, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "3458:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3431:63:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:120:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5315, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5289, + "src": "3510:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "expression": { + "id": 5316, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5302, + "src": "3533:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "3533:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "3510:55:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3374:191:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5324, + "nodeType": "IfStatement", + "src": "3357:278:36", + "trueBody": { + "id": 5323, + "nodeType": "Block", + "src": "3576:59:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5320, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "3597:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3597:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5322, + "nodeType": "RevertStatement", + "src": "3590:34:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5255, + "nodeType": "StructuredDocumentation", + "src": "2506:88:36", + "text": "@dev Ensures epoch dates are in the correct order, durations are above minimums, etc" + }, + "id": 5326, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateEpochSchedule", + "nameLocation": "2608:22:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5264, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5257, + "mutability": "mutable", + "name": "epochStartDate", + "nameLocation": "2647:14:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2640:21:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5256, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2640:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5259, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2678:25:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2671:32:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5258, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2671:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5261, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2720:21:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2713:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5260, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2713:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5263, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2758:12:36", + "nodeType": "VariableDeclaration", + "scope": 5326, + "src": "2751:19:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5262, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2751:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "2630:146:36" + }, + "returnParameters": { + "id": 5265, + "nodeType": "ParameterList", + "parameters": [], + "src": "2790:0:36" + }, + "scope": 5630, + "src": "2599:1042:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5402, + "nodeType": "Block", + "src": "3930:983:36", + "statements": [ + { + "assignments": [ + 5342 + ], + "declarations": [ + { + "constant": false, + "id": 5342, + "mutability": "mutable", + "name": "maxDateAdjustmentTolerance", + "nameLocation": "3947:26:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "3940:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5341, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3940:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5346, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5343, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "3976:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3976:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "maxDateAdjustmentTolerance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4258, + "src": "3976:46:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3940:82:36" + }, + { + "assignments": [ + 5349 + ], + "declarations": [ + { + "constant": false, + "id": 5349, + "mutability": "mutable", + "name": "initialPeriod", + "nameLocation": "4047:13:36", + "nodeType": "VariableDeclaration", + "scope": 5402, + "src": "4032:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "typeName": { + "id": 5348, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5347, + "name": "ElectionPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4342, + "src": "4032:14:36" + }, + "referencedDeclaration": 4342, + "src": "4032:14:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "visibility": "internal" + } + ], + "id": 5352, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5350, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4063:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4063:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4032:50:36" + }, + { + "condition": { + "id": 5353, + "name": "ensureChangesAreSmall", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5338, + "src": "4097:21:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5383, + "nodeType": "IfStatement", + "src": "4093:507:36", + "trueBody": { + "id": 5382, + "nodeType": "Block", + "src": "4120:480:36", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5355, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4176:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5356, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4193:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5357, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "4193:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5354, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4155:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4155:52:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5359, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4210:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4155:81:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5362, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4277:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5363, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4307:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5364, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "4307:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5361, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4256:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4256:83:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5366, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4358:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4256:128:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:229:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 5370, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4425:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "expression": { + "id": 5371, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4451:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "4451:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5369, + "name": "_uint64AbsDifference", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5584, + "src": "4404:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint64_$_t_uint64_$returns$_t_uint64_$", + "typeString": "function (uint64,uint64) pure returns (uint64)" + } + }, + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4404:75:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5374, + "name": "maxDateAdjustmentTolerance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5342, + "src": "4482:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "4404:104:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4155:353:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5381, + "nodeType": "IfStatement", + "src": "4134:456:36", + "trueBody": { + "id": 5380, + "nodeType": "Block", + "src": "4523:67:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5377, + "name": "InvalidEpochConfiguration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4360, + "src": "4548:25:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4548:27:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5379, + "nodeType": "RevertStatement", + "src": "4541:34:36" + } + ] + } + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 5385, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4647:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5386, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5330, + "src": "4666:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5387, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "4666:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5388, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5332, + "src": "4695:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5389, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5334, + "src": "4737:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5390, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5336, + "src": "4775:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5384, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "4610:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4610:190:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5392, + "nodeType": "ExpressionStatement", + "src": "4610:190:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + }, + "id": 5396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5393, + "name": "_getCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "4815:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_enum$_ElectionPeriod_$4342_$", + "typeString": "function () view returns (enum ElectionBase.ElectionPeriod)" + } + }, + "id": 5394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4815:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 5395, + "name": "initialPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5349, + "src": "4838:13:36", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$4342", + "typeString": "enum ElectionBase.ElectionPeriod" + } + }, + "src": "4815:36:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5401, + "nodeType": "IfStatement", + "src": "4811:96:36", + "trueBody": { + "id": 5400, + "nodeType": "Block", + "src": "4853:54:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5397, + "name": "ChangesCurrentPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4366, + "src": "4874:20:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4874:22:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5399, + "nodeType": "RevertStatement", + "src": "4867:29:36" + } + ] + } + } + ] + }, + "documentation": { + "id": 5327, + "nodeType": "StructuredDocumentation", + "src": "3647:46:36", + "text": "@dev Changes epoch dates, with validations" + }, + "id": 5403, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_adjustEpochSchedule", + "nameLocation": "3707:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5330, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "3755:5:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3737:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5329, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5328, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "3737:9:36" + }, + "referencedDeclaration": 4270, + "src": "3737:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "3777:28:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3770:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5331, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3770:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5334, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "3822:24:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3815:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5333, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3815:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5336, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "3863:15:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3856:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5335, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "3856:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5338, + "mutability": "mutable", + "name": "ensureChangesAreSmall", + "nameLocation": "3893:21:36", + "nodeType": "VariableDeclaration", + "scope": 5403, + "src": "3888:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5337, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3888:4:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3727:193:36" + }, + "returnParameters": { + "id": 5340, + "nodeType": "ParameterList", + "parameters": [], + "src": "3930:0:36" + }, + "scope": 5630, + "src": "3698:1215:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5454, + "nodeType": "Block", + "src": "5044:808:36", + "statements": [ + { + "assignments": [ + 5409 + ], + "declarations": [ + { + "constant": false, + "id": 5409, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "5072:12:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5054:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5408, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5407, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "5054:9:36" + }, + "referencedDeclaration": 4270, + "src": "5054:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5412, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5410, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "5087:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5087:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5054:51:36" + }, + { + "assignments": [ + 5414 + ], + "declarations": [ + { + "constant": false, + "id": 5414, + "mutability": "mutable", + "name": "nominationPeriodDuration", + "nameLocation": "5123:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5116:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5413, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5116:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5418, + "initialValue": { + "arguments": [ + { + "id": 5416, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5179:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5415, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "5150:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5150:42:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5116:76:36" + }, + { + "assignments": [ + 5420 + ], + "declarations": [ + { + "constant": false, + "id": 5420, + "mutability": "mutable", + "name": "votingPeriodDuration", + "nameLocation": "5209:20:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5202:27:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5419, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5202:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5424, + "initialValue": { + "arguments": [ + { + "id": 5422, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5257:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5421, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "5232:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:38:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5202:68:36" + }, + { + "assignments": [ + 5426 + ], + "declarations": [ + { + "constant": false, + "id": 5426, + "mutability": "mutable", + "name": "newNominationPeriodStartDate", + "nameLocation": "5395:28:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5388:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5425, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5388:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5432, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5429, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "5433:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "5433:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5426:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5427, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5426:6:36", + "typeDescriptions": {} + } + }, + "id": 5431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5426:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5388:61:36" + }, + { + "assignments": [ + 5434 + ], + "declarations": [ + { + "constant": false, + "id": 5434, + "mutability": "mutable", + "name": "newVotingPeriodStartDate", + "nameLocation": "5466:24:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5459:31:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5433, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5459:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5438, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5435, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5493:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5436, + "name": "nominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5414, + "src": "5524:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5493:55:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5459:89:36" + }, + { + "assignments": [ + 5440 + ], + "declarations": [ + { + "constant": false, + "id": 5440, + "mutability": "mutable", + "name": "newEpochEndDate", + "nameLocation": "5565:15:36", + "nodeType": "VariableDeclaration", + "scope": 5454, + "src": "5558:22:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5439, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "5558:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5444, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5441, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5583:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "id": 5442, + "name": "votingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5420, + "src": "5610:20:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "5583:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5558:72:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5446, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5678:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "expression": { + "id": 5447, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5409, + "src": "5704:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5448, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "5704:22:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5449, + "name": "newNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5426, + "src": "5740:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5450, + "name": "newVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5434, + "src": "5782:24:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5451, + "name": "newEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5440, + "src": "5820:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5445, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "5641:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5641:204:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5453, + "nodeType": "ExpressionStatement", + "src": "5641:204:36" + } + ] + }, + "documentation": { + "id": 5404, + "nodeType": "StructuredDocumentation", + "src": "4919:76:36", + "text": "@dev Moves schedule forward to immediately jump to the nomination period" + }, + "id": 5455, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_jumpToNominationPeriod", + "nameLocation": "5009:23:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5405, + "nodeType": "ParameterList", + "parameters": [], + "src": "5032:2:36" + }, + "returnParameters": { + "id": 5406, + "nodeType": "ParameterList", + "parameters": [], + "src": "5044:0:36" + }, + "scope": 5630, + "src": "5000:852:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5511, + "nodeType": "Block", + "src": "5997:752:36", + "statements": [ + { + "assignments": [ + 5461 + ], + "declarations": [ + { + "constant": false, + "id": 5461, + "mutability": "mutable", + "name": "previousEpoch", + "nameLocation": "6025:13:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6007:31:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5460, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5459, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6007:9:36" + }, + "referencedDeclaration": 4270, + "src": "6007:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5464, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5462, + "name": "_getPreviousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4562, + "src": "6041:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6041:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6007:53:36" + }, + { + "assignments": [ + 5467 + ], + "declarations": [ + { + "constant": false, + "id": 5467, + "mutability": "mutable", + "name": "currentEpoch", + "nameLocation": "6088:12:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6070:30:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5466, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5465, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "6070:9:36" + }, + "referencedDeclaration": 4270, + "src": "6070:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "id": 5470, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5468, + "name": "_getCurrentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4548, + "src": "6103:16:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 5469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6103:18:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6070:51:36" + }, + { + "assignments": [ + 5472 + ], + "declarations": [ + { + "constant": false, + "id": 5472, + "mutability": "mutable", + "name": "currentEpochStartDate", + "nameLocation": "6139:21:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6132:28:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5471, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6132:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5478, + "initialValue": { + "arguments": [ + { + "expression": { + "id": 5475, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "6170:5:36", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "6170:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5474, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6163:6:36", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint64_$", + "typeString": "type(uint64)" + }, + "typeName": { + "id": 5473, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6163:6:36", + "typeDescriptions": {} + } + }, + "id": 5477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:23:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6132:54:36" + }, + { + "assignments": [ + 5480 + ], + "declarations": [ + { + "constant": false, + "id": 5480, + "mutability": "mutable", + "name": "currentEpochEndDate", + "nameLocation": "6203:19:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6196:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5479, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6196:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5486, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5481, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6225:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 5483, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6267:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5482, + "name": "_getEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5599, + "src": "6249:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6249:32:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6225:56:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6196:85:36" + }, + { + "assignments": [ + 5488 + ], + "declarations": [ + { + "constant": false, + "id": 5488, + "mutability": "mutable", + "name": "currentVotingPeriodStartDate", + "nameLocation": "6298:28:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6291:35:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5487, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6291:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5494, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5489, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6329:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5491, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6376:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5490, + "name": "_getVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5614, + "src": "6351:24:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6351:39:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6329:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6291:99:36" + }, + { + "assignments": [ + 5496 + ], + "declarations": [ + { + "constant": false, + "id": 5496, + "mutability": "mutable", + "name": "currentNominationPeriodStartDate", + "nameLocation": "6407:32:36", + "nodeType": "VariableDeclaration", + "scope": 5511, + "src": "6400:39:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5495, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6400:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "id": 5502, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5497, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6442:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "arguments": [ + { + "id": 5499, + "name": "previousEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5461, + "src": "6502:13:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + ], + "id": 5498, + "name": "_getNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5629, + "src": "6473:28:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_EpochData_$4270_storage_ptr_$returns$_t_uint64_$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer) view returns (uint64)" + } + }, + "id": 5500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6473:43:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "6442:74:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6400:116:36" + }, + { + "expression": { + "arguments": [ + { + "id": 5504, + "name": "currentEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5467, + "src": "6564:12:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + { + "id": 5505, + "name": "currentEpochStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5472, + "src": "6590:21:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5506, + "name": "currentNominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "6625:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5507, + "name": "currentVotingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5488, + "src": "6671:28:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 5508, + "name": "currentEpochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5480, + "src": "6713:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 5503, + "name": "_configureEpochSchedule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5254, + "src": "6527:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_EpochData_$4270_storage_ptr_$_t_uint64_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (struct ElectionStorage.EpochData storage pointer,uint64,uint64,uint64,uint64)" + } + }, + "id": 5509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6527:215:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5510, + "nodeType": "ExpressionStatement", + "src": "6527:215:36" + } + ] + }, + "documentation": { + "id": 5456, + "nodeType": "StructuredDocumentation", + "src": "5858:83:36", + "text": "@dev Copies the current epoch schedule to the next epoch, maintaining durations" + }, + "id": 5512, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_copyScheduleFromPreviousEpoch", + "nameLocation": "5955:30:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5985:2:36" + }, + "returnParameters": { + "id": 5458, + "nodeType": "ParameterList", + "parameters": [], + "src": "5997:0:36" + }, + "scope": 5630, + "src": "5946:803:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5562, + "nodeType": "Block", + "src": "6991:451:36", + "statements": [ + { + "assignments": [ + 5524 + ], + "declarations": [ + { + "constant": false, + "id": 5524, + "mutability": "mutable", + "name": "settings", + "nameLocation": "7026:8:36", + "nodeType": "VariableDeclaration", + "scope": 5562, + "src": "7001:33:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + }, + "typeName": { + "id": 5523, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5522, + "name": "ElectionSettings", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4261, + "src": "7001:16:36" + }, + "referencedDeclaration": 4261, + "src": "7001:16:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings" + } + }, + "visibility": "internal" + } + ], + "id": 5527, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5525, + "name": "_electionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4322, + "src": "7037:17:36", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionSettings_$4261_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionSettings storage pointer)" + } + }, + "id": 5526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7037:19:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7001:55:36" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5530, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5528, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7071:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7105:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7071:35:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5531, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7110:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7140:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7110:31:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:70:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5535, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7145:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5536, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7168:1:36", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "7145:24:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7071:98:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5543, + "nodeType": "IfStatement", + "src": "7067:161:36", + "trueBody": { + "id": 5542, + "nodeType": "Block", + "src": "7171:57:36", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5539, + "name": "InvalidElectionSettings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4362, + "src": "7192:23:36", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7192:25:36", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5541, + "nodeType": "RevertStatement", + "src": "7185:32:36" + } + ] + } + }, + { + "expression": { + "id": 5548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5544, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7238:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minNominationPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4254, + "src": "7238:36:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5547, + "name": "newMinNominationPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5515, + "src": "7277:30:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7238:69:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5549, + "nodeType": "ExpressionStatement", + "src": "7238:69:36" + }, + { + "expression": { + "id": 5554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5550, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7317:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5552, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minVotingPeriodDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4256, + "src": "7317:32:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5553, + "name": "newMinVotingPeriodDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5517, + "src": "7352:26:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7317:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5555, + "nodeType": "ExpressionStatement", + "src": "7317:61:36" + }, + { + "expression": { + "id": 5560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 5556, + "name": "settings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5524, + "src": "7388:8:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionSettings_$4261_storage_ptr", + "typeString": "struct ElectionStorage.ElectionSettings storage pointer" + } + }, + "id": 5558, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "minEpochDuration", + "nodeType": "MemberAccess", + "referencedDeclaration": 4252, + "src": "7388:25:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 5559, + "name": "newMinEpochDuration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5519, + "src": "7416:19:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7388:47:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5561, + "nodeType": "ExpressionStatement", + "src": "7388:47:36" + } + ] + }, + "documentation": { + "id": 5513, + "nodeType": "StructuredDocumentation", + "src": "6755:59:36", + "text": "@dev Sets the minimum epoch durations, with validations" + }, + "id": 5563, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setMinEpochDurations", + "nameLocation": "6828:21:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5520, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5515, + "mutability": "mutable", + "name": "newMinNominationPeriodDuration", + "nameLocation": "6866:30:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6859:37:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5514, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6859:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5517, + "mutability": "mutable", + "name": "newMinVotingPeriodDuration", + "nameLocation": "6913:26:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6906:33:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5516, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6906:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5519, + "mutability": "mutable", + "name": "newMinEpochDuration", + "nameLocation": "6956:19:36", + "nodeType": "VariableDeclaration", + "scope": 5563, + "src": "6949:26:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5518, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "6949:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "6849:132:36" + }, + "returnParameters": { + "id": 5521, + "nodeType": "ParameterList", + "parameters": [], + "src": "6991:0:36" + }, + "scope": 5630, + "src": "6819:623:36", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5583, + "nodeType": "Block", + "src": "7538:75:36", + "statements": [ + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5572, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7555:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "id": 5573, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7564:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7555:15:36", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5578, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7591:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5579, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7600:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7591:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "id": 5581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "7555:51:36", + "trueExpression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5575, + "name": "valueA", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5565, + "src": "7573:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "id": 5576, + "name": "valueB", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5567, + "src": "7582:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7573:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5571, + "id": 5582, + "nodeType": "Return", + "src": "7548:58:36" + } + ] + }, + "id": 5584, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_uint64AbsDifference", + "nameLocation": "7457:20:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5565, + "mutability": "mutable", + "name": "valueA", + "nameLocation": "7485:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7478:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5564, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7478:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 5567, + "mutability": "mutable", + "name": "valueB", + "nameLocation": "7500:6:36", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7493:13:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5566, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7493:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7477:30:36" + }, + "returnParameters": { + "id": 5571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5570, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5584, + "src": "7530:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5569, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7530:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7529:8:36" + }, + "scope": 5630, + "src": "7448:165:36", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5598, + "nodeType": "Block", + "src": "7701:55:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5592, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7718:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5593, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7718:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5594, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5587, + "src": "7734:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5595, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "7734:15:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7718:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5591, + "id": 5597, + "nodeType": "Return", + "src": "7711:38:36" + } + ] + }, + "id": 5599, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getEpochDuration", + "nameLocation": "7628:17:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5588, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5587, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7664:5:36", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7646:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5586, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5585, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7646:9:36" + }, + "referencedDeclaration": 4270, + "src": "7646:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7645:25:36" + }, + "returnParameters": { + "id": 5591, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5590, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5599, + "src": "7693:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5589, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7693:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7692:8:36" + }, + "scope": 5630, + "src": "7619:137:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5613, + "nodeType": "Block", + "src": "7851:67:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5607, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7868:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5608, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "7868:13:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5609, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5602, + "src": "7884:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "7884:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "7868:43:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5606, + "id": 5612, + "nodeType": "Return", + "src": "7861:50:36" + } + ] + }, + "id": 5614, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotingPeriodDuration", + "nameLocation": "7771:24:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5602, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7814:5:36", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7796:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5601, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5600, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7796:9:36" + }, + "referencedDeclaration": 4270, + "src": "7796:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7795:25:36" + }, + "returnParameters": { + "id": 5606, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5605, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5614, + "src": "7843:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5604, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "7843:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "7842:8:36" + }, + "scope": 5630, + "src": "7762:156:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5628, + "nodeType": "Block", + "src": "8017:85:36", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "id": 5626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 5622, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8034:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5623, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "8034:27:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "expression": { + "id": 5624, + "name": "epoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5617, + "src": "8064:5:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 5625, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "8064:31:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "src": "8034:61:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 5621, + "id": 5627, + "nodeType": "Return", + "src": "8027:68:36" + } + ] + }, + "id": 5629, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getNominationPeriodDuration", + "nameLocation": "7933:28:36", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5617, + "mutability": "mutable", + "name": "epoch", + "nameLocation": "7980:5:36", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "7962:23:36", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + }, + "typeName": { + "id": 5616, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5615, + "name": "EpochData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4270, + "src": "7962:9:36" + }, + "referencedDeclaration": 4270, + "src": "7962:9:36", + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData" + } + }, + "visibility": "internal" + } + ], + "src": "7961:25:36" + }, + "returnParameters": { + "id": 5621, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5620, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5629, + "src": "8009:6:36", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 5619, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "8009:6:36", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "8008:8:36" + }, + "scope": 5630, + "src": "7924:178:36", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5631, + "src": "227:7877:36", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:8074:36" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ArrayError.sol\";\nimport \"../../tokens/CouncilToken.sol\";\nimport \"./ElectionBase.sol\";\n\n/// @dev Core functionality for keeping track of council members with an NFT token\ncontract ElectionCredentials is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _createCouncilToken(string memory tokenName, string memory tokenSymbol) internal {\n CouncilToken implementation = new CouncilToken();\n\n UUPSProxy proxy = new UUPSProxy(address(implementation));\n\n CouncilToken token = CouncilToken(address(proxy));\n\n token.nominateNewOwner(address(this));\n token.acceptOwnership();\n\n token.initialize(tokenName, tokenSymbol);\n\n _electionStore().councilToken = address(token);\n\n emit CouncilTokenCreated(address(proxy), address(implementation));\n }\n\n function _removeAllCouncilMembers(uint epochIndex) internal {\n SetUtil.AddressSet storage members = _electionStore().councilMembers;\n\n uint numMembers = members.length();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n // Always removes the first element in the array\n // until none are left.\n _removeCouncilMember(members.valueAt(1), epochIndex);\n }\n }\n\n function _addCouncilMembers(address[] memory membersToAdd, uint epochIndex) internal {\n uint numMembers = membersToAdd.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _addCouncilMember(membersToAdd[memberIndex], epochIndex);\n }\n }\n\n function _removeCouncilMembers(address[] memory membersToRemove, uint epochIndex) internal {\n uint numMembers = membersToRemove.length;\n if (numMembers == 0) revert ArrayError.EmptyArray();\n\n for (uint memberIndex = 0; memberIndex < numMembers; memberIndex++) {\n _removeCouncilMember(membersToRemove[memberIndex], epochIndex);\n }\n }\n\n function _addCouncilMember(address newMember, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (members.contains(newMember)) {\n revert AlreadyACouncilMember();\n }\n\n members.add(newMember);\n\n // Note that tokenId = 0 will not be used.\n uint tokenId = members.length();\n _getCouncilToken().mint(newMember, tokenId);\n\n store.councilTokenIds[newMember] = tokenId;\n\n emit CouncilMemberAdded(newMember, epochIndex);\n }\n\n function _removeCouncilMember(address member, uint epochIndex) internal {\n ElectionStore storage store = _electionStore();\n SetUtil.AddressSet storage members = store.councilMembers;\n\n if (!members.contains(member)) {\n revert NotACouncilMember();\n }\n\n members.remove(member);\n\n uint tokenId = _getCouncilMemberTokenId(member);\n _getCouncilToken().burn(tokenId);\n\n // tokenId = 0 means no associated token.\n store.councilTokenIds[member] = 0;\n\n emit CouncilMemberRemoved(member, epochIndex);\n }\n\n function _getCouncilToken() private view returns (CouncilToken) {\n return CouncilToken(_electionStore().councilToken);\n }\n\n function _getCouncilMemberTokenId(address member) private view returns (uint) {\n uint tokenId = _electionStore().councilTokenIds[member];\n\n if (tokenId == 0) revert NotACouncilMember();\n\n return tokenId;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionCredentials.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ArrayError": [ + 20 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "ElectionBase": [ + 4683 + ], + "ElectionCredentials": [ + 5065 + ], + "ElectionStorage": [ + 4331 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "SetUtil": [ + 2288 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 5066, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4685, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:35" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 4686, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 817, + "src": "56:67:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "id": 4687, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 21, + "src": "124:69:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "file": "../../tokens/CouncilToken.sol", + "id": 4688, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 6380, + "src": "194:39:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 4689, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 5066, + "sourceUnit": 4684, + "src": "234:28:35", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4691, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "379:12:35" + }, + "id": 4692, + "nodeType": "InheritanceSpecifier", + "src": "379:12:35" + } + ], + "canonicalName": "ElectionCredentials", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4690, + "nodeType": "StructuredDocumentation", + "src": "264:83:35", + "text": "@dev Core functionality for keeping track of council members with an NFT token" + }, + "fullyImplemented": true, + "id": 5065, + "linearizedBaseContracts": [ + 5065, + 4683, + 4331 + ], + "name": "ElectionCredentials", + "nameLocation": "356:19:35", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4696, + "libraryName": { + "id": 4693, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "404:7:35" + }, + "nodeType": "UsingForDirective", + "src": "398:37:35", + "typeName": { + "id": 4695, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4694, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "416:18:35" + }, + "referencedDeclaration": 1788, + "src": "416:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 4774, + "nodeType": "Block", + "src": "531:457:35", + "statements": [ + { + "assignments": [ + 4705 + ], + "declarations": [ + { + "constant": false, + "id": 4705, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "554:14:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "541:27:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4704, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4703, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "541:12:35" + }, + "referencedDeclaration": 6379, + "src": "541:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4710, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "571:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () returns (contract CouncilToken)" + }, + "typeName": { + "id": 4707, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4706, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "575:12:35" + }, + "referencedDeclaration": 6379, + "src": "575:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + }, + "id": 4709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "571:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "541:48:35" + }, + { + "assignments": [ + 4713 + ], + "declarations": [ + { + "constant": false, + "id": 4713, + "mutability": "mutable", + "name": "proxy", + "nameLocation": "610:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "600:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + }, + "typeName": { + "id": 4712, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4711, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "600:9:35" + }, + "referencedDeclaration": 816, + "src": "600:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "visibility": "internal" + } + ], + "id": 4722, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4719, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "640:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4718, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "632:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4717, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:35", + "typeDescriptions": {} + } + }, + "id": 4720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "632:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "618:13:35", + "typeDescriptions": { + "typeIdentifier": "t_function_creation_nonpayable$_t_address_$returns$_t_contract$_UUPSProxy_$816_$", + "typeString": "function (address) returns (contract UUPSProxy)" + }, + "typeName": { + "id": 4715, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4714, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "622:9:35" + }, + "referencedDeclaration": 816, + "src": "622:9:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + }, + "id": 4721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "618:38:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "600:56:35" + }, + { + "assignments": [ + 4725 + ], + "declarations": [ + { + "constant": false, + "id": 4725, + "mutability": "mutable", + "name": "token", + "nameLocation": "680:5:35", + "nodeType": "VariableDeclaration", + "scope": 4774, + "src": "667:18:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 4724, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4723, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "667:12:35" + }, + "referencedDeclaration": 6379, + "src": "667:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "id": 4732, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 4729, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "709:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4728, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "701:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4727, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "701:7:35", + "typeDescriptions": {} + } + }, + "id": 4730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "701:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4726, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "688:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 4731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "688:28:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "667:49:35" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "id": 4738, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "758:4:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ElectionCredentials_$5065", + "typeString": "contract ElectionCredentials" + } + ], + "id": 4737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "750:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4736, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "750:7:35", + "typeDescriptions": {} + } + }, + "id": 4739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "750:13:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4733, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "727:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "nominateNewOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 359, + "src": "727:22:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + "id": 4740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "727:37:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4741, + "nodeType": "ExpressionStatement", + "src": "727:37:35" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4742, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "774:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "acceptOwnership", + "nodeType": "MemberAccess", + "referencedDeclaration": 310, + "src": "774:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "774:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4746, + "nodeType": "ExpressionStatement", + "src": "774:23:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4750, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4698, + "src": "825:9:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 4751, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4700, + "src": "836:11:35", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 4747, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "808:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "initialize", + "nodeType": "MemberAccess", + "referencedDeclaration": 6308, + "src": "808:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory) external" + } + }, + "id": 4752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "808:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4753, + "nodeType": "ExpressionStatement", + "src": "808:40:35" + }, + { + "expression": { + "id": 4761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4754, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "859:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "859:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "859:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 4759, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4725, + "src": "899:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4758, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "891:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "891:7:35", + "typeDescriptions": {} + } + }, + "id": 4760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "891:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "859:46:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4762, + "nodeType": "ExpressionStatement", + "src": "859:46:35" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 4766, + "name": "proxy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4713, + "src": "949:5:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSProxy_$816", + "typeString": "contract UUPSProxy" + } + ], + "id": 4765, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "941:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4764, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "941:7:35", + "typeDescriptions": {} + } + }, + "id": 4767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "941:14:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "id": 4770, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4705, + "src": "965:14:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + ], + "id": 4769, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "957:7:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4768, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "957:7:35", + "typeDescriptions": {} + } + }, + "id": 4771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "957:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4763, + "name": "CouncilTokenCreated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4390, + "src": "921:19:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:60:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4773, + "nodeType": "EmitStatement", + "src": "916:65:35" + } + ] + }, + "id": 4775, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createCouncilToken", + "nameLocation": "450:19:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4698, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "484:9:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "470:23:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4697, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "470:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4700, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "509:11:35", + "nodeType": "VariableDeclaration", + "scope": 4775, + "src": "495:25:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4699, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "495:6:35", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "469:52:35" + }, + "returnParameters": { + "id": 4702, + "nodeType": "ParameterList", + "parameters": [], + "src": "531:0:35" + }, + "scope": 5065, + "src": "441:547:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4815, + "nodeType": "Block", + "src": "1054:382:35", + "statements": [ + { + "assignments": [ + 4784 + ], + "declarations": [ + { + "constant": false, + "id": 4784, + "mutability": "mutable", + "name": "members", + "nameLocation": "1091:7:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1064:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4783, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4782, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "1064:18:35" + }, + "referencedDeclaration": 1788, + "src": "1064:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4788, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4785, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "1101:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1101:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4787, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "1101:31:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1064:68:35" + }, + { + "assignments": [ + 4790 + ], + "declarations": [ + { + "constant": false, + "id": 4790, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1148:10:35", + "nodeType": "VariableDeclaration", + "scope": 4815, + "src": "1143:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4789, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1143:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4794, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1161:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4792, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "1161:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1161:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1143:34:35" + }, + { + "body": { + "id": 4813, + "nodeType": "Block", + "src": "1256:174:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "31", + "id": 4808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1404:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "id": 4806, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4784, + "src": "1388:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4807, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "valueAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1938, + "src": "1388:15:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_uint256_$returns$_t_address_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,uint256) view returns (address)" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1388:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4810, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4777, + "src": "1408:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4805, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "1367:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1367:52:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4812, + "nodeType": "ExpressionStatement", + "src": "1367:52:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4799, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1215:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4800, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4790, + "src": "1229:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1215:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4814, + "initializationExpression": { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1198:11:35", + "nodeType": "VariableDeclaration", + "scope": 4814, + "src": "1193:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4795, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1193:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4798, + "initialValue": { + "hexValue": "30", + "id": 4797, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1212:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1193:20:35" + }, + "loopExpression": { + "expression": { + "id": 4803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1241:13:35", + "subExpression": { + "id": 4802, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "1241:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4804, + "nodeType": "ExpressionStatement", + "src": "1241:13:35" + }, + "nodeType": "ForStatement", + "src": "1188:242:35" + } + ] + }, + "id": 4816, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeAllCouncilMembers", + "nameLocation": "1003:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4777, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1033:10:35", + "nodeType": "VariableDeclaration", + "scope": 4816, + "src": "1028:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1028:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1027:17:35" + }, + "returnParameters": { + "id": 4779, + "nodeType": "ParameterList", + "parameters": [], + "src": "1054:0:35" + }, + "scope": 5065, + "src": "994:442:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4857, + "nodeType": "Block", + "src": "1527:274:35", + "statements": [ + { + "assignments": [ + 4825 + ], + "declarations": [ + { + "constant": false, + "id": 4825, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1542:10:35", + "nodeType": "VariableDeclaration", + "scope": 4857, + "src": "1537:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1537:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4828, + "initialValue": { + "expression": { + "id": 4826, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1555:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1555:19:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1537:37:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4829, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1588:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1602:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1588:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4837, + "nodeType": "IfStatement", + "src": "1584:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4832, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1612:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1612:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1612:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4836, + "nodeType": "RevertStatement", + "src": "1605:30:35" + } + }, + { + "body": { + "id": 4855, + "nodeType": "Block", + "src": "1714:81:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4849, + "name": "membersToAdd", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4819, + "src": "1746:12:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4851, + "indexExpression": { + "id": 4850, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1759:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1746:25:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4852, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4821, + "src": "1773:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4848, + "name": "_addCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4963, + "src": "1728:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1728:56:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4854, + "nodeType": "ExpressionStatement", + "src": "1728:56:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4842, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1673:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4843, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4825, + "src": "1687:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1673:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4856, + "initializationExpression": { + "assignments": [ + 4839 + ], + "declarations": [ + { + "constant": false, + "id": 4839, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "1656:11:35", + "nodeType": "VariableDeclaration", + "scope": 4856, + "src": "1651:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4838, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1651:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4841, + "initialValue": { + "hexValue": "30", + "id": 4840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1670:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1651:20:35" + }, + "loopExpression": { + "expression": { + "id": 4846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1699:13:35", + "subExpression": { + "id": 4845, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4839, + "src": "1699:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4847, + "nodeType": "ExpressionStatement", + "src": "1699:13:35" + }, + "nodeType": "ForStatement", + "src": "1646:149:35" + } + ] + }, + "id": 4858, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMembers", + "nameLocation": "1451:18:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4822, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4819, + "mutability": "mutable", + "name": "membersToAdd", + "nameLocation": "1487:12:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1470:29:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4817, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1470:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4818, + "nodeType": "ArrayTypeName", + "src": "1470:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4821, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1506:10:35", + "nodeType": "VariableDeclaration", + "scope": 4858, + "src": "1501:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4820, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1501:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1469:48:35" + }, + "returnParameters": { + "id": 4823, + "nodeType": "ParameterList", + "parameters": [], + "src": "1527:0:35" + }, + "scope": 5065, + "src": "1442:359:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4899, + "nodeType": "Block", + "src": "1898:283:35", + "statements": [ + { + "assignments": [ + 4867 + ], + "declarations": [ + { + "constant": false, + "id": 4867, + "mutability": "mutable", + "name": "numMembers", + "nameLocation": "1913:10:35", + "nodeType": "VariableDeclaration", + "scope": 4899, + "src": "1908:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4866, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4870, + "initialValue": { + "expression": { + "id": 4868, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "1926:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1926:22:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1908:40:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4871, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "1962:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 4872, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1976:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1962:15:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4879, + "nodeType": "IfStatement", + "src": "1958:51:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4874, + "name": "ArrayError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 20, + "src": "1986:10:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ArrayError_$20_$", + "typeString": "type(library ArrayError)" + } + }, + "id": 4876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "EmptyArray", + "nodeType": "MemberAccess", + "referencedDeclaration": 19, + "src": "1986:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4878, + "nodeType": "RevertStatement", + "src": "1979:30:35" + } + }, + { + "body": { + "id": 4897, + "nodeType": "Block", + "src": "2088:87:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "baseExpression": { + "id": 4891, + "name": "membersToRemove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4861, + "src": "2123:15:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 4893, + "indexExpression": { + "id": 4892, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2139:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2123:28:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4894, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4863, + "src": "2153:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4890, + "name": "_removeCouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5026, + "src": "2102:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2102:62:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4896, + "nodeType": "ExpressionStatement", + "src": "2102:62:35" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 4884, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2047:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 4885, + "name": "numMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4867, + "src": "2061:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2047:24:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4898, + "initializationExpression": { + "assignments": [ + 4881 + ], + "declarations": [ + { + "constant": false, + "id": 4881, + "mutability": "mutable", + "name": "memberIndex", + "nameLocation": "2030:11:35", + "nodeType": "VariableDeclaration", + "scope": 4898, + "src": "2025:16:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4880, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2025:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4883, + "initialValue": { + "hexValue": "30", + "id": 4882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2044:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2025:20:35" + }, + "loopExpression": { + "expression": { + "id": 4888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2073:13:35", + "subExpression": { + "id": 4887, + "name": "memberIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4881, + "src": "2073:11:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4889, + "nodeType": "ExpressionStatement", + "src": "2073:13:35" + }, + "nodeType": "ForStatement", + "src": "2020:155:35" + } + ] + }, + "id": 4900, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMembers", + "nameLocation": "1816:21:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4861, + "mutability": "mutable", + "name": "membersToRemove", + "nameLocation": "1855:15:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1838:32:35", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 4859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1838:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4860, + "nodeType": "ArrayTypeName", + "src": "1838:9:35", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1877:10:35", + "nodeType": "VariableDeclaration", + "scope": 4900, + "src": "1872:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1872:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1837:51:35" + }, + "returnParameters": { + "id": 4865, + "nodeType": "ParameterList", + "parameters": [], + "src": "1898:0:35" + }, + "scope": 5065, + "src": "1807:374:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4962, + "nodeType": "Block", + "src": "2259:517:35", + "statements": [ + { + "assignments": [ + 4909 + ], + "declarations": [ + { + "constant": false, + "id": 4909, + "mutability": "mutable", + "name": "store", + "nameLocation": "2291:5:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2269:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4908, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4907, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2269:13:35" + }, + "referencedDeclaration": 4246, + "src": "2269:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4912, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4910, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2299:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2299:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2269:46:35" + }, + { + "assignments": [ + 4917 + ], + "declarations": [ + { + "constant": false, + "id": 4917, + "mutability": "mutable", + "name": "members", + "nameLocation": "2352:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2325:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4916, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4915, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2325:18:35" + }, + "referencedDeclaration": 1788, + "src": "2325:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4920, + "initialValue": { + "expression": { + "id": 4918, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2362:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4919, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2362:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2325:57:35" + }, + { + "condition": { + "arguments": [ + { + "id": 4923, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2414:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4921, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2397:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4922, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2397:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2397:27:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4929, + "nodeType": "IfStatement", + "src": "2393:88:35", + "trueBody": { + "id": 4928, + "nodeType": "Block", + "src": "2426:55:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4925, + "name": "AlreadyACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4368, + "src": "2447:21:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2447:23:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4927, + "nodeType": "RevertStatement", + "src": "2440:30:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4933, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2503:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4930, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2491:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4932, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1812, + "src": "2491:11:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2491:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4935, + "nodeType": "ExpressionStatement", + "src": "2491:22:35" + }, + { + "assignments": [ + 4937 + ], + "declarations": [ + { + "constant": false, + "id": 4937, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2580:7:35", + "nodeType": "VariableDeclaration", + "scope": 4962, + "src": "2575:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4936, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2575:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 4941, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 4938, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4917, + "src": "2590:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4939, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": 1912, + "src": "2590:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_uint256_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (uint256)" + } + }, + "id": 4940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2590:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2575:31:35" + }, + { + "expression": { + "arguments": [ + { + "id": 4945, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2640:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4946, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2651:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4942, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "2616:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 4943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 4944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mint", + "nodeType": "MemberAccess", + "referencedDeclaration": 6336, + "src": "2616:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256) external" + } + }, + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2616:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4948, + "nodeType": "ExpressionStatement", + "src": "2616:43:35" + }, + { + "expression": { + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 4949, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4909, + "src": "2670:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4952, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "2670:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 4953, + "indexExpression": { + "id": 4951, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2692:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2670:32:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 4954, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4937, + "src": "2705:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2670:42:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4956, + "nodeType": "ExpressionStatement", + "src": "2670:42:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 4958, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4902, + "src": "2747:9:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 4959, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4904, + "src": "2758:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4957, + "name": "CouncilMemberAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4400, + "src": "2728:18:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 4960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2728:41:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4961, + "nodeType": "EmitStatement", + "src": "2723:46:35" + } + ] + }, + "id": 4963, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCouncilMember", + "nameLocation": "2196:17:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4905, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4902, + "mutability": "mutable", + "name": "newMember", + "nameLocation": "2222:9:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2214:17:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4901, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2214:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4904, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2238:10:35", + "nodeType": "VariableDeclaration", + "scope": 4963, + "src": "2233:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4903, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2233:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2213:36:35" + }, + "returnParameters": { + "id": 4906, + "nodeType": "ParameterList", + "parameters": [], + "src": "2259:0:35" + }, + "scope": 5065, + "src": "2187:589:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5025, + "nodeType": "Block", + "src": "2854:505:35", + "statements": [ + { + "assignments": [ + 4972 + ], + "declarations": [ + { + "constant": false, + "id": 4972, + "mutability": "mutable", + "name": "store", + "nameLocation": "2886:5:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2864:27:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + }, + "typeName": { + "id": 4971, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4970, + "name": "ElectionStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4246, + "src": "2864:13:35" + }, + "referencedDeclaration": 4246, + "src": "2864:13:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore" + } + }, + "visibility": "internal" + } + ], + "id": 4975, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4973, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "2894:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 4974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2894:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2864:46:35" + }, + { + "assignments": [ + 4980 + ], + "declarations": [ + { + "constant": false, + "id": 4980, + "mutability": "mutable", + "name": "members", + "nameLocation": "2947:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "2920:34:35", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 4979, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 4978, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "2920:18:35" + }, + "referencedDeclaration": 1788, + "src": "2920:18:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 4983, + "initialValue": { + "expression": { + "id": 4981, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "2957:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 4982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilMembers", + "nodeType": "MemberAccess", + "referencedDeclaration": 4228, + "src": "2957:20:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2920:57:35" + }, + { + "condition": { + "id": 4988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2992:25:35", + "subExpression": { + "arguments": [ + { + "id": 4986, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3010:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4984, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "2993:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "2993:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 4987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2993:24:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4993, + "nodeType": "IfStatement", + "src": "2988:82:35", + "trueBody": { + "id": 4992, + "nodeType": "Block", + "src": "3019:51:35", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4989, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3040:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 4990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3040:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4991, + "nodeType": "RevertStatement", + "src": "3033:26:35" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 4997, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3095:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 4994, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4980, + "src": "3080:7:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 4996, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1836, + "src": "3080:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address)" + } + }, + "id": 4998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3080:22:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4999, + "nodeType": "ExpressionStatement", + "src": "3080:22:35" + }, + { + "assignments": [ + 5001 + ], + "declarations": [ + { + "constant": false, + "id": 5001, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3118:7:35", + "nodeType": "VariableDeclaration", + "scope": 5025, + "src": "3113:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5000, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3113:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5005, + "initialValue": { + "arguments": [ + { + "id": 5003, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3153:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5002, + "name": "_getCouncilMemberTokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5064, + "src": "3128:24:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 5004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3128:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3113:47:35" + }, + { + "expression": { + "arguments": [ + { + "id": 5009, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5001, + "src": "3194:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5006, + "name": "_getCouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5039, + "src": "3170:16:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_contract$_CouncilToken_$6379_$", + "typeString": "function () view returns (contract CouncilToken)" + } + }, + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:18:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "id": 5008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "burn", + "nodeType": "MemberAccess", + "referencedDeclaration": 6348, + "src": "3170:23:35", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3170:32:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5011, + "nodeType": "ExpressionStatement", + "src": "3170:32:35" + }, + { + "expression": { + "id": 5018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 5012, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "3263:5:35", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5015, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3263:21:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5016, + "indexExpression": { + "id": 5014, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3285:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3263:29:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 5017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3295:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3263:33:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5019, + "nodeType": "ExpressionStatement", + "src": "3263:33:35" + }, + { + "eventCall": { + "arguments": [ + { + "id": 5021, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4965, + "src": "3333:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 5022, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4967, + "src": "3341:10:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5020, + "name": "CouncilMemberRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4406, + "src": "3312:20:35", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3312:40:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5024, + "nodeType": "EmitStatement", + "src": "3307:45:35" + } + ] + }, + "id": 5026, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCouncilMember", + "nameLocation": "2791:20:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4965, + "mutability": "mutable", + "name": "member", + "nameLocation": "2820:6:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2812:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4964, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2812:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 4967, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2833:10:35", + "nodeType": "VariableDeclaration", + "scope": 5026, + "src": "2828:15:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4966, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2828:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2811:33:35" + }, + "returnParameters": { + "id": 4969, + "nodeType": "ParameterList", + "parameters": [], + "src": "2854:0:35" + }, + "scope": 5065, + "src": "2782:577:35", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5038, + "nodeType": "Block", + "src": "3429:67:35", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5033, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3459:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3459:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5035, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilToken", + "nodeType": "MemberAccess", + "referencedDeclaration": 4225, + "src": "3459:29:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 5032, + "name": "CouncilToken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6379, + "src": "3446:12:35", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_CouncilToken_$6379_$", + "typeString": "type(contract CouncilToken)" + } + }, + "id": 5036, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3446:43:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "functionReturnParameters": 5031, + "id": 5037, + "nodeType": "Return", + "src": "3439:50:35" + } + ] + }, + "id": 5039, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilToken", + "nameLocation": "3374:16:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5027, + "nodeType": "ParameterList", + "parameters": [], + "src": "3390:2:35" + }, + "returnParameters": { + "id": 5031, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5030, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5039, + "src": "3415:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + }, + "typeName": { + "id": 5029, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5028, + "name": "CouncilToken", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6379, + "src": "3415:12:35" + }, + "referencedDeclaration": 6379, + "src": "3415:12:35", + "typeDescriptions": { + "typeIdentifier": "t_contract$_CouncilToken_$6379", + "typeString": "contract CouncilToken" + } + }, + "visibility": "internal" + } + ], + "src": "3414:14:35" + }, + "scope": 5065, + "src": "3365:131:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 5063, + "nodeType": "Block", + "src": "3580:152:35", + "statements": [ + { + "assignments": [ + 5047 + ], + "declarations": [ + { + "constant": false, + "id": 5047, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3595:7:35", + "nodeType": "VariableDeclaration", + "scope": 5063, + "src": "3590:12:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5046, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3590:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5053, + "initialValue": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5048, + "name": "_electionStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4330, + "src": "3605:14:35", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ElectionStore_$4246_storage_ptr_$", + "typeString": "function () pure returns (struct ElectionStorage.ElectionStore storage pointer)" + } + }, + "id": 5049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3605:16:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionStore_$4246_storage_ptr", + "typeString": "struct ElectionStorage.ElectionStore storage pointer" + } + }, + "id": 5050, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "councilTokenIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4232, + "src": "3605:32:35", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 5052, + "indexExpression": { + "id": 5051, + "name": "member", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5041, + "src": "3638:6:35", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3605:40:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3590:55:35" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5054, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3660:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3671:1:35", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3660:12:35", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5060, + "nodeType": "IfStatement", + "src": "3656:44:35", + "trueBody": { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5057, + "name": "NotACouncilMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4370, + "src": "3681:17:35", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3681:19:35", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5059, + "nodeType": "RevertStatement", + "src": "3674:26:35" + } + }, + { + "expression": { + "id": 5061, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5047, + "src": "3718:7:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5045, + "id": 5062, + "nodeType": "Return", + "src": "3711:14:35" + } + ] + }, + "id": 5064, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCouncilMemberTokenId", + "nameLocation": "3511:24:35", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5041, + "mutability": "mutable", + "name": "member", + "nameLocation": "3544:6:35", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3536:14:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3536:7:35", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3535:16:35" + }, + "returnParameters": { + "id": 5045, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5044, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 5064, + "src": "3574:4:35", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5043, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3574:4:35", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3573:6:35" + }, + "scope": 5065, + "src": "3502:230:35", + "stateMutability": "view", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5066, + "src": "347:3387:35", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3704:35" + } + }, + "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./ElectionBase.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/AddressUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/ChangeError.sol\";\nimport \"@synthetixio/core-contracts/contracts/errors/AddressError.sol\";\n\n/// @dev Defines core functionality for recording votes in ElectionModule.cast()\ncontract ElectionVotes is ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function _validateCandidates(address[] calldata candidates) internal virtual {\n uint length = candidates.length;\n\n if (length == 0) {\n revert NoCandidates();\n }\n\n SetUtil.AddressSet storage nominees = _getCurrentElection().nominees;\n\n for (uint i = 0; i < length; i++) {\n address candidate = candidates[i];\n\n // Reject candidates that are not nominated.\n if (!nominees.contains(candidate)) {\n revert NotNominated();\n }\n\n // Reject duplicate candidates.\n if (i < length - 1) {\n for (uint j = i + 1; j < length; j++) {\n address otherCandidate = candidates[j];\n\n if (candidate == otherCandidate) {\n revert DuplicateCandidates();\n }\n }\n }\n }\n }\n\n function _recordVote(\n address user,\n uint votePower,\n address[] calldata candidates\n ) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = _calculateBallotId(candidates);\n BallotData storage ballot = _getBallot(ballotId);\n\n // Initialize ballot if new.\n if (!_ballotExists(ballot)) {\n address[] memory newCandidates = candidates;\n\n ballot.candidates = newCandidates;\n\n election.ballotIds.push(ballotId);\n }\n\n ballot.votes += votePower;\n ballot.votesByUser[user] = votePower;\n election.ballotIdsByAddress[user] = ballotId;\n\n return ballotId;\n }\n\n function _withdrawVote(address user, uint votePower) internal virtual returns (bytes32 ballotId) {\n ElectionData storage election = _getCurrentElection();\n\n ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n ballot.votes -= votePower;\n ballot.votesByUser[user] = 0;\n election.ballotIdsByAddress[user] = bytes32(0);\n\n return ballotId;\n }\n\n function _withdrawCastedVote(address user, uint epochIndex) internal virtual {\n uint castedVotePower = _getCastedVotePower(user);\n\n bytes32 ballotId = _withdrawVote(user, castedVotePower);\n\n emit VoteWithdrawn(user, ballotId, epochIndex, castedVotePower);\n }\n\n function _getCastedVotePower(address user) internal virtual returns (uint votePower) {\n ElectionData storage election = _getCurrentElection();\n\n bytes32 ballotId = election.ballotIdsByAddress[user];\n BallotData storage ballot = _getBallot(ballotId);\n\n return ballot.votesByUser[user];\n }\n\n function _getVotePower(address) internal view virtual returns (uint) {\n return 1;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionVotes.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "ElectionBase": [ + 4683 + ], + "ElectionStorage": [ + 4331 + ], + "ElectionVotes": [ + 6279 + ], + "MathUtil": [ + 1708 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6280, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5963, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "./ElectionBase.sol", + "id": 5964, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 4684, + "src": "56:28:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "id": 5965, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1697, + "src": "85:69:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 5966, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 1709, + "src": "155:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "id": 5967, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 26, + "src": "222:70:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "id": 5968, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6280, + "sourceUnit": 16, + "src": "293:71:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 5970, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "473:12:38" + }, + "id": 5971, + "nodeType": "InheritanceSpecifier", + "src": "473:12:38" + } + ], + "canonicalName": "ElectionVotes", + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 5969, + "nodeType": "StructuredDocumentation", + "src": "366:81:38", + "text": "@dev Defines core functionality for recording votes in ElectionModule.cast()" + }, + "fullyImplemented": true, + "id": 6279, + "linearizedBaseContracts": [ + 6279, + 4683, + 4331 + ], + "name": "ElectionVotes", + "nameLocation": "456:13:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5975, + "libraryName": { + "id": 5972, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "498:7:38" + }, + "nodeType": "UsingForDirective", + "src": "492:37:38", + "typeName": { + "id": 5974, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5973, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "510:18:38" + }, + "referencedDeclaration": 1788, + "src": "510:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "body": { + "id": 6066, + "nodeType": "Block", + "src": "612:821:38", + "statements": [ + { + "assignments": [ + 5982 + ], + "declarations": [ + { + "constant": false, + "id": 5982, + "mutability": "mutable", + "name": "length", + "nameLocation": "627:6:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "622:11:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5981, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "622:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 5985, + "initialValue": { + "expression": { + "id": 5983, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "636:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 5984, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "636:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "622:31:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 5986, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "668:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 5987, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "678:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "668:11:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 5993, + "nodeType": "IfStatement", + "src": "664:63:38", + "trueBody": { + "id": 5992, + "nodeType": "Block", + "src": "681:46:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5989, + "name": "NoCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4352, + "src": "702:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "702:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5991, + "nodeType": "RevertStatement", + "src": "695:21:38" + } + ] + } + }, + { + "assignments": [ + 5998 + ], + "declarations": [ + { + "constant": false, + "id": 5998, + "mutability": "mutable", + "name": "nominees", + "nameLocation": "764:8:38", + "nodeType": "VariableDeclaration", + "scope": 6066, + "src": "737:35:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + }, + "typeName": { + "id": 5997, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 5996, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "737:18:38" + }, + "referencedDeclaration": 1788, + "src": "737:18:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + }, + "visibility": "internal" + } + ], + "id": 6002, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5999, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "775:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "775:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6001, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "775:30:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "737:68:38" + }, + { + "body": { + "id": 6064, + "nodeType": "Block", + "src": "850:577:38", + "statements": [ + { + "assignments": [ + 6014 + ], + "declarations": [ + { + "constant": false, + "id": 6014, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "872:9:38", + "nodeType": "VariableDeclaration", + "scope": 6064, + "src": "864:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "864:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6018, + "initialValue": { + "baseExpression": { + "id": 6015, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6017, + "indexExpression": { + "id": 6016, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "895:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "884:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "864:33:38" + }, + { + "condition": { + "id": 6023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "973:29:38", + "subExpression": { + "arguments": [ + { + "id": 6021, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "992:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 6019, + "name": "nominees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5998, + "src": "974:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet storage pointer" + } + }, + "id": 6020, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "974:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 6022, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "974:28:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6028, + "nodeType": "IfStatement", + "src": "969:89:38", + "trueBody": { + "id": 6027, + "nodeType": "Block", + "src": "1004:54:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6024, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4350, + "src": "1029:12:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1029:14:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6026, + "nodeType": "RevertStatement", + "src": "1022:21:38" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6029, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1120:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6030, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1124:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "hexValue": "31", + "id": 6031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1133:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1124:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1120:14:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6063, + "nodeType": "IfStatement", + "src": "1116:301:38", + "trueBody": { + "id": 6062, + "nodeType": "Block", + "src": "1136:281:38", + "statements": [ + { + "body": { + "id": 6060, + "nodeType": "Block", + "src": "1192:211:38", + "statements": [ + { + "assignments": [ + 6047 + ], + "declarations": [ + { + "constant": false, + "id": 6047, + "mutability": "mutable", + "name": "otherCandidate", + "nameLocation": "1222:14:38", + "nodeType": "VariableDeclaration", + "scope": 6060, + "src": "1214:22:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6046, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1214:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 6051, + "initialValue": { + "baseExpression": { + "id": 6048, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5978, + "src": "1239:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6050, + "indexExpression": { + "id": 6049, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1250:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1239:13:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1214:38:38" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 6054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6052, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6014, + "src": "1279:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 6053, + "name": "otherCandidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6047, + "src": "1292:14:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1279:27:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6059, + "nodeType": "IfStatement", + "src": "1275:110:38", + "trueBody": { + "id": 6058, + "nodeType": "Block", + "src": "1308:77:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6055, + "name": "DuplicateCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4358, + "src": "1341:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1341:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6057, + "nodeType": "RevertStatement", + "src": "1334:28:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6040, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1175:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6041, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "1179:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1175:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6061, + "initializationExpression": { + "assignments": [ + 6035 + ], + "declarations": [ + { + "constant": false, + "id": 6035, + "mutability": "mutable", + "name": "j", + "nameLocation": "1164:1:38", + "nodeType": "VariableDeclaration", + "scope": 6061, + "src": "1159:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6034, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1159:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6039, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6036, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "1168:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "hexValue": "31", + "id": 6037, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1172:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1168:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1159:14:38" + }, + "loopExpression": { + "expression": { + "id": 6044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1187:3:38", + "subExpression": { + "id": 6043, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6035, + "src": "1187:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6045, + "nodeType": "ExpressionStatement", + "src": "1187:3:38" + }, + "nodeType": "ForStatement", + "src": "1154:249:38" + } + ] + } + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 6007, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "833:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "id": 6008, + "name": "length", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5982, + "src": "837:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "833:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6065, + "initializationExpression": { + "assignments": [ + 6004 + ], + "declarations": [ + { + "constant": false, + "id": 6004, + "mutability": "mutable", + "name": "i", + "nameLocation": "826:1:38", + "nodeType": "VariableDeclaration", + "scope": 6065, + "src": "821:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "821:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6006, + "initialValue": { + "hexValue": "30", + "id": 6005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "821:10:38" + }, + "loopExpression": { + "expression": { + "id": 6011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "845:3:38", + "subExpression": { + "id": 6010, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6004, + "src": "845:1:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6012, + "nodeType": "ExpressionStatement", + "src": "845:3:38" + }, + "nodeType": "ForStatement", + "src": "816:611:38" + } + ] + }, + "id": 6067, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_validateCandidates", + "nameLocation": "544:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 5979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5978, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "583:10:38", + "nodeType": "VariableDeclaration", + "scope": 6067, + "src": "564:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 5976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "564:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5977, + "nodeType": "ArrayTypeName", + "src": "564:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "563:31:38" + }, + "returnParameters": { + "id": 5980, + "nodeType": "ParameterList", + "parameters": [], + "src": "612:0:38" + }, + "scope": 6279, + "src": "535:898:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6149, + "nodeType": "Block", + "src": "1595:581:38", + "statements": [ + { + "assignments": [ + 6081 + ], + "declarations": [ + { + "constant": false, + "id": 6081, + "mutability": "mutable", + "name": "election", + "nameLocation": "1626:8:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1605:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6080, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6079, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "1605:12:38" + }, + "referencedDeclaration": 4299, + "src": "1605:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6084, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6082, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "1637:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1637:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1605:53:38" + }, + { + "expression": { + "id": 6089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6085, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1669:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 6087, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1699:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6086, + "name": "_calculateBallotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4653, + "src": "1680:18:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (address[] memory) pure returns (bytes32)" + } + }, + "id": 6088, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1680:30:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1669:41:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6090, + "nodeType": "ExpressionStatement", + "src": "1669:41:38" + }, + { + "assignments": [ + 6093 + ], + "declarations": [ + { + "constant": false, + "id": 6093, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "1739:6:38", + "nodeType": "VariableDeclaration", + "scope": 6149, + "src": "1720:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6092, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6091, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "1720:10:38" + }, + "referencedDeclaration": 4309, + "src": "1720:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6097, + "initialValue": { + "arguments": [ + { + "id": 6095, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1759:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6094, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "1748:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6096, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1748:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1720:48:38" + }, + { + "condition": { + "id": 6101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1820:22:38", + "subExpression": { + "arguments": [ + { + "id": 6099, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1835:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + ], + "id": 6098, + "name": "_ballotExists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4668, + "src": "1821:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_BallotData_$4309_storage_ptr_$returns$_t_bool_$", + "typeString": "function (struct ElectionStorage.BallotData storage pointer) view returns (bool)" + } + }, + "id": 6100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1821:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6124, + "nodeType": "IfStatement", + "src": "1816:192:38", + "trueBody": { + "id": 6123, + "nodeType": "Block", + "src": "1844:164:38", + "statements": [ + { + "assignments": [ + 6106 + ], + "declarations": [ + { + "constant": false, + "id": 6106, + "mutability": "mutable", + "name": "newCandidates", + "nameLocation": "1875:13:38", + "nodeType": "VariableDeclaration", + "scope": 6123, + "src": "1858:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1858:7:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6105, + "nodeType": "ArrayTypeName", + "src": "1858:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "id": 6108, + "initialValue": { + "id": 6107, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6074, + "src": "1891:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1858:43:38" + }, + { + "expression": { + "id": 6113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6109, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "1916:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6111, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "1916:17:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6112, + "name": "newCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6106, + "src": "1936:13:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "src": "1916:33:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 6114, + "nodeType": "ExpressionStatement", + "src": "1916:33:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6120, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "1988:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "expression": { + "id": 6115, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "1964:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6118, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 4285, + "src": "1964:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage", + "typeString": "bytes32[] storage ref" + } + }, + "id": 6119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "1964:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_bytes32_$dyn_storage_ptr_$_t_bytes32_$returns$__$bound_to$_t_array$_t_bytes32_$dyn_storage_ptr_$", + "typeString": "function (bytes32[] storage pointer,bytes32)" + } + }, + "id": 6121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1964:33:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6122, + "nodeType": "ExpressionStatement", + "src": "1964:33:38" + } + ] + } + }, + { + "expression": { + "id": 6129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6125, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2018:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6127, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2018:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "id": 6128, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2034:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2018:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6130, + "nodeType": "ExpressionStatement", + "src": "2018:25:38" + }, + { + "expression": { + "id": 6137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6131, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6093, + "src": "2053:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6134, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2053:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6135, + "indexExpression": { + "id": 6133, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2072:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2053:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6136, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6071, + "src": "2080:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2053:36:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6138, + "nodeType": "ExpressionStatement", + "src": "2053:36:38" + }, + { + "expression": { + "id": 6145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6139, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6081, + "src": "2099:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6142, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2099:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6143, + "indexExpression": { + "id": 6141, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6069, + "src": "2127:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2099:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 6144, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2135:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2099:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6146, + "nodeType": "ExpressionStatement", + "src": "2099:44:38" + }, + { + "expression": { + "id": 6147, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6077, + "src": "2161:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6078, + "id": 6148, + "nodeType": "Return", + "src": "2154:15:38" + } + ] + }, + "id": 6150, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_recordVote", + "nameLocation": "1448:11:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6069, + "mutability": "mutable", + "name": "user", + "nameLocation": "1477:4:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1469:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6068, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1469:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6071, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "1496:9:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1491:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6070, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1491:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6074, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "1534:10:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1515:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6072, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1515:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6073, + "nodeType": "ArrayTypeName", + "src": "1515:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1459:91:38" + }, + "returnParameters": { + "id": 6078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6077, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1585:8:38", + "nodeType": "VariableDeclaration", + "scope": 6150, + "src": "1577:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6076, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1577:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1576:18:38" + }, + "scope": 6279, + "src": "1439:737:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6206, + "nodeType": "Block", + "src": "2279:339:38", + "statements": [ + { + "assignments": [ + 6161 + ], + "declarations": [ + { + "constant": false, + "id": 6161, + "mutability": "mutable", + "name": "election", + "nameLocation": "2310:8:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2289:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6160, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6159, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "2289:12:38" + }, + "referencedDeclaration": 4299, + "src": "2289:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6164, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6162, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "2321:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2321:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2289:53:38" + }, + { + "expression": { + "id": 6170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 6165, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2353:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "baseExpression": { + "expression": { + "id": 6166, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2364:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6167, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2364:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6169, + "indexExpression": { + "id": 6168, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2392:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2364:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2353:44:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6171, + "nodeType": "ExpressionStatement", + "src": "2353:44:38" + }, + { + "assignments": [ + 6174 + ], + "declarations": [ + { + "constant": false, + "id": 6174, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "2426:6:38", + "nodeType": "VariableDeclaration", + "scope": 6206, + "src": "2407:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6173, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6172, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "2407:10:38" + }, + "referencedDeclaration": 4309, + "src": "2407:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6178, + "initialValue": { + "arguments": [ + { + "id": 6176, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2446:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6175, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "2435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2435:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2407:48:38" + }, + { + "expression": { + "id": 6183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 6179, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2466:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "2466:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "id": 6182, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6154, + "src": "2482:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2466:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6184, + "nodeType": "ExpressionStatement", + "src": "2466:25:38" + }, + { + "expression": { + "id": 6191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6185, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6174, + "src": "2501:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6188, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "2501:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6189, + "indexExpression": { + "id": 6187, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2520:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2501:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "30", + "id": 6190, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2528:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2501:28:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 6192, + "nodeType": "ExpressionStatement", + "src": "2501:28:38" + }, + { + "expression": { + "id": 6202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 6193, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6161, + "src": "2539:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6196, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "2539:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6197, + "indexExpression": { + "id": 6195, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6152, + "src": "2567:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2539:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 6200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2583:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 6199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2575:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 6198, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2575:7:38", + "typeDescriptions": {} + } + }, + "id": 6201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2575:10:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "2539:46:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6203, + "nodeType": "ExpressionStatement", + "src": "2539:46:38" + }, + { + "expression": { + "id": 6204, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6157, + "src": "2603:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6158, + "id": 6205, + "nodeType": "Return", + "src": "2596:15:38" + } + ] + }, + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawVote", + "nameLocation": "2191:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6152, + "mutability": "mutable", + "name": "user", + "nameLocation": "2213:4:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2205:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2205:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6154, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2224:9:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2219:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6153, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2219:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2204:30:38" + }, + "returnParameters": { + "id": 6158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6157, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2269:8:38", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "2261:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6156, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2261:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2260:18:38" + }, + "scope": 6279, + "src": "2182:436:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6234, + "nodeType": "Block", + "src": "2701:205:38", + "statements": [ + { + "assignments": [ + 6215 + ], + "declarations": [ + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "castedVotePower", + "nameLocation": "2716:15:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2711:20:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6214, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2711:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6219, + "initialValue": { + "arguments": [ + { + "id": 6217, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2754:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6216, + "name": "_getCastedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6268, + "src": "2734:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 6218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2734:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2711:48:38" + }, + { + "assignments": [ + 6221 + ], + "declarations": [ + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2778:8:38", + "nodeType": "VariableDeclaration", + "scope": 6234, + "src": "2770:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6220, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2770:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6226, + "initialValue": { + "arguments": [ + { + "id": 6223, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2803:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6224, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2809:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6222, + "name": "_withdrawVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6207, + "src": "2789:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) returns (bytes32)" + } + }, + "id": 6225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2789:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2770:55:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6228, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6209, + "src": "2855:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6229, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2861:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6230, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6211, + "src": "2871:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6231, + "name": "castedVotePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2883:15:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6227, + "name": "VoteWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4477, + "src": "2841:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,bytes32,uint256,uint256)" + } + }, + "id": 6232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2841:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6233, + "nodeType": "EmitStatement", + "src": "2836:63:38" + } + ] + }, + "id": 6235, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_withdrawCastedVote", + "nameLocation": "2633:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6209, + "mutability": "mutable", + "name": "user", + "nameLocation": "2661:4:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2653:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6211, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2672:10:38", + "nodeType": "VariableDeclaration", + "scope": 6235, + "src": "2667:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6210, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2667:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2652:31:38" + }, + "returnParameters": { + "id": 6213, + "nodeType": "ParameterList", + "parameters": [], + "src": "2701:0:38" + }, + "scope": 6279, + "src": "2624:282:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6267, + "nodeType": "Block", + "src": "2997:233:38", + "statements": [ + { + "assignments": [ + 6244 + ], + "declarations": [ + { + "constant": false, + "id": 6244, + "mutability": "mutable", + "name": "election", + "nameLocation": "3028:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3007:29:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + }, + "typeName": { + "id": 6243, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6242, + "name": "ElectionData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4299, + "src": "3007:12:38" + }, + "referencedDeclaration": 4299, + "src": "3007:12:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData" + } + }, + "visibility": "internal" + } + ], + "id": 6247, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6245, + "name": "_getCurrentElection", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4589, + "src": "3039:19:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function () view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 6246, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3039:21:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3007:53:38" + }, + { + "assignments": [ + 6249 + ], + "declarations": [ + { + "constant": false, + "id": 6249, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "3079:8:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3071:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6248, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3071:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 6254, + "initialValue": { + "baseExpression": { + "expression": { + "id": 6250, + "name": "election", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6244, + "src": "3090:8:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 6251, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "3090:27:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 6253, + "indexExpression": { + "id": 6252, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3118:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3090:33:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3071:52:38" + }, + { + "assignments": [ + 6257 + ], + "declarations": [ + { + "constant": false, + "id": 6257, + "mutability": "mutable", + "name": "ballot", + "nameLocation": "3152:6:38", + "nodeType": "VariableDeclaration", + "scope": 6267, + "src": "3133:25:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + }, + "typeName": { + "id": 6256, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6255, + "name": "BallotData", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4309, + "src": "3133:10:38" + }, + "referencedDeclaration": 4309, + "src": "3133:10:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData" + } + }, + "visibility": "internal" + } + ], + "id": 6261, + "initialValue": { + "arguments": [ + { + "id": 6259, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6249, + "src": "3172:8:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 6258, + "name": "_getBallot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4619, + "src": "3161:10:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 6260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3161:20:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3133:48:38" + }, + { + "expression": { + "baseExpression": { + "expression": { + "id": 6262, + "name": "ballot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6257, + "src": "3199:6:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votesByUser", + "nodeType": "MemberAccess", + "referencedDeclaration": 4308, + "src": "3199:18:38", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 6265, + "indexExpression": { + "id": 6264, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6237, + "src": "3218:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3199:24:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6241, + "id": 6266, + "nodeType": "Return", + "src": "3192:31:38" + } + ] + }, + "id": 6268, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getCastedVotePower", + "nameLocation": "2921:19:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6237, + "mutability": "mutable", + "name": "user", + "nameLocation": "2949:4:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2941:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6236, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2941:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2940:14:38" + }, + "returnParameters": { + "id": 6241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6240, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "2986:9:38", + "nodeType": "VariableDeclaration", + "scope": 6268, + "src": "2981:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6239, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2981:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2980:16:38" + }, + "scope": 6279, + "src": "2912:318:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 6277, + "nodeType": "Block", + "src": "3305:25:38", + "statements": [ + { + "expression": { + "hexValue": "31", + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3322:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 6274, + "id": 6276, + "nodeType": "Return", + "src": "3315:8:38" + } + ] + }, + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "3245:13:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6270, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3259:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6269, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3259:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3258:9:38" + }, + "returnParameters": { + "id": 6274, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6273, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "3299:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6272, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3299:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3298:6:38" + }, + "scope": 6279, + "src": "3236:94:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6280, + "src": "447:2885:38", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:3302:38" + } + }, + "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract OwnableStorage {\n struct OwnableStore {\n bool initialized;\n address owner;\n address nominatedOwner;\n }\n\n function _ownableStore() internal pure returns (OwnableStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ownable\")) - 1)\n store.slot := 0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableStorage.sol", + "exportedSymbols": { + "OwnableStorage": [ + 494 + ] + }, + "id": 495, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 478, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "OwnableStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 494, + "linearizedBaseContracts": [ + 494 + ], + "name": "OwnableStorage", + "nameLocation": "65:14:14", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "OwnableStorage.OwnableStore", + "id": 485, + "members": [ + { + "constant": false, + "id": 480, + "mutability": "mutable", + "name": "initialized", + "nameLocation": "121:11:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "116:16:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 479, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "116:4:14", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 482, + "mutability": "mutable", + "name": "owner", + "nameLocation": "150:5:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "142:13:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "142:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 484, + "mutability": "mutable", + "name": "nominatedOwner", + "nameLocation": "173:14:14", + "nodeType": "VariableDeclaration", + "scope": 485, + "src": "165:22:14", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 483, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "165:7:14", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "name": "OwnableStore", + "nameLocation": "93:12:14", + "nodeType": "StructDefinition", + "scope": 494, + "src": "86:108:14", + "visibility": "public" + }, + { + "body": { + "id": 492, + "nodeType": "Block", + "src": "276:197:14", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "295:172:14", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "377:80:14", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "391:66:14", + "type": "", + "value": "0x66d20a9eef910d2df763b9de0d390f3cc67f7d52c6475118cd57fa98be8cf6cb" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "377:10:14" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 489, + "isOffset": false, + "isSlot": true, + "src": "377:10:14", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 491, + "nodeType": "InlineAssembly", + "src": "286:181:14" + } + ] + }, + "id": 493, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_ownableStore", + "nameLocation": "209:13:14", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 486, + "nodeType": "ParameterList", + "parameters": [], + "src": "222:2:14" + }, + "returnParameters": { + "id": 490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 489, + "mutability": "mutable", + "name": "store", + "nameLocation": "269:5:14", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "248:26:14", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 488, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 487, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "248:12:14" + }, + "referencedDeclaration": 485, + "src": "248:12:14", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "src": "247:28:14" + }, + "scope": 494, + "src": "200:273:14", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 495, + "src": "56:419:14", + "usedErrors": [] + } + ], + "src": "31:445:14" + } + }, + "@synthetixio/core-contracts/contracts/errors/AccessError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary AccessError {\n error Unauthorized(address addr);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ] + }, + "id": 7, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "AccessError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 6, + "linearizedBaseContracts": [ + 6 + ], + "name": "AccessError", + "nameLocation": "64:11:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "Unauthorized", + "nameLocation": "88:12:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "addr", + "nameLocation": "109:4:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "101:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "101:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "100:14:0" + }, + "src": "82:33:0" + } + ], + "scope": 7, + "src": "56:61:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "31:87:0" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./AbstractProxy.sol\";\nimport \"./ProxyStorage.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../utils/AddressUtil.sol\";\n\ncontract UUPSProxy is AbstractProxy, ProxyStorage {\n constructor(address firstImplementation) {\n if (firstImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(firstImplementation)) {\n revert AddressError.NotAContract(firstImplementation);\n }\n\n _proxyStore().implementation = firstImplementation;\n }\n\n function _getImplementation() internal view virtual override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ProxyStorage": [ + 542 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 817, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 758, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:18" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "file": "./AbstractProxy.sol", + "id": 759, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 527, + "src": "56:29:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 760, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 543, + "src": "86:28:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 761, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 16, + "src": "115:36:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 762, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 817, + "sourceUnit": 1697, + "src": "152:34:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 763, + "name": "AbstractProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 526, + "src": "210:13:18" + }, + "id": 764, + "nodeType": "InheritanceSpecifier", + "src": "210:13:18" + }, + { + "baseName": { + "id": 765, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "225:12:18" + }, + "id": 766, + "nodeType": "InheritanceSpecifier", + "src": "225:12:18" + } + ], + "canonicalName": "UUPSProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 816, + "linearizedBaseContracts": [ + 816, + 542, + 526 + ], + "name": "UUPSProxy", + "nameLocation": "197:9:18", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 803, + "nodeType": "Block", + "src": "285:312:18", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 771, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "299:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:18", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "322:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 772, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "322:7:18", + "typeDescriptions": {} + } + }, + "id": 775, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "322:10:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "299:33:18", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 783, + "nodeType": "IfStatement", + "src": "295:97:18", + "trueBody": { + "id": 782, + "nodeType": "Block", + "src": "334:58:18", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 777, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "355:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "355:24:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "355:26:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 781, + "nodeType": "RevertStatement", + "src": "348:33:18" + } + ] + } + }, + { + "condition": { + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "406:44:18", + "subExpression": { + "arguments": [ + { + "id": 786, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "430:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 784, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "407:11:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "407:22:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "407:43:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 796, + "nodeType": "IfStatement", + "src": "402:128:18", + "trueBody": { + "id": 795, + "nodeType": "Block", + "src": "452:78:18", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 792, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "499:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 789, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "473:12:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "473:25:18", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "473:46:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 794, + "nodeType": "RevertStatement", + "src": "466:53:18" + } + ] + } + }, + { + "expression": { + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 797, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "540:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "540:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 799, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "540:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 800, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "571:19:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "540:50:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 802, + "nodeType": "ExpressionStatement", + "src": "540:50:18" + } + ] + }, + "id": 804, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "264:19:18", + "nodeType": "VariableDeclaration", + "scope": 804, + "src": "256:27:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 767, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "256:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "255:29:18" + }, + "returnParameters": { + "id": 770, + "nodeType": "ParameterList", + "parameters": [], + "src": "285:0:18" + }, + "scope": 816, + "src": "244:353:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 525 + ], + "body": { + "id": 814, + "nodeType": "Block", + "src": "682:52:18", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 810, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "699:11:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "699:13:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 812, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "699:28:18", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 809, + "id": 813, + "nodeType": "Return", + "src": "692:35:18" + } + ] + }, + "id": 815, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "612:18:18", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 806, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "655:8:18" + }, + "parameters": { + "id": 805, + "nodeType": "ParameterList", + "parameters": [], + "src": "630:2:18" + }, + "returnParameters": { + "id": 809, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 808, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 815, + "src": "673:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 807, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "673:7:18", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "672:9:18" + }, + "scope": 816, + "src": "603:131:18", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 817, + "src": "188:548:18", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:706:18" + } + }, + "@synthetixio/core-contracts/contracts/errors/ArrayError.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary ArrayError {\n error EmptyArray();\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ArrayError.sol", + "exportedSymbols": { + "ArrayError": [ + 20 + ] + }, + "id": 21, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 17, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:2" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ArrayError", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 20, + "linearizedBaseContracts": [ + 20 + ], + "name": "ArrayError", + "nameLocation": "64:10:2", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 19, + "name": "EmptyArray", + "nameLocation": "87:10:2", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "97:2:2" + }, + "src": "81:19:2" + } + ], + "scope": 21, + "src": "56:46:2", + "usedErrors": [ + 19 + ] + } + ], + "src": "31:72:2" + } + }, + "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/token/ERC721.sol\";\n\ncontract CouncilToken is Ownable, UUPSImplementation, ERC721 {\n error TokenIsNotTransferable();\n\n function initialize(string memory tokenName, string memory tokenSymbol) public onlyOwner {\n _initialize(tokenName, tokenSymbol, \"\");\n }\n\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n\n function mint(address to, uint256 tokenId) public virtual onlyOwner {\n _mint(to, tokenId);\n }\n\n function burn(uint256 tokenId) public virtual onlyOwner {\n _burn(tokenId);\n }\n\n function transferFrom(\n address,\n address,\n uint256\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n\n function safeTransferFrom(\n address,\n address,\n uint256,\n bytes memory\n ) public virtual override {\n revert TokenIsNotTransferable();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/tokens/CouncilToken.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "CouncilToken": [ + 6379 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "IOwnable": [ + 220 + ], + "IUUPSImplementation": [ + 238 + ], + "InitError": [ + 32 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "StringUtil": [ + 2369 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 6380, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6281, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:39" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 6282, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 757, + "src": "56:76:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 6283, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 415, + "src": "133:69:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "file": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "id": 6284, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6380, + "sourceUnit": 1642, + "src": "203:64:39", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6285, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "294:7:39" + }, + "id": 6286, + "nodeType": "InheritanceSpecifier", + "src": "294:7:39" + }, + { + "baseName": { + "id": 6287, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "303:18:39" + }, + "id": 6288, + "nodeType": "InheritanceSpecifier", + "src": "303:18:39" + }, + { + "baseName": { + "id": 6289, + "name": "ERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1641, + "src": "323:6:39" + }, + "id": 6290, + "nodeType": "InheritanceSpecifier", + "src": "323:6:39" + } + ], + "canonicalName": "CouncilToken", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 6379, + "linearizedBaseContracts": [ + 6379, + 1641, + 1677, + 180, + 157, + 78, + 756, + 542, + 238, + 414, + 476, + 494, + 220 + ], + "name": "CouncilToken", + "nameLocation": "278:12:39", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6292, + "name": "TokenIsNotTransferable", + "nameLocation": "342:22:39", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6291, + "nodeType": "ParameterList", + "parameters": [], + "src": "364:2:39" + }, + "src": "336:31:39" + }, + { + "body": { + "id": 6307, + "nodeType": "Block", + "src": "462:56:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6302, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6294, + "src": "484:9:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6303, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6296, + "src": "495:11:39", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "hexValue": "", + "id": 6304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "508:2:39", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 6301, + "name": "_initialize", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "472:11:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory,string memory)" + } + }, + "id": 6305, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "472:39:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6306, + "nodeType": "ExpressionStatement", + "src": "472:39:39" + } + ] + }, + "functionSelector": "4cd88b76", + "id": 6308, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6299, + "kind": "modifierInvocation", + "modifierName": { + "id": 6298, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "452:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "452:9:39" + } + ], + "name": "initialize", + "nameLocation": "382:10:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6297, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6294, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "407:9:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "393:23:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6293, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "393:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6296, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "432:11:39", + "nodeType": "VariableDeclaration", + "scope": 6308, + "src": "418:25:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6295, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "418:6:39", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "392:52:39" + }, + "returnParameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "462:0:39" + }, + "scope": 6379, + "src": "373:145:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 6320, + "nodeType": "Block", + "src": "596:46:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6317, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6310, + "src": "617:17:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6316, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "606:10:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "606:29:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6319, + "nodeType": "ExpressionStatement", + "src": "606:29:39" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 6321, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6314, + "kind": "modifierInvocation", + "modifierName": { + "id": 6313, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "586:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "586:9:39" + } + ], + "name": "upgradeTo", + "nameLocation": "533:9:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6312, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "577:8:39" + }, + "parameters": { + "id": 6311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6310, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "551:17:39", + "nodeType": "VariableDeclaration", + "scope": 6321, + "src": "543:25:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6309, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "543:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "542:27:39" + }, + "returnParameters": { + "id": 6315, + "nodeType": "ParameterList", + "parameters": [], + "src": "596:0:39" + }, + "scope": 6379, + "src": "524:118:39", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 6335, + "nodeType": "Block", + "src": "716:35:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6331, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6323, + "src": "732:2:39", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6332, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6325, + "src": "736:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6330, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1436, + "src": "726:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "726:18:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6334, + "nodeType": "ExpressionStatement", + "src": "726:18:39" + } + ] + }, + "functionSelector": "40c10f19", + "id": 6336, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6328, + "kind": "modifierInvocation", + "modifierName": { + "id": 6327, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "706:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "706:9:39" + } + ], + "name": "mint", + "nameLocation": "657:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6323, + "mutability": "mutable", + "name": "to", + "nameLocation": "670:2:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "662:10:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6322, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "662:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6325, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "682:7:39", + "nodeType": "VariableDeclaration", + "scope": 6336, + "src": "674:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "674:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "661:29:39" + }, + "returnParameters": { + "id": 6329, + "nodeType": "ParameterList", + "parameters": [], + "src": "716:0:39" + }, + "scope": 6379, + "src": "648:103:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 6347, + "nodeType": "Block", + "src": "813:31:39", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6344, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6338, + "src": "829:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6343, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1486, + "src": "823:5:39", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:14:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6346, + "nodeType": "ExpressionStatement", + "src": "823:14:39" + } + ] + }, + "functionSelector": "42966c68", + "id": 6348, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6341, + "kind": "modifierInvocation", + "modifierName": { + "id": 6340, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "803:9:39" + }, + "nodeType": "ModifierInvocation", + "src": "803:9:39" + } + ], + "name": "burn", + "nameLocation": "766:4:39", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6338, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:39", + "nodeType": "VariableDeclaration", + "scope": 6348, + "src": "771:15:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "770:17:39" + }, + "returnParameters": { + "id": 6342, + "nodeType": "ParameterList", + "parameters": [], + "src": "813:0:39" + }, + "scope": 6379, + "src": "757:87:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1259 + ], + "body": { + "id": 6361, + "nodeType": "Block", + "src": "953:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6358, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "970:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "970:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6360, + "nodeType": "RevertStatement", + "src": "963:31:39" + } + ] + }, + "functionSelector": "23b872dd", + "id": 6362, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "859:12:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6356, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "944:8:39" + }, + "parameters": { + "id": 6355, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "881:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "881:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6352, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "898:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "898:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6354, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6362, + "src": "915:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "915:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "871:57:39" + }, + "returnParameters": { + "id": 6357, + "nodeType": "ParameterList", + "parameters": [], + "src": "953:0:39" + }, + "scope": 6379, + "src": "850:151:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 1324 + ], + "body": { + "id": 6377, + "nodeType": "Block", + "src": "1136:48:39", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6374, + "name": "TokenIsNotTransferable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6292, + "src": "1153:22:39", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1153:24:39", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6376, + "nodeType": "RevertStatement", + "src": "1146:31:39" + } + ] + }, + "functionSelector": "b88d4fde", + "id": 6378, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "1016:16:39", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6372, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1127:8:39" + }, + "parameters": { + "id": 6371, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6364, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1042:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6363, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1042:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6366, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1059:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6365, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1059:7:39", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6368, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1076:7:39", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6367, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1076:7:39", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6370, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6378, + "src": "1093:12:39", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 6369, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1093:5:39", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "1032:79:39" + }, + "returnParameters": { + "id": 6373, + "nodeType": "ParameterList", + "parameters": [], + "src": "1136:0:39" + }, + "scope": 6379, + "src": "1007:177:39", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 6380, + "src": "269:917:39", + "usedErrors": [ + 5, + 10, + 14, + 24, + 29, + 262, + 561, + 563, + 861, + 865, + 869, + 873, + 6292 + ] + } + ], + "src": "31:1156:39" + } + }, + "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nabstract contract AbstractProxy {\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n address implementation = _getImplementation();\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n function _getImplementation() internal view virtual returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/AbstractProxy.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ] + }, + "id": 527, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 496, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:15" + }, + { + "abstract": true, + "baseContracts": [], + "canonicalName": "AbstractProxy", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 526, + "linearizedBaseContracts": [ + 526 + ], + "name": "AbstractProxy", + "nameLocation": "74:13:15", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "122:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 499, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "132:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "132:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "132:10:15" + } + ] + }, + "id": 503, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 497, + "nodeType": "ParameterList", + "parameters": [], + "src": "102:2:15" + }, + "returnParameters": { + "id": 498, + "nodeType": "ParameterList", + "parameters": [], + "src": "122:0:15" + }, + "scope": 526, + "src": "94:55:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "182:27:15", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 506, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 520, + "src": "192:8:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "192:10:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 508, + "nodeType": "ExpressionStatement", + "src": "192:10:15" + } + ] + }, + "id": 510, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 504, + "nodeType": "ParameterList", + "parameters": [], + "src": "162:2:15" + }, + "returnParameters": { + "id": 505, + "nodeType": "ParameterList", + "parameters": [], + "src": "182:0:15" + }, + "scope": 526, + "src": "155:54:15", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 519, + "nodeType": "Block", + "src": "244:521:15", + "statements": [ + { + "assignments": [ + 514 + ], + "declarations": [ + { + "constant": false, + "id": 514, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "262:14:15", + "nodeType": "VariableDeclaration", + "scope": 519, + "src": "254:22:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "254:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 517, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 515, + "name": "_getImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "279:18:15", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "279:20:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "254:45:15" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "375:384:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "402:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "405:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "408:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "408:14:15" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "389:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "389:34:15" + }, + "nodeType": "YulExpressionStatement", + "src": "389:34:15" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "437:74:15", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "464:3:15" + }, + "nodeType": "YulFunctionCall", + "src": "464:5:15" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "471:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "487:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "490:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "490:14:15" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "506:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "509:1:15", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "451:12:15" + }, + "nodeType": "YulFunctionCall", + "src": "451:60:15" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "441:6:15", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "540:1:15", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "543:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "546:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "546:16:15" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "525:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "525:38:15" + }, + "nodeType": "YulExpressionStatement", + "src": "525:38:15" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "610:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "635:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "638:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "638:16:15" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "628:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "628:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "628:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "603:66:15", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "608:1:15", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "690:59:15", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "715:1:15", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "718:14:15" + }, + "nodeType": "YulFunctionCall", + "src": "718:16:15" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "708:6:15" + }, + "nodeType": "YulFunctionCall", + "src": "708:27:15" + }, + "nodeType": "YulExpressionStatement", + "src": "708:27:15" + } + ] + }, + "nodeType": "YulCase", + "src": "682:67:15", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "584:6:15" + }, + "nodeType": "YulSwitch", + "src": "577:172:15" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 514, + "isOffset": false, + "isSlot": false, + "src": "471:14:15", + "valueSize": 1 + } + ], + "id": 518, + "nodeType": "InlineAssembly", + "src": "366:393:15" + } + ] + }, + "id": 520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "224:8:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 511, + "nodeType": "ParameterList", + "parameters": [], + "src": "232:2:15" + }, + "returnParameters": { + "id": 512, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:0:15" + }, + "scope": 526, + "src": "215:550:15", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "id": 525, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "_getImplementation", + "nameLocation": "780:18:15", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 521, + "nodeType": "ParameterList", + "parameters": [], + "src": "798:2:15" + }, + "returnParameters": { + "id": 524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 525, + "src": "832:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "832:7:15", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "831:9:15" + }, + "scope": 526, + "src": "771:70:15", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 527, + "src": "56:787:15", + "usedErrors": [] + } + ], + "src": "31:813:15" + } + }, + "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ProxyStorage {\n struct ProxyStore {\n address implementation;\n bool simulatingUpgrade;\n }\n\n function _proxyStore() internal pure returns (ProxyStore storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.v3.proxy\")) - 1)\n store.slot := 0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "exportedSymbols": { + "ProxyStorage": [ + 542 + ] + }, + "id": 543, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 528, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:16" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ProxyStorage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 542, + "linearizedBaseContracts": [ + 542 + ], + "name": "ProxyStorage", + "nameLocation": "65:12:16", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ProxyStorage.ProxyStore", + "id": 533, + "members": [ + { + "constant": false, + "id": 530, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "120:14:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "112:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "112:7:16", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 532, + "mutability": "mutable", + "name": "simulatingUpgrade", + "nameLocation": "149:17:16", + "nodeType": "VariableDeclaration", + "scope": 533, + "src": "144:22:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 531, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "144:4:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "name": "ProxyStore", + "nameLocation": "91:10:16", + "nodeType": "StructDefinition", + "scope": 542, + "src": "84:89:16", + "visibility": "public" + }, + { + "body": { + "id": 540, + "nodeType": "Block", + "src": "251:198:16", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "270:173:16", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "353:80:16", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "367:66:16", + "type": "", + "value": "0x32402780481dd8149e50baad867f01da72e2f7d02639a6fe378dbd80b6bb446e" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "353:10:16" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 537, + "isOffset": false, + "isSlot": true, + "src": "353:10:16", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 539, + "nodeType": "InlineAssembly", + "src": "261:182:16" + } + ] + }, + "id": 541, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_proxyStore", + "nameLocation": "188:11:16", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:16" + }, + "returnParameters": { + "id": 538, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 537, + "mutability": "mutable", + "name": "store", + "nameLocation": "244:5:16", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "225:24:16", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 536, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 535, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "225:10:16" + }, + "referencedDeclaration": 533, + "src": "225:10:16", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "src": "224:26:16" + }, + "scope": 542, + "src": "179:270:16", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 543, + "src": "56:395:16", + "usedErrors": [] + } + ], + "src": "31:421:16" + } + }, + "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IUUPSImplementation.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"./ProxyStorage.sol\";\n\nabstract contract UUPSImplementation is IUUPSImplementation, ProxyStorage {\n event Upgraded(address implementation);\n\n error ImplementationIsSterile(address implementation);\n error UpgradeSimulationFailed();\n\n function _upgradeTo(address newImplementation) internal virtual {\n if (newImplementation == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (!AddressUtil.isContract(newImplementation)) {\n revert AddressError.NotAContract(newImplementation);\n }\n\n ProxyStore storage store = _proxyStore();\n\n if (newImplementation == store.implementation) {\n revert ChangeError.NoChange();\n }\n\n if (!store.simulatingUpgrade && _implementationIsSterile(newImplementation)) {\n revert ImplementationIsSterile(newImplementation);\n }\n\n store.implementation = newImplementation;\n\n emit Upgraded(newImplementation);\n }\n\n function _implementationIsSterile(address candidateImplementation) internal virtual returns (bool) {\n (bool simulationReverted, bytes memory simulationResponse) = address(this).delegatecall(\n abi.encodeCall(this.simulateUpgradeTo, (candidateImplementation))\n );\n\n return\n !simulationReverted &&\n keccak256(abi.encodePacked(simulationResponse)) == keccak256(abi.encodePacked(UpgradeSimulationFailed.selector));\n }\n\n function simulateUpgradeTo(address newImplementation) public override {\n ProxyStore storage store = _proxyStore();\n\n store.simulatingUpgrade = true;\n\n address currentImplementation = store.implementation;\n store.implementation = newImplementation;\n\n (bool rollbackSuccessful, ) = newImplementation.delegatecall(\n abi.encodeCall(this.upgradeTo, (currentImplementation))\n );\n\n if (!rollbackSuccessful || _proxyStore().implementation != currentImplementation) {\n revert UpgradeSimulationFailed();\n }\n\n store.simulatingUpgrade = false;\n\n // solhint-disable-next-line reason-string\n revert();\n }\n\n function getImplementation() external view override returns (address) {\n return _proxyStore().implementation;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ] + }, + "id": 757, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 544, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:17" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "file": "../interfaces/IUUPSImplementation.sol", + "id": 545, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 239, + "src": "56:47:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 546, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 16, + "src": "104:36:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 547, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 26, + "src": "141:35:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 548, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 1697, + "src": "177:34:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/ProxyStorage.sol", + "file": "./ProxyStorage.sol", + "id": 549, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 757, + "sourceUnit": 543, + "src": "212:28:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "baseName": { + "id": 550, + "name": "IUUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 238, + "src": "282:19:17" + }, + "id": 551, + "nodeType": "InheritanceSpecifier", + "src": "282:19:17" + }, + { + "baseName": { + "id": 552, + "name": "ProxyStorage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 542, + "src": "303:12:17" + }, + "id": 553, + "nodeType": "InheritanceSpecifier", + "src": "303:12:17" + } + ], + "canonicalName": "UUPSImplementation", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": false, + "id": 756, + "linearizedBaseContracts": [ + 756, + 542, + 238 + ], + "name": "UUPSImplementation", + "nameLocation": "260:18:17", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 557, + "name": "Upgraded", + "nameLocation": "328:8:17", + "nodeType": "EventDefinition", + "parameters": { + "id": 556, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 555, + "indexed": false, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "345:14:17", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "337:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "337:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "336:24:17" + }, + "src": "322:39:17" + }, + { + "id": 561, + "name": "ImplementationIsSterile", + "nameLocation": "373:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "405:14:17", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "397:22:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 558, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "397:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "396:24:17" + }, + "src": "367:54:17" + }, + { + "id": 563, + "name": "UpgradeSimulationFailed", + "nameLocation": "432:23:17", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 562, + "nodeType": "ParameterList", + "parameters": [], + "src": "455:2:17" + }, + "src": "426:32:17" + }, + { + "body": { + "id": 634, + "nodeType": "Block", + "src": "528:662:17", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 568, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "542:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:1:17", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 569, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "563:7:17", + "typeDescriptions": {} + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "542:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 580, + "nodeType": "IfStatement", + "src": "538:95:17", + "trueBody": { + "id": 579, + "nodeType": "Block", + "src": "575:58:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 574, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "596:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "596:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "596:26:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 578, + "nodeType": "RevertStatement", + "src": "589:33:17" + } + ] + } + }, + { + "condition": { + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "647:42:17", + "subExpression": { + "arguments": [ + { + "id": 583, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "671:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 581, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "648:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "648:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:41:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 593, + "nodeType": "IfStatement", + "src": "643:124:17", + "trueBody": { + "id": 592, + "nodeType": "Block", + "src": "691:76:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 589, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "738:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 586, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "712:12:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NotAContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "712:25:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 590, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "712:44:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 591, + "nodeType": "RevertStatement", + "src": "705:51:17" + } + ] + } + }, + { + "assignments": [ + 596 + ], + "declarations": [ + { + "constant": false, + "id": 596, + "mutability": "mutable", + "name": "store", + "nameLocation": "796:5:17", + "nodeType": "VariableDeclaration", + "scope": 634, + "src": "777:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 595, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 594, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "777:10:17" + }, + "referencedDeclaration": 533, + "src": "777:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 599, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 597, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "804:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "804:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "777:40:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 600, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "832:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 601, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "853:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 602, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "853:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "832:41:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 610, + "nodeType": "IfStatement", + "src": "828:101:17", + "trueBody": { + "id": 609, + "nodeType": "Block", + "src": "875:54:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 604, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "896:11:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "896:20:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "896:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 608, + "nodeType": "RevertStatement", + "src": "889:29:17" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "943:24:17", + "subExpression": { + "expression": { + "id": 611, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "944:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 612, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "944:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "arguments": [ + { + "id": 615, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "996:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 614, + "name": "_implementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "971:24:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", + "typeString": "function (address) returns (bool)" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "971:43:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "943:71:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 623, + "nodeType": "IfStatement", + "src": "939:151:17", + "trueBody": { + "id": 622, + "nodeType": "Block", + "src": "1016:74:17", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 619, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1061:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 618, + "name": "ImplementationIsSterile", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "1037:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1037:42:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 621, + "nodeType": "RevertStatement", + "src": "1030:49:17" + } + ] + } + }, + { + "expression": { + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 624, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 596, + "src": "1100:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 626, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1100:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 627, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1123:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1100:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 629, + "nodeType": "ExpressionStatement", + "src": "1100:40:17" + }, + { + "eventCall": { + "arguments": [ + { + "id": 631, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 565, + "src": "1165:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 630, + "name": "Upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 557, + "src": "1156:8:17", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1156:27:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 633, + "nodeType": "EmitStatement", + "src": "1151:32:17" + } + ] + }, + "id": 635, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_upgradeTo", + "nameLocation": "473:10:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 566, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 565, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "492:17:17", + "nodeType": "VariableDeclaration", + "scope": 635, + "src": "484:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "484:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "483:27:17" + }, + "returnParameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [], + "src": "528:0:17" + }, + "scope": 756, + "src": "464:726:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 678, + "nodeType": "Block", + "src": "1295:370:17", + "statements": [ + { + "assignments": [ + 643, + 645 + ], + "declarations": [ + { + "constant": false, + "id": 643, + "mutability": "mutable", + "name": "simulationReverted", + "nameLocation": "1311:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1306:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 642, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1306:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 645, + "mutability": "mutable", + "name": "simulationResponse", + "nameLocation": "1344:18:17", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "1331:31:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 644, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1331:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 659, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 653, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1421:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 654, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "simulateUpgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "1421:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 655, + "name": "candidateImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "1446:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 656, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1445:25:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 651, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1406:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "1406:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1406:65:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 648, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1374:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + ], + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1366:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 646, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1366:7:17", + "typeDescriptions": {} + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1366:26:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1366:115:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1305:176:17" + }, + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1511:19:17", + "subExpression": { + "id": 660, + "name": "simulationReverted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "1512:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 665, + "name": "simulationResponse", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 645, + "src": "1573:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 663, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1556:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1556:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1556:36:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 662, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1546:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:47:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 671, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "1624:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1624:32:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "expression": { + "id": 669, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1607:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "1607:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1607:50:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 668, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1597:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:61:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1546:112:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1511:147:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 641, + "id": 677, + "nodeType": "Return", + "src": "1492:166:17" + } + ] + }, + "id": 679, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_implementationIsSterile", + "nameLocation": "1205:24:17", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 637, + "mutability": "mutable", + "name": "candidateImplementation", + "nameLocation": "1238:23:17", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1230:31:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 636, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1230:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1229:33:17" + }, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 640, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 679, + "src": "1289:4:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 639, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1289:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1288:6:17" + }, + "scope": 756, + "src": "1196:469:17", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 232 + ], + "body": { + "id": 743, + "nodeType": "Block", + "src": "1741:622:17", + "statements": [ + { + "assignments": [ + 687 + ], + "declarations": [ + { + "constant": false, + "id": 687, + "mutability": "mutable", + "name": "store", + "nameLocation": "1770:5:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1751:24:17", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + }, + "typeName": { + "id": 686, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 685, + "name": "ProxyStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 533, + "src": "1751:10:17" + }, + "referencedDeclaration": 533, + "src": "1751:10:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore" + } + }, + "visibility": "internal" + } + ], + "id": 690, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 688, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "1778:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1778:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1751:40:17" + }, + { + "expression": { + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 691, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1802:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 693, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1802:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1828:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1802:30:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 696, + "nodeType": "ExpressionStatement", + "src": "1802:30:17" + }, + { + "assignments": [ + 698 + ], + "declarations": [ + { + "constant": false, + "id": 698, + "mutability": "mutable", + "name": "currentImplementation", + "nameLocation": "1851:21:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1843:29:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1843:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 701, + "initialValue": { + "expression": { + "id": 699, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1875:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 700, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1875:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1843:52:17" + }, + { + "expression": { + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 702, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "1905:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 704, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "1905:20:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 705, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1928:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1905:40:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 707, + "nodeType": "ExpressionStatement", + "src": "1905:40:17" + }, + { + "assignments": [ + 709, + null + ], + "declarations": [ + { + "constant": false, + "id": 709, + "mutability": "mutable", + "name": "rollbackSuccessful", + "nameLocation": "1962:18:17", + "nodeType": "VariableDeclaration", + "scope": 743, + "src": "1957:23:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 708, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1957:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + }, + null + ], + "id": 720, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "expression": { + "id": 714, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2045:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UUPSImplementation_$756", + "typeString": "contract UUPSImplementation" + } + }, + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "upgradeTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 227, + "src": "2045:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + } + }, + { + "components": [ + { + "id": 716, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2062:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 717, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2061:23:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$", + "typeString": "function (address) external" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 712, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2030:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeCall", + "nodeType": "MemberAccess", + "src": "2030:14:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodecall_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2030:55:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "id": 710, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 681, + "src": "1986:17:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "delegatecall", + "nodeType": "MemberAccess", + "src": "1986:30:17", + "typeDescriptions": { + "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) returns (bool,bytes memory)" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1986:109:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1956:139:17" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2110:19:17", + "subExpression": { + "id": 721, + "name": "rollbackSuccessful", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "2111:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 723, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2133:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2133:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2133:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 726, + "name": "currentImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 698, + "src": "2165:21:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2133:53:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2110:76:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 733, + "nodeType": "IfStatement", + "src": "2106:139:17", + "trueBody": { + "id": 732, + "nodeType": "Block", + "src": "2188:57:17", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 729, + "name": "UpgradeSimulationFailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "2209:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2209:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 731, + "nodeType": "RevertStatement", + "src": "2202:32:17" + } + ] + } + }, + { + "expression": { + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 734, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 687, + "src": "2255:5:17", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 736, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "simulatingUpgrade", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "2255:23:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2281:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2255:31:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 739, + "nodeType": "ExpressionStatement", + "src": "2255:31:17" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 740, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "2348:6:17", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2348:8:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 742, + "nodeType": "ExpressionStatement", + "src": "2348:8:17" + } + ] + }, + "functionSelector": "c7f62cda", + "id": 744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "1680:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 683, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1732:8:17" + }, + "parameters": { + "id": 682, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 681, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "1706:17:17", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "1698:25:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 680, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1698:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1697:27:17" + }, + "returnParameters": { + "id": 684, + "nodeType": "ParameterList", + "parameters": [], + "src": "1741:0:17" + }, + "scope": 756, + "src": "1671:692:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 237 + ], + "body": { + "id": 754, + "nodeType": "Block", + "src": "2439:52:17", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 750, + "name": "_proxyStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 541, + "src": "2456:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ProxyStore_$533_storage_ptr_$", + "typeString": "function () pure returns (struct ProxyStorage.ProxyStore storage pointer)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2456:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ProxyStore_$533_storage_ptr", + "typeString": "struct ProxyStorage.ProxyStore storage pointer" + } + }, + "id": 752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "implementation", + "nodeType": "MemberAccess", + "referencedDeclaration": 530, + "src": "2456:28:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 749, + "id": 753, + "nodeType": "Return", + "src": "2449:35:17" + } + ] + }, + "functionSelector": "aaf10f42", + "id": 755, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "2378:17:17", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 746, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2412:8:17" + }, + "parameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [], + "src": "2395:2:17" + }, + "returnParameters": { + "id": 749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 748, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 755, + "src": "2430:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2430:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2429:9:17" + }, + "scope": 756, + "src": "2369:122:17", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 757, + "src": "242:2251:17", + "usedErrors": [ + 561, + 563 + ] + } + ], + "src": "31:2463:17" + } + }, + "@synthetixio/core-contracts/contracts/ownership/Ownable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./OwnableMixin.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/ChangeError.sol\";\n\ncontract Ownable is IOwnable, OwnableMixin {\n event OwnerNominated(address newOwner);\n event OwnerChanged(address oldOwner, address newOwner);\n\n error NotNominated(address addr);\n\n function acceptOwnership() public override {\n OwnableStore storage store = _ownableStore();\n\n address currentNominatedOwner = store.nominatedOwner;\n if (msg.sender != currentNominatedOwner) {\n revert NotNominated(msg.sender);\n }\n\n emit OwnerChanged(store.owner, currentNominatedOwner);\n store.owner = currentNominatedOwner;\n\n store.nominatedOwner = address(0);\n }\n\n function nominateNewOwner(address newNominatedOwner) public override onlyOwnerIfSet {\n OwnableStore storage store = _ownableStore();\n\n if (newNominatedOwner == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (newNominatedOwner == store.nominatedOwner) {\n revert ChangeError.NoChange();\n }\n\n store.nominatedOwner = newNominatedOwner;\n emit OwnerNominated(newNominatedOwner);\n }\n\n function renounceNomination() external override {\n OwnableStore storage store = _ownableStore();\n\n if (store.nominatedOwner != msg.sender) {\n revert NotNominated(msg.sender);\n }\n\n store.nominatedOwner = address(0);\n }\n\n function owner() external view override returns (address) {\n return _ownableStore().owner;\n }\n\n function nominatedOwner() external view override returns (address) {\n return _ownableStore().nominatedOwner;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ] + }, + "id": 415, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 240, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:12" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "./OwnableMixin.sol", + "id": 241, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 477, + "src": "56:28:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "file": "../interfaces/IOwnable.sol", + "id": 242, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 221, + "src": "85:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 243, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 16, + "src": "122:36:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/ChangeError.sol", + "file": "../errors/ChangeError.sol", + "id": 244, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 415, + "sourceUnit": 26, + "src": "159:35:12", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 245, + "name": "IOwnable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 220, + "src": "216:8:12" + }, + "id": 246, + "nodeType": "InheritanceSpecifier", + "src": "216:8:12" + }, + { + "baseName": { + "id": 247, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "226:12:12" + }, + "id": 248, + "nodeType": "InheritanceSpecifier", + "src": "226:12:12" + } + ], + "canonicalName": "Ownable", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 414, + "linearizedBaseContracts": [ + 414, + 476, + 494, + 220 + ], + "name": "Ownable", + "nameLocation": "205:7:12", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 252, + "name": "OwnerNominated", + "nameLocation": "251:14:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "274:8:12", + "nodeType": "VariableDeclaration", + "scope": 252, + "src": "266:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "266:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "265:18:12" + }, + "src": "245:39:12" + }, + { + "anonymous": false, + "id": 258, + "name": "OwnerChanged", + "nameLocation": "295:12:12", + "nodeType": "EventDefinition", + "parameters": { + "id": 257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 254, + "indexed": false, + "mutability": "mutable", + "name": "oldOwner", + "nameLocation": "316:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "308:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "308:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 256, + "indexed": false, + "mutability": "mutable", + "name": "newOwner", + "nameLocation": "334:8:12", + "nodeType": "VariableDeclaration", + "scope": 258, + "src": "326:16:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "326:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "307:36:12" + }, + "src": "289:55:12" + }, + { + "id": 262, + "name": "NotNominated", + "nameLocation": "356:12:12", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 260, + "mutability": "mutable", + "name": "addr", + "nameLocation": "377:4:12", + "nodeType": "VariableDeclaration", + "scope": 262, + "src": "369:12:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 259, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "369:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "368:14:12" + }, + "src": "350:33:12" + }, + { + "baseFunctions": [ + 201 + ], + "body": { + "id": 309, + "nodeType": "Block", + "src": "432:383:12", + "statements": [ + { + "assignments": [ + 268 + ], + "declarations": [ + { + "constant": false, + "id": 268, + "mutability": "mutable", + "name": "store", + "nameLocation": "463:5:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "442:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 267, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 266, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "442:12:12" + }, + "referencedDeclaration": 485, + "src": "442:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 271, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 269, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "471:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "471:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "442:44:12" + }, + { + "assignments": [ + 273 + ], + "declarations": [ + { + "constant": false, + "id": 273, + "mutability": "mutable", + "name": "currentNominatedOwner", + "nameLocation": "505:21:12", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "497:29:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 272, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "497:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 276, + "initialValue": { + "expression": { + "id": 274, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "529:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 275, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "529:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "497:52:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 277, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "563:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "563:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 279, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "577:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "563:35:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 287, + "nodeType": "IfStatement", + "src": "559:97:12", + "trueBody": { + "id": 286, + "nodeType": "Block", + "src": "600:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 282, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "634:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "634:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 281, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "621:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "621:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 285, + "nodeType": "RevertStatement", + "src": "614:31:12" + } + ] + } + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 289, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "684:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 290, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "684:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 291, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "697:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 288, + "name": "OwnerChanged", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 258, + "src": "671:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "671:48:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 293, + "nodeType": "EmitStatement", + "src": "666:53:12" + }, + { + "expression": { + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 294, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "729:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "729:11:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 297, + "name": "currentNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "743:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "729:35:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "729:35:12" + }, + { + "expression": { + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 300, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "775:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 302, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "775:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "806:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "798:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 303, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "798:7:12", + "typeDescriptions": {} + } + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "798:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "775:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "775:33:12" + } + ] + }, + "functionSelector": "79ba5097", + "id": 310, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "398:15:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 264, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "423:8:12" + }, + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [], + "src": "413:2:12" + }, + "returnParameters": { + "id": 265, + "nodeType": "ParameterList", + "parameters": [], + "src": "432:0:12" + }, + "scope": 414, + "src": "389:426:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 206 + ], + "body": { + "id": 358, + "nodeType": "Block", + "src": "905:376:12", + "statements": [ + { + "assignments": [ + 320 + ], + "declarations": [ + { + "constant": false, + "id": 320, + "mutability": "mutable", + "name": "store", + "nameLocation": "936:5:12", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "915:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 319, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 318, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "915:12:12" + }, + "referencedDeclaration": 485, + "src": "915:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 323, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 321, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "944:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "944:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "915:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 324, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "974:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1003:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "995:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 325, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "995:7:12", + "typeDescriptions": {} + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "995:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "974:31:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 336, + "nodeType": "IfStatement", + "src": "970:95:12", + "trueBody": { + "id": 335, + "nodeType": "Block", + "src": "1007:58:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 330, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1028:12:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1028:24:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1028:26:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 334, + "nodeType": "RevertStatement", + "src": "1021:33:12" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 337, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1079:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "id": 338, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1100:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 339, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1100:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1079:41:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 347, + "nodeType": "IfStatement", + "src": "1075:101:12", + "trueBody": { + "id": 346, + "nodeType": "Block", + "src": "1122:54:12", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 341, + "name": "ChangeError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "1143:11:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ChangeError_$25_$", + "typeString": "type(library ChangeError)" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "NoChange", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "1143:20:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1143:22:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "RevertStatement", + "src": "1136:29:12" + } + ] + } + }, + { + "expression": { + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 348, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 320, + "src": "1186:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 350, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1186:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 351, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1209:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1186:40:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 353, + "nodeType": "ExpressionStatement", + "src": "1186:40:12" + }, + { + "eventCall": { + "arguments": [ + { + "id": 355, + "name": "newNominatedOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "1256:17:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 354, + "name": "OwnerNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 252, + "src": "1241:14:12", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1241:33:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 357, + "nodeType": "EmitStatement", + "src": "1236:38:12" + } + ] + }, + "functionSelector": "1627540c", + "id": 359, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 316, + "kind": "modifierInvocation", + "modifierName": { + "id": 315, + "name": "onlyOwnerIfSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 447, + "src": "890:14:12" + }, + "nodeType": "ModifierInvocation", + "src": "890:14:12" + } + ], + "name": "nominateNewOwner", + "nameLocation": "830:16:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 314, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "881:8:12" + }, + "parameters": { + "id": 313, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 312, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "855:17:12", + "nodeType": "VariableDeclaration", + "scope": 359, + "src": "847:25:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 311, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "847:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "846:27:12" + }, + "returnParameters": { + "id": 317, + "nodeType": "ParameterList", + "parameters": [], + "src": "905:0:12" + }, + "scope": 414, + "src": "821:460:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 209 + ], + "body": { + "id": 390, + "nodeType": "Block", + "src": "1335:211:12", + "statements": [ + { + "assignments": [ + 365 + ], + "declarations": [ + { + "constant": false, + "id": 365, + "mutability": "mutable", + "name": "store", + "nameLocation": "1366:5:12", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "1345:26:12", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + }, + "typeName": { + "id": 364, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 363, + "name": "OwnableStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 485, + "src": "1345:12:12" + }, + "referencedDeclaration": 485, + "src": "1345:12:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore" + } + }, + "visibility": "internal" + } + ], + "id": 368, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 366, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1374:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1374:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:44:12" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 369, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1404:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 370, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1404:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "expression": { + "id": 371, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1428:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1428:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1404:34:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 380, + "nodeType": "IfStatement", + "src": "1400:96:12", + "trueBody": { + "id": 379, + "nodeType": "Block", + "src": "1440:56:12", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 375, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1474:3:12", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "1474:10:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 374, + "name": "NotNominated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 262, + "src": "1461:12:12", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1461:24:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 378, + "nodeType": "RevertStatement", + "src": "1454:31:12" + } + ] + } + }, + { + "expression": { + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 381, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "1506:5:12", + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 383, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1506:20:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "hexValue": "30", + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1537:1:12", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1529:7:12", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1529:7:12", + "typeDescriptions": {} + } + }, + "id": 387, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1529:10:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1506:33:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 389, + "nodeType": "ExpressionStatement", + "src": "1506:33:12" + } + ] + }, + "functionSelector": "718fe928", + "id": 391, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "1296:18:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 361, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1326:8:12" + }, + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "1314:2:12" + }, + "returnParameters": { + "id": 362, + "nodeType": "ParameterList", + "parameters": [], + "src": "1335:0:12" + }, + "scope": 414, + "src": "1287:259:12", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 214 + ], + "body": { + "id": 401, + "nodeType": "Block", + "src": "1610:45:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 397, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1627:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1627:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 399, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "owner", + "nodeType": "MemberAccess", + "referencedDeclaration": 482, + "src": "1627:21:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 396, + "id": 400, + "nodeType": "Return", + "src": "1620:28:12" + } + ] + }, + "functionSelector": "8da5cb5b", + "id": 402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "1561:5:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 393, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:12" + }, + "parameters": { + "id": 392, + "nodeType": "ParameterList", + "parameters": [], + "src": "1566:2:12" + }, + "returnParameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 395, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "1601:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 394, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1601:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1600:9:12" + }, + "scope": 414, + "src": "1552:103:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 219 + ], + "body": { + "id": 412, + "nodeType": "Block", + "src": "1728:54:12", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 408, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "1745:13:12", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1745:15:12", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 410, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominatedOwner", + "nodeType": "MemberAccess", + "referencedDeclaration": 484, + "src": "1745:30:12", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 407, + "id": 411, + "nodeType": "Return", + "src": "1738:37:12" + } + ] + }, + "functionSelector": "53a47bb7", + "id": 413, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "1670:14:12", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 404, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1701:8:12" + }, + "parameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "1684:2:12" + }, + "returnParameters": { + "id": 407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 406, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 413, + "src": "1719:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 405, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1719:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1718:9:12" + }, + "scope": 414, + "src": "1661:121:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 415, + "src": "196:1588:12", + "usedErrors": [ + 5, + 10, + 24, + 262 + ] + } + ], + "src": "31:1754:12" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IERC721.sol\";\nimport \"../interfaces/IERC721Metadata.sol\";\nimport \"../interfaces/IERC721Receiver.sol\";\nimport \"../errors/AddressError.sol\";\nimport \"../errors/AccessError.sol\";\nimport \"../errors/InitError.sol\";\nimport \"./ERC721Storage.sol\";\nimport \"../utils/AddressUtil.sol\";\nimport \"../utils/StringUtil.sol\";\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol\n*/\n\ncontract ERC721 is IERC721, IERC721Metadata, ERC721Storage {\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n error CannotSelfApprove(address);\n error InvalidTransferRecipient(address);\n error TokenDoesNotExist(uint256);\n error TokenAlreadyMinted(uint256);\n\n function _initialize(\n string memory tokenName,\n string memory tokenSymbol,\n string memory baseTokenURI\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (bytes(store.name).length > 0 || bytes(store.symbol).length > 0 || bytes(store.baseTokenURI).length > 0) {\n revert InitError.AlreadyInitialized();\n }\n\n store.name = tokenName;\n store.symbol = tokenSymbol;\n store.baseTokenURI = baseTokenURI;\n }\n\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return\n interfaceId == this.supportsInterface.selector || // ERC165\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId;\n }\n\n function balanceOf(address holder) public view virtual override returns (uint) {\n if (holder == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n return _erc721Store().balanceOf[holder];\n }\n\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().ownerOf[tokenId];\n }\n\n function name() external view virtual override returns (string memory) {\n return _erc721Store().name;\n }\n\n function symbol() external view virtual override returns (string memory) {\n return _erc721Store().symbol;\n }\n\n function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n string memory baseURI = _erc721Store().baseTokenURI;\n\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, StringUtil.uintToString(tokenId))) : \"\";\n }\n\n function approve(address to, uint256 tokenId) public virtual override {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n if (to == holder) {\n revert CannotSelfApprove(to);\n }\n\n if (msg.sender != holder && !isApprovedForAll(holder, msg.sender)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _approve(to, tokenId);\n }\n\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) {\n revert TokenDoesNotExist(tokenId);\n }\n\n return _erc721Store().tokenApprovals[tokenId];\n }\n\n function setApprovalForAll(address operator, bool approved) public virtual override {\n if (msg.sender == operator) {\n revert CannotSelfApprove(operator);\n }\n\n _erc721Store().operatorApprovals[msg.sender][operator] = approved;\n\n emit ApprovalForAll(msg.sender, operator, approved);\n }\n\n function isApprovedForAll(address holder, address operator) public view virtual override returns (bool) {\n return _erc721Store().operatorApprovals[holder][operator];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n if (!_isApprovedOrOwner(msg.sender, tokenId)) {\n revert AccessError.Unauthorized(msg.sender);\n }\n\n _transfer(from, to, tokenId);\n if (!_checkOnERC721Received(from, to, tokenId, data)) {\n revert InvalidTransferRecipient(to);\n }\n }\n\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _erc721Store().ownerOf[tokenId] != address(0);\n }\n\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address holder = ownerOf(tokenId);\n\n // Not checking tokenId existence since it is checked in ownerOf() and getApproved()\n\n return (spender == holder || getApproved(tokenId) == spender || isApprovedForAll(holder, spender));\n }\n\n function _mint(address to, uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n if (_exists(tokenId)) {\n revert TokenAlreadyMinted(tokenId);\n }\n\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n function _burn(uint256 tokenId) internal virtual {\n ERC721Store storage store = _erc721Store();\n address holder = store.ownerOf[tokenId];\n\n _approve(address(0), tokenId);\n\n store.balanceOf[holder] -= 1;\n delete store.ownerOf[tokenId];\n\n emit Transfer(holder, address(0), tokenId);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n ERC721Store storage store = _erc721Store();\n\n if (ownerOf(tokenId) != from) {\n revert AccessError.Unauthorized(from);\n }\n\n if (to == address(0)) {\n revert AddressError.ZeroAddress();\n }\n\n // Clear approvals from the previous holder\n _approve(address(0), tokenId);\n\n store.balanceOf[from] -= 1;\n store.balanceOf[to] += 1;\n store.ownerOf[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n function _approve(address to, uint256 tokenId) internal virtual {\n _erc721Store().tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (AddressUtil.isContract(to)) {\n try IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch {\n return false;\n }\n } else {\n return true;\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ERC721": [ + 1641 + ], + "ERC721Storage": [ + 1677 + ], + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ], + "IERC721Metadata": [ + 180 + ], + "IERC721Receiver": [ + 196 + ], + "InitError": [ + 32 + ], + "StringUtil": [ + 2369 + ] + }, + "id": 1642, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 818, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:19" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "file": "../interfaces/IERC721.sol", + "id": 819, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 158, + "src": "56:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "file": "../interfaces/IERC721Metadata.sol", + "id": 820, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 181, + "src": "92:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "file": "../interfaces/IERC721Receiver.sol", + "id": 821, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 197, + "src": "136:43:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AddressError.sol", + "file": "../errors/AddressError.sol", + "id": 822, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 16, + "src": "180:36:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/AccessError.sol", + "file": "../errors/AccessError.sol", + "id": 823, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 7, + "src": "217:35:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/errors/InitError.sol", + "file": "../errors/InitError.sol", + "id": 824, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 33, + "src": "253:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "file": "./ERC721Storage.sol", + "id": 825, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1678, + "src": "287:29:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/AddressUtil.sol", + "file": "../utils/AddressUtil.sol", + "id": 826, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 1697, + "src": "317:34:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "file": "../utils/StringUtil.sol", + "id": 827, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 1642, + "sourceUnit": 2370, + "src": "352:33:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 828, + "name": "IERC721", + "nodeType": "IdentifierPath", + "referencedDeclaration": 157, + "src": "566:7:19" + }, + "id": 829, + "nodeType": "InheritanceSpecifier", + "src": "566:7:19" + }, + { + "baseName": { + "id": 830, + "name": "IERC721Metadata", + "nodeType": "IdentifierPath", + "referencedDeclaration": 180, + "src": "575:15:19" + }, + "id": 831, + "nodeType": "InheritanceSpecifier", + "src": "575:15:19" + }, + { + "baseName": { + "id": 832, + "name": "ERC721Storage", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1677, + "src": "592:13:19" + }, + "id": 833, + "nodeType": "InheritanceSpecifier", + "src": "592:13:19" + } + ], + "canonicalName": "ERC721", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1641, + "linearizedBaseContracts": [ + 1641, + 1677, + 180, + 157, + 78 + ], + "name": "ERC721", + "nameLocation": "556:6:19", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "id": 841, + "name": "Transfer", + "nameLocation": "618:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 835, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nameLocation": "643:4:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "627:20:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 834, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "627:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 837, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nameLocation": "665:2:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "649:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 839, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "685:7:19", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "669:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 838, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "626:67:19" + }, + "src": "612:82:19" + }, + { + "anonymous": false, + "id": 849, + "name": "Approval", + "nameLocation": "705:8:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 843, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "730:5:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "714:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 842, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "714:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 845, + "indexed": true, + "mutability": "mutable", + "name": "approved", + "nameLocation": "753:8:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "737:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 844, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "737:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 847, + "indexed": true, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "779:7:19", + "nodeType": "VariableDeclaration", + "scope": 849, + "src": "763:23:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 846, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "763:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "713:74:19" + }, + "src": "699:89:19" + }, + { + "anonymous": false, + "id": 857, + "name": "ApprovalForAll", + "nameLocation": "799:14:19", + "nodeType": "EventDefinition", + "parameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 851, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nameLocation": "830:5:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "814:21:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 850, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "814:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 853, + "indexed": true, + "mutability": "mutable", + "name": "operator", + "nameLocation": "853:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "837:24:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 852, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "837:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 855, + "indexed": false, + "mutability": "mutable", + "name": "approved", + "nameLocation": "868:8:19", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "863:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 854, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "863:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "813:64:19" + }, + "src": "793:85:19" + }, + { + "id": 861, + "name": "CannotSelfApprove", + "nameLocation": "890:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 860, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 859, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 861, + "src": "908:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 858, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "908:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "907:9:19" + }, + "src": "884:33:19" + }, + { + "id": 865, + "name": "InvalidTransferRecipient", + "nameLocation": "928:24:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 863, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 865, + "src": "953:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 862, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "953:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "952:9:19" + }, + "src": "922:40:19" + }, + { + "id": 869, + "name": "TokenDoesNotExist", + "nameLocation": "973:17:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "991:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 866, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "991:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "990:9:19" + }, + "src": "967:33:19" + }, + { + "id": 873, + "name": "TokenAlreadyMinted", + "nameLocation": "1011:18:19", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 872, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 871, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1030:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 870, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1030:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1029:9:19" + }, + "src": "1005:34:19" + }, + { + "body": { + "id": 939, + "nodeType": "Block", + "src": "1193:350:19", + "statements": [ + { + "assignments": [ + 884 + ], + "declarations": [ + { + "constant": false, + "id": 884, + "mutability": "mutable", + "name": "store", + "nameLocation": "1223:5:19", + "nodeType": "VariableDeclaration", + "scope": 939, + "src": "1203:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 883, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 882, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "1203:11:19" + }, + "referencedDeclaration": 1668, + "src": "1203:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 887, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 885, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "1231:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1231:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1203:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 890, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1265:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1265:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1259:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 888, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1259:5:19", + "typeDescriptions": {} + } + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1259:17:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1259:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1286:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1259:28:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 898, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1297:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 899, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1297:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 897, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1291:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 896, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1291:5:19", + "typeDescriptions": {} + } + }, + "id": 900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1291:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1291:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 902, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1320:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1291:30:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:62:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "expression": { + "id": 907, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1331:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1331:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1325:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 905, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1325:5:19", + "typeDescriptions": {} + } + }, + "id": 909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1325:25:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + }, + "id": 910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "1325:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1360:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1325:36:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1259:102:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 920, + "nodeType": "IfStatement", + "src": "1255:170:19", + "trueBody": { + "id": 919, + "nodeType": "Block", + "src": "1363:62:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 914, + "name": "InitError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "1384:9:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_InitError_$32_$", + "typeString": "type(library InitError)" + } + }, + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "AlreadyInitialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 29, + "src": "1384:28:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1384:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 918, + "nodeType": "RevertStatement", + "src": "1377:37:19" + } + ] + } + }, + { + "expression": { + "id": 925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 921, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1435:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 923, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "1435:10:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 924, + "name": "tokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 875, + "src": "1448:9:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1435:22:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 926, + "nodeType": "ExpressionStatement", + "src": "1435:22:19" + }, + { + "expression": { + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 927, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1467:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 929, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "1467:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 930, + "name": "tokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "1482:11:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1467:26:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 932, + "nodeType": "ExpressionStatement", + "src": "1467:26:19" + }, + { + "expression": { + "id": 937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "id": 933, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "1503:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "1503:18:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 936, + "name": "baseTokenURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "1524:12:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1503:33:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 938, + "nodeType": "ExpressionStatement", + "src": "1503:33:19" + } + ] + }, + "id": 940, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_initialize", + "nameLocation": "1054:11:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 875, + "mutability": "mutable", + "name": "tokenName", + "nameLocation": "1089:9:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1075:23:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 874, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1075:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 877, + "mutability": "mutable", + "name": "tokenSymbol", + "nameLocation": "1122:11:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1108:25:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 876, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1108:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 879, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "1157:12:19", + "nodeType": "VariableDeclaration", + "scope": 940, + "src": "1143:26:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 878, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1143:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "1065:110:19" + }, + "returnParameters": { + "id": 881, + "nodeType": "ParameterList", + "parameters": [], + "src": "1193:0:19" + }, + "scope": 1641, + "src": "1045:498:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 77 + ], + "body": { + "id": 968, + "nodeType": "Block", + "src": "1640:212:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 948, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1669:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 949, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1684:4:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC721_$1641", + "typeString": "contract ERC721" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "supportsInterface", + "nodeType": "MemberAccess", + "referencedDeclaration": 969, + "src": "1684:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (bytes4) view external returns (bool)" + } + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "1684:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1669:46:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 953, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1741:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 955, + "name": "IERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 157, + "src": "1761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721_$157_$", + "typeString": "type(contract IERC721)" + } + ], + "id": 954, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1756:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1756:13:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721_$157", + "typeString": "type(contract IERC721)" + } + }, + "id": 957, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1756:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1741:40:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:112:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 960, + "name": "interfaceId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "1797:11:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "arguments": [ + { + "id": 962, + "name": "IERC721Metadata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 180, + "src": "1817:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_contract$_IERC721Metadata_$180_$", + "typeString": "type(contract IERC721Metadata)" + } + ], + "id": 961, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "1812:4:19", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 963, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1812:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_contract$_IERC721Metadata_$180", + "typeString": "type(contract IERC721Metadata)" + } + }, + "id": 964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "interfaceId", + "nodeType": "MemberAccess", + "src": "1812:33:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "1797:48:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1669:176:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 947, + "id": 967, + "nodeType": "Return", + "src": "1650:195:19" + } + ] + }, + "functionSelector": "01ffc9a7", + "id": 969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "1558:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 944, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1616:8:19" + }, + "parameters": { + "id": 943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 942, + "mutability": "mutable", + "name": "interfaceId", + "nameLocation": "1583:11:19", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1576:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 941, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1576:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "1575:20:19" + }, + "returnParameters": { + "id": 947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 946, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 969, + "src": "1634:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 945, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1634:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1633:6:19" + }, + "scope": 1641, + "src": "1549:303:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 90 + ], + "body": { + "id": 996, + "nodeType": "Block", + "src": "1937:150:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 977, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "1951:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1969:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1961:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 978, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1961:7:19", + "typeDescriptions": {} + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1961:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1951:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 989, + "nodeType": "IfStatement", + "src": "1947:84:19", + "trueBody": { + "id": 988, + "nodeType": "Block", + "src": "1973:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 983, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "1994:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 985, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "1994:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1994:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 987, + "nodeType": "RevertStatement", + "src": "1987:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 990, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2048:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2048:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 992, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "2048:24:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 994, + "indexExpression": { + "id": 993, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 971, + "src": "2073:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2048:32:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 976, + "id": 995, + "nodeType": "Return", + "src": "2041:39:19" + } + ] + }, + "functionSelector": "70a08231", + "id": 997, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "1867:9:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 973, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1913:8:19" + }, + "parameters": { + "id": 972, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 971, + "mutability": "mutable", + "name": "holder", + "nameLocation": "1885:6:19", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1877:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1877:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1876:16:19" + }, + "returnParameters": { + "id": 976, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 975, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 997, + "src": "1931:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 974, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1931:4:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1930:6:19" + }, + "scope": 1641, + "src": "1858:229:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 97 + ], + "body": { + "id": 1021, + "nodeType": "Block", + "src": "2174:146:19", + "statements": [ + { + "condition": { + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2188:17:19", + "subExpression": { + "arguments": [ + { + "id": 1006, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2197:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1005, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2189:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2189:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1014, + "nodeType": "IfStatement", + "src": "2184:81:19", + "trueBody": { + "id": 1013, + "nodeType": "Block", + "src": "2207:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1010, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2246:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1009, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2228:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2228:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1012, + "nodeType": "RevertStatement", + "src": "2221:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1015, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2282:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2282:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "2282:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1019, + "indexExpression": { + "id": 1018, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 999, + "src": "2305:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2282:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1004, + "id": 1020, + "nodeType": "Return", + "src": "2275:38:19" + } + ] + }, + "functionSelector": "6352211e", + "id": 1022, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "2102:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1001, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2147:8:19" + }, + "parameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 999, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2118:7:19", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2110:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2110:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2109:17:19" + }, + "returnParameters": { + "id": 1004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1003, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1022, + "src": "2165:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1002, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2165:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2164:9:19" + }, + "scope": 1641, + "src": "2093:227:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 167 + ], + "body": { + "id": 1032, + "nodeType": "Block", + "src": "2397:43:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1028, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2414:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2414:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "name", + "nodeType": "MemberAccess", + "referencedDeclaration": 1645, + "src": "2414:19:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1027, + "id": 1031, + "nodeType": "Return", + "src": "2407:26:19" + } + ] + }, + "functionSelector": "06fdde03", + "id": 1033, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "2335:4:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1024, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2364:8:19" + }, + "parameters": { + "id": 1023, + "nodeType": "ParameterList", + "parameters": [], + "src": "2339:2:19" + }, + "returnParameters": { + "id": 1027, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1026, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1033, + "src": "2382:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1025, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2382:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2381:15:19" + }, + "scope": 1641, + "src": "2326:114:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 172 + ], + "body": { + "id": 1043, + "nodeType": "Block", + "src": "2519:45:19", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1039, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2536:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2536:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1041, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "symbol", + "nodeType": "MemberAccess", + "referencedDeclaration": 1647, + "src": "2536:21:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 1038, + "id": 1042, + "nodeType": "Return", + "src": "2529:28:19" + } + ] + }, + "functionSelector": "95d89b41", + "id": 1044, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "2455:6:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1035, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2486:8:19" + }, + "parameters": { + "id": 1034, + "nodeType": "ParameterList", + "parameters": [], + "src": "2461:2:19" + }, + "returnParameters": { + "id": 1038, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1037, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1044, + "src": "2504:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1036, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2504:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2503:15:19" + }, + "scope": 1641, + "src": "2446:118:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 179 + ], + "body": { + "id": 1089, + "nodeType": "Block", + "src": "2660:277:19", + "statements": [ + { + "condition": { + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2674:17:19", + "subExpression": { + "arguments": [ + { + "id": 1053, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2683:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1052, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "2675:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2675:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1061, + "nodeType": "IfStatement", + "src": "2670:81:19", + "trueBody": { + "id": 1060, + "nodeType": "Block", + "src": "2693:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1057, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2732:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1056, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "2714:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2714:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1059, + "nodeType": "RevertStatement", + "src": "2707:33:19" + } + ] + } + }, + { + "assignments": [ + 1063 + ], + "declarations": [ + { + "constant": false, + "id": 1063, + "mutability": "mutable", + "name": "baseURI", + "nameLocation": "2775:7:19", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "2761:21:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1062, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2761:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "id": 1067, + "initialValue": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1064, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "2785:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2785:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1066, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "baseTokenURI", + "nodeType": "MemberAccess", + "referencedDeclaration": 1649, + "src": "2785:27:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2761:51:19" + }, + { + "expression": { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "arguments": [ + { + "id": 1070, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2836:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2830:5:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 1068, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2830:5:19", + "typeDescriptions": {} + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2830:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 1072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2830:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "30", + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2854:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2830:25:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "hexValue": "", + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2928:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + }, + "id": 1087, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2830:100:19", + "trueExpression": { + "arguments": [ + { + "arguments": [ + { + "id": 1079, + "name": "baseURI", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1063, + "src": "2882:7:19", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "arguments": [ + { + "id": 1082, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1046, + "src": "2915:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1080, + "name": "StringUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "2891:10:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_StringUtil_$2369_$", + "typeString": "type(library StringUtil)" + } + }, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uintToString", + "nodeType": "MemberAccess", + "referencedDeclaration": 2368, + "src": "2891:23:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$", + "typeString": "function (uint256) pure returns (string memory)" + } + }, + "id": 1083, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2891:32:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "expression": { + "id": 1077, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2865:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "2865:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2865:59:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2858:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 1075, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2858:6:19", + "typeDescriptions": {} + } + }, + "id": 1085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2858:67:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 1051, + "id": 1088, + "nodeType": "Return", + "src": "2823:107:19" + } + ] + }, + "functionSelector": "c87b56dd", + "id": 1090, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "2579:8:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1048, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2627:8:19" + }, + "parameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1046, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2596:7:19", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2588:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1045, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2588:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2587:17:19" + }, + "returnParameters": { + "id": 1051, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "2645:13:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1049, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2645:6:19", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "2644:15:19" + }, + "scope": 1641, + "src": "2570:367:19", + "stateMutability": "view", + "virtual": true, + "visibility": "external" + }, + { + "baseFunctions": [ + 133 + ], + "body": { + "id": 1145, + "nodeType": "Block", + "src": "3013:366:19", + "statements": [ + { + "assignments": [ + 1100 + ], + "declarations": [ + { + "constant": false, + "id": 1100, + "mutability": "mutable", + "name": "store", + "nameLocation": "3043:5:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3023:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1099, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1098, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "3023:11:19" + }, + "referencedDeclaration": 1668, + "src": "3023:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1103, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1101, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3051:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3023:42:19" + }, + { + "assignments": [ + 1105 + ], + "declarations": [ + { + "constant": false, + "id": 1105, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3083:6:19", + "nodeType": "VariableDeclaration", + "scope": 1145, + "src": "3075:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3075:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1110, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1106, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1100, + "src": "3092:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1107, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "3092:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1109, + "indexExpression": { + "id": 1108, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3106:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3092:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3075:39:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1111, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3129:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1112, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3135:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3129:12:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1119, + "nodeType": "IfStatement", + "src": "3125:71:19", + "trueBody": { + "id": 1118, + "nodeType": "Block", + "src": "3143:53:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1115, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3182:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1114, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3164:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1116, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3164:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1117, + "nodeType": "RevertStatement", + "src": "3157:28:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1120, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3210:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3210:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1122, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3224:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3210:20:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "id": 1129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3234:37:19", + "subExpression": { + "arguments": [ + { + "id": 1125, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3252:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "expression": { + "id": 1126, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3260:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3260:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "3235:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3235:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3210:61:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1139, + "nodeType": "IfStatement", + "src": "3206:135:19", + "trueBody": { + "id": 1138, + "nodeType": "Block", + "src": "3273:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1134, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3319:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3319:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1131, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "3294:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "3294:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3294:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1137, + "nodeType": "RevertStatement", + "src": "3287:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1141, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "3360:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1142, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "3364:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1140, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "3351:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3351:21:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1144, + "nodeType": "ExpressionStatement", + "src": "3351:21:19" + } + ] + }, + "functionSelector": "095ea7b3", + "id": 1146, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "2952:7:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1096, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3004:8:19" + }, + "parameters": { + "id": 1095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "mutability": "mutable", + "name": "to", + "nameLocation": "2968:2:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2960:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2960:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1094, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "2980:7:19", + "nodeType": "VariableDeclaration", + "scope": 1146, + "src": "2972:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1093, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2972:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2959:29:19" + }, + "returnParameters": { + "id": 1097, + "nodeType": "ParameterList", + "parameters": [], + "src": "3013:0:19" + }, + "scope": 1641, + "src": "2943:436:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 147 + ], + "body": { + "id": 1170, + "nodeType": "Block", + "src": "3470:153:19", + "statements": [ + { + "condition": { + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3484:17:19", + "subExpression": { + "arguments": [ + { + "id": 1155, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3493:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1154, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "3485:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3485:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1163, + "nodeType": "IfStatement", + "src": "3480:81:19", + "trueBody": { + "id": 1162, + "nodeType": "Block", + "src": "3503:58:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1159, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3542:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1158, + "name": "TokenDoesNotExist", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "3524:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3524:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1161, + "nodeType": "RevertStatement", + "src": "3517:33:19" + } + ] + } + }, + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1164, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3578:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3578:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "3578:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1168, + "indexExpression": { + "id": 1167, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "3608:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3578:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 1153, + "id": 1169, + "nodeType": "Return", + "src": "3571:45:19" + } + ] + }, + "functionSelector": "081812fc", + "id": 1171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "3394:11:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1150, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3443:8:19" + }, + "parameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1148, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "3414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3405:17:19" + }, + "returnParameters": { + "id": 1153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1152, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1171, + "src": "3461:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1151, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3461:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3460:9:19" + }, + "scope": 1641, + "src": "3385:238:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 140 + ], + "body": { + "id": 1207, + "nodeType": "Block", + "src": "3713:241:19", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 1179, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3727:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3727:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1181, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3741:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3727:22:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1188, + "nodeType": "IfStatement", + "src": "3723:87:19", + "trueBody": { + "id": 1187, + "nodeType": "Block", + "src": "3751:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1184, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3790:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1183, + "name": "CannotSelfApprove", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "3772:17:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3772:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1186, + "nodeType": "RevertStatement", + "src": "3765:34:19" + } + ] + } + }, + { + "expression": { + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1189, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "3820:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3820:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1191, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "3820:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1194, + "indexExpression": { + "expression": { + "id": 1192, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3853:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3853:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3820:44:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1196, + "indexExpression": { + "id": 1195, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3865:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3820:54:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1197, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3877:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "3820:65:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1199, + "nodeType": "ExpressionStatement", + "src": "3820:65:19" + }, + { + "eventCall": { + "arguments": [ + { + "expression": { + "id": 1201, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3916:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3916:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1203, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1173, + "src": "3928:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1204, + "name": "approved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "3938:8:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1200, + "name": "ApprovalForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 857, + "src": "3901:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,address,bool)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3901:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1206, + "nodeType": "EmitStatement", + "src": "3896:51:19" + } + ] + }, + "functionSelector": "a22cb465", + "id": 1208, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "3638:17:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3704:8:19" + }, + "parameters": { + "id": 1176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1173, + "mutability": "mutable", + "name": "operator", + "nameLocation": "3664:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3656:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3656:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1175, + "mutability": "mutable", + "name": "approved", + "nameLocation": "3679:8:19", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "3674:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1174, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3674:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "3655:33:19" + }, + "returnParameters": { + "id": 1178, + "nodeType": "ParameterList", + "parameters": [], + "src": "3713:0:19" + }, + "scope": 1641, + "src": "3629:325:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 156 + ], + "body": { + "id": 1226, + "nodeType": "Block", + "src": "4064:74:19", + "statements": [ + { + "expression": { + "baseExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1218, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "4081:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4081:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "operatorApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1667, + "src": "4081:32:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + } + }, + "id": 1222, + "indexExpression": { + "id": 1221, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1210, + "src": "4114:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:40:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1224, + "indexExpression": { + "id": 1223, + "name": "operator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1212, + "src": "4122:8:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4081:50:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1217, + "id": 1225, + "nodeType": "Return", + "src": "4074:57:19" + } + ] + }, + "functionSelector": "e985e9c5", + "id": 1227, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "3969:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1214, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4040:8:19" + }, + "parameters": { + "id": 1213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "mutability": "mutable", + "name": "holder", + "nameLocation": "3994:6:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "3986:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1209, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3986:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1212, + "mutability": "mutable", + "name": "operator", + "nameLocation": "4010:8:19", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4002:16:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4002:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3985:34:19" + }, + "returnParameters": { + "id": 1217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1216, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1227, + "src": "4058:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1215, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4058:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "4057:6:19" + }, + "scope": 1641, + "src": "3960:178:19", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 126 + ], + "body": { + "id": 1258, + "nodeType": "Block", + "src": "4263:169:19", + "statements": [ + { + "condition": { + "id": 1242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4277:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1238, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4297:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4297:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1240, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4309:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1237, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4278:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4278:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1251, + "nodeType": "IfStatement", + "src": "4273:114:19", + "trueBody": { + "id": 1250, + "nodeType": "Block", + "src": "4319:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1246, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4365:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4365:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1243, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4340:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4340:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4340:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1249, + "nodeType": "RevertStatement", + "src": "4333:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1253, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1229, + "src": "4407:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1254, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1231, + "src": "4413:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1255, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1233, + "src": "4417:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1252, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4397:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4397:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1257, + "nodeType": "ExpressionStatement", + "src": "4397:28:19" + } + ] + }, + "functionSelector": "23b872dd", + "id": 1259, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "4153:12:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1235, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4254:8:19" + }, + "parameters": { + "id": 1234, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1229, + "mutability": "mutable", + "name": "from", + "nameLocation": "4183:4:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4175:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4175:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1231, + "mutability": "mutable", + "name": "to", + "nameLocation": "4205:2:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4197:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1230, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4197:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1233, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4225:7:19", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "4217:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1232, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4217:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4165:73:19" + }, + "returnParameters": { + "id": 1236, + "nodeType": "ParameterList", + "parameters": [], + "src": "4263:0:19" + }, + "scope": 1641, + "src": "4144:288:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 117 + ], + "body": { + "id": 1276, + "nodeType": "Block", + "src": "4561:56:19", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 1270, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "4588:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1271, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "4594:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1272, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "4598:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "hexValue": "", + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4607:2:19", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "id": 1269, + "name": "safeTransferFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1277, + 1324 + ], + "referencedDeclaration": 1324, + "src": "4571:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,address,uint256,bytes memory)" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4571:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1275, + "nodeType": "ExpressionStatement", + "src": "4571:39:19" + } + ] + }, + "functionSelector": "42842e0e", + "id": 1277, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4447:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1267, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4552:8:19" + }, + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1261, + "mutability": "mutable", + "name": "from", + "nameLocation": "4481:4:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4473:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1260, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4473:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1263, + "mutability": "mutable", + "name": "to", + "nameLocation": "4503:2:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4495:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1262, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4495:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4523:7:19", + "nodeType": "VariableDeclaration", + "scope": 1277, + "src": "4515:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4515:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4463:73:19" + }, + "returnParameters": { + "id": 1268, + "nodeType": "ParameterList", + "parameters": [], + "src": "4561:0:19" + }, + "scope": 1641, + "src": "4438:179:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 108 + ], + "body": { + "id": 1323, + "nodeType": "Block", + "src": "4773:292:19", + "statements": [ + { + "condition": { + "id": 1294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4787:40:19", + "subExpression": { + "arguments": [ + { + "expression": { + "id": 1290, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4807:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4807:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1292, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4819:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1289, + "name": "_isApprovedOrOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1375, + "src": "4788:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) view returns (bool)" + } + }, + "id": 1293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4788:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1303, + "nodeType": "IfStatement", + "src": "4783:114:19", + "trueBody": { + "id": 1302, + "nodeType": "Block", + "src": "4829:68:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "expression": { + "id": 1298, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4875:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "4875:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1295, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "4850:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "4850:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4850:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1301, + "nodeType": "RevertStatement", + "src": "4843:43:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 1305, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4917:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1306, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4923:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1307, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1304, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1566, + "src": "4907:9:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4907:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1309, + "nodeType": "ExpressionStatement", + "src": "4907:28:19" + }, + { + "condition": { + "id": 1316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4949:48:19", + "subExpression": { + "arguments": [ + { + "id": 1311, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1279, + "src": "4973:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1312, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "4979:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1313, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1283, + "src": "4983:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1314, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1285, + "src": "4992:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1310, + "name": "_checkOnERC721Received", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1640, + "src": "4950:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bool_$", + "typeString": "function (address,address,uint256,bytes memory) returns (bool)" + } + }, + "id": 1315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4950:47:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1322, + "nodeType": "IfStatement", + "src": "4945:114:19", + "trueBody": { + "id": 1321, + "nodeType": "Block", + "src": "4999:60:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1318, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1281, + "src": "5045:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1317, + "name": "InvalidTransferRecipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 865, + "src": "5020:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5020:28:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1320, + "nodeType": "RevertStatement", + "src": "5013:35:19" + } + ] + } + } + ] + }, + "functionSelector": "b88d4fde", + "id": 1324, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "4632:16:19", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 1287, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4764:8:19" + }, + "parameters": { + "id": 1286, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1279, + "mutability": "mutable", + "name": "from", + "nameLocation": "4666:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4658:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1278, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4658:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1281, + "mutability": "mutable", + "name": "to", + "nameLocation": "4688:2:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4680:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1280, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4680:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1283, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "4708:7:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4700:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4700:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1285, + "mutability": "mutable", + "name": "data", + "nameLocation": "4738:4:19", + "nodeType": "VariableDeclaration", + "scope": 1324, + "src": "4725:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1284, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4725:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "4648:100:19" + }, + "returnParameters": { + "id": 1288, + "nodeType": "ParameterList", + "parameters": [], + "src": "4773:0:19" + }, + "scope": 1641, + "src": "4623:442:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 1342, + "nodeType": "Block", + "src": "5142:69:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1331, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5159:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5159:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1333, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5159:22:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1335, + "indexExpression": { + "id": 1334, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "5182:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5159:31:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5202:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5194:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5194:7:19", + "typeDescriptions": {} + } + }, + "id": 1339, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5194:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5159:45:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1330, + "id": 1341, + "nodeType": "Return", + "src": "5152:52:19" + } + ] + }, + "id": 1343, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_exists", + "nameLocation": "5080:7:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1326, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5096:7:19", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5088:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5088:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5087:17:19" + }, + "returnParameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1343, + "src": "5136:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1328, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5135:6:19" + }, + "scope": 1641, + "src": "5071:140:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1374, + "nodeType": "Block", + "src": "5316:253:19", + "statements": [ + { + "assignments": [ + 1353 + ], + "declarations": [ + { + "constant": false, + "id": 1353, + "mutability": "mutable", + "name": "holder", + "nameLocation": "5334:6:19", + "nodeType": "VariableDeclaration", + "scope": 1374, + "src": "5326:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1352, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5326:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1357, + "initialValue": { + "arguments": [ + { + "id": 1355, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5351:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1354, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "5343:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5343:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5326:33:19" + }, + { + "expression": { + "components": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1358, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5472:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1359, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5483:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5472:17:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1362, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1347, + "src": "5505:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1361, + "name": "getApproved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1171, + "src": "5493:11:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5493:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 1364, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5517:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5493:31:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:52:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "arguments": [ + { + "id": 1368, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1353, + "src": "5545:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1369, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1345, + "src": "5553:7:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1367, + "name": "isApprovedForAll", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1227, + "src": "5528:16:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_bool_$", + "typeString": "function (address,address) view returns (bool)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5528:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5472:89:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5471:91:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1351, + "id": 1373, + "nodeType": "Return", + "src": "5464:98:19" + } + ] + }, + "id": 1375, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isApprovedOrOwner", + "nameLocation": "5226:18:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1345, + "mutability": "mutable", + "name": "spender", + "nameLocation": "5253:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5245:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1344, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5245:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1347, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5270:7:19", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5262:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1346, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5244:34:19" + }, + "returnParameters": { + "id": 1351, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1350, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1375, + "src": "5310:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1349, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5310:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "5309:6:19" + }, + "scope": 1641, + "src": "5217:352:19", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1435, + "nodeType": "Block", + "src": "5636:360:19", + "statements": [ + { + "assignments": [ + 1384 + ], + "declarations": [ + { + "constant": false, + "id": 1384, + "mutability": "mutable", + "name": "store", + "nameLocation": "5666:5:19", + "nodeType": "VariableDeclaration", + "scope": 1435, + "src": "5646:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1383, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1382, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "5646:11:19" + }, + "referencedDeclaration": 1668, + "src": "5646:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1385, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "5674:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5674:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5646:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1388, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5702:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5716:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1390, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5708:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5708:7:19", + "typeDescriptions": {} + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5708:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5702:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1400, + "nodeType": "IfStatement", + "src": "5698:80:19", + "trueBody": { + "id": 1399, + "nodeType": "Block", + "src": "5720:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1394, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "5741:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "5741:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1398, + "nodeType": "RevertStatement", + "src": "5734:33:19" + } + ] + } + }, + { + "condition": { + "arguments": [ + { + "id": 1402, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5800:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1401, + "name": "_exists", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1343, + "src": "5792:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_bool_$", + "typeString": "function (uint256) view returns (bool)" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1409, + "nodeType": "IfStatement", + "src": "5788:81:19", + "trueBody": { + "id": 1408, + "nodeType": "Block", + "src": "5810:59:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1405, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5850:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1404, + "name": "TokenAlreadyMinted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "5831:18:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_uint256_$returns$__$", + "typeString": "function (uint256) pure" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5831:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1407, + "nodeType": "RevertStatement", + "src": "5824:34:19" + } + ] + } + }, + { + "expression": { + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1410, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5879:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1413, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "5879:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1414, + "indexExpression": { + "id": 1412, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5895:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5879:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5902:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5879:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1417, + "nodeType": "ExpressionStatement", + "src": "5879:24:19" + }, + { + "expression": { + "id": 1424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1418, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1384, + "src": "5913:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1421, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "5913:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1422, + "indexExpression": { + "id": 1420, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5927:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5913:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1423, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5938:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5913:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1425, + "nodeType": "ExpressionStatement", + "src": "5913:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5973:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5965:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5965:7:19", + "typeDescriptions": {} + } + }, + "id": 1430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5965:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1431, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "5977:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1432, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1379, + "src": "5981:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1426, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "5956:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5956:33:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1434, + "nodeType": "EmitStatement", + "src": "5951:38:19" + } + ] + }, + "id": 1436, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nameLocation": "5584:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1380, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1377, + "mutability": "mutable", + "name": "to", + "nameLocation": "5598:2:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5590:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1376, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5590:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1379, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "5610:7:19", + "nodeType": "VariableDeclaration", + "scope": 1436, + "src": "5602:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1378, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5602:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5589:29:19" + }, + "returnParameters": { + "id": 1381, + "nodeType": "ParameterList", + "parameters": [], + "src": "5636:0:19" + }, + "scope": 1641, + "src": "5575:421:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1485, + "nodeType": "Block", + "src": "6051:279:19", + "statements": [ + { + "assignments": [ + 1443 + ], + "declarations": [ + { + "constant": false, + "id": 1443, + "mutability": "mutable", + "name": "store", + "nameLocation": "6081:5:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6061:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1442, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1441, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6061:11:19" + }, + "referencedDeclaration": 1668, + "src": "6061:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1446, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1444, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6089:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6089:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6061:42:19" + }, + { + "assignments": [ + 1448 + ], + "declarations": [ + { + "constant": false, + "id": 1448, + "mutability": "mutable", + "name": "holder", + "nameLocation": "6121:6:19", + "nodeType": "VariableDeclaration", + "scope": 1485, + "src": "6113:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1447, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6113:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 1453, + "initialValue": { + "baseExpression": { + "expression": { + "id": 1449, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6130:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1450, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6130:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1452, + "indexExpression": { + "id": 1451, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6144:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6130:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6113:39:19" + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1457, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6180:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6172:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1455, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6172:7:19", + "typeDescriptions": {} + } + }, + "id": 1458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6172:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1459, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6184:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1454, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6163:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6163:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1461, + "nodeType": "ExpressionStatement", + "src": "6163:29:19" + }, + { + "expression": { + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1462, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6203:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1465, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6203:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1466, + "indexExpression": { + "id": 1464, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6219:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6203:23:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1467, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6230:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6203:28:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1469, + "nodeType": "ExpressionStatement", + "src": "6203:28:19" + }, + { + "expression": { + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "6241:29:19", + "subExpression": { + "baseExpression": { + "expression": { + "id": 1470, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1443, + "src": "6248:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6248:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1473, + "indexExpression": { + "id": 1472, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6262:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6248:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1475, + "nodeType": "ExpressionStatement", + "src": "6241:29:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1477, + "name": "holder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1448, + "src": "6295:6:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "arguments": [ + { + "hexValue": "30", + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6311:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1479, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6303:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1478, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6303:7:19", + "typeDescriptions": {} + } + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6303:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1482, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1438, + "src": "6315:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1476, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6286:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6286:37:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1484, + "nodeType": "EmitStatement", + "src": "6281:42:19" + } + ] + }, + "id": 1486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nameLocation": "6011:5:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1438, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6025:7:19", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "6017:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1437, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6017:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6016:17:19" + }, + "returnParameters": { + "id": 1440, + "nodeType": "ParameterList", + "parameters": [], + "src": "6051:0:19" + }, + "scope": 1641, + "src": "6002:328:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1565, + "nodeType": "Block", + "src": "6445:494:19", + "statements": [ + { + "assignments": [ + 1497 + ], + "declarations": [ + { + "constant": false, + "id": 1497, + "mutability": "mutable", + "name": "store", + "nameLocation": "6475:5:19", + "nodeType": "VariableDeclaration", + "scope": 1565, + "src": "6455:25:19", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1496, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1495, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "6455:11:19" + }, + "referencedDeclaration": 1668, + "src": "6455:11:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "id": 1500, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1498, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "6483:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6483:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6455:42:19" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 1502, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6520:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1501, + "name": "ownerOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "6512:7:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:16:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "id": 1504, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6532:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6512:24:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1513, + "nodeType": "IfStatement", + "src": "6508:92:19", + "trueBody": { + "id": 1512, + "nodeType": "Block", + "src": "6538:62:19", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 1509, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6584:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1506, + "name": "AccessError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "6559:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AccessError_$6_$", + "typeString": "type(library AccessError)" + } + }, + "id": 1508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Unauthorized", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "6559:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$", + "typeString": "function (address) pure" + } + }, + "id": 1510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6559:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1511, + "nodeType": "RevertStatement", + "src": "6552:37:19" + } + ] + } + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1514, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6614:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 1517, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6628:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6620:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6620:7:19", + "typeDescriptions": {} + } + }, + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6620:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6614:16:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1526, + "nodeType": "IfStatement", + "src": "6610:80:19", + "trueBody": { + "id": 1525, + "nodeType": "Block", + "src": "6632:58:19", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 1520, + "name": "AddressError", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "6653:12:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressError_$15_$", + "typeString": "type(library AddressError)" + } + }, + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ZeroAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "6653:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6653:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1524, + "nodeType": "RevertStatement", + "src": "6646:33:19" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6769:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1529, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6761:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1528, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6761:7:19", + "typeDescriptions": {} + } + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6761:10:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1532, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6773:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1527, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "6752:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6752:29:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1534, + "nodeType": "ExpressionStatement", + "src": "6752:29:19" + }, + { + "expression": { + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1535, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6792:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1538, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6792:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1539, + "indexExpression": { + "id": 1537, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6808:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6792:21:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6817:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6792:26:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1542, + "nodeType": "ExpressionStatement", + "src": "6792:26:19" + }, + { + "expression": { + "id": 1549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1543, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6828:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1546, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1657, + "src": "6828:15:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 1547, + "indexExpression": { + "id": 1545, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6844:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6828:19:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "hexValue": "31", + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6851:1:19", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6828:24:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1550, + "nodeType": "ExpressionStatement", + "src": "6828:24:19" + }, + { + "expression": { + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "id": 1551, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "6862:5:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1653, + "src": "6862:13:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1555, + "indexExpression": { + "id": 1553, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6876:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6862:22:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1556, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6887:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6862:27:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1558, + "nodeType": "ExpressionStatement", + "src": "6862:27:19" + }, + { + "eventCall": { + "arguments": [ + { + "id": 1560, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1488, + "src": "6914:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1561, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1490, + "src": "6920:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1562, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1492, + "src": "6924:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1559, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 841, + "src": "6905:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6905:27:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1564, + "nodeType": "EmitStatement", + "src": "6900:32:19" + } + ] + }, + "id": 1566, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nameLocation": "6345:9:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1488, + "mutability": "mutable", + "name": "from", + "nameLocation": "6372:4:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6364:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6364:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1490, + "mutability": "mutable", + "name": "to", + "nameLocation": "6394:2:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6386:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6386:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1492, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6414:7:19", + "nodeType": "VariableDeclaration", + "scope": 1566, + "src": "6406:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6354:73:19" + }, + "returnParameters": { + "id": 1494, + "nodeType": "ParameterList", + "parameters": [], + "src": "6445:0:19" + }, + "scope": 1641, + "src": "6336:603:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1590, + "nodeType": "Block", + "src": "7009:121:19", + "statements": [ + { + "expression": { + "id": 1579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1573, + "name": "_erc721Store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1676, + "src": "7019:12:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_ERC721Store_$1668_storage_ptr_$", + "typeString": "function () pure returns (struct ERC721Storage.ERC721Store storage pointer)" + } + }, + "id": 1574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7019:14:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store storage pointer" + } + }, + "id": 1575, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokenApprovals", + "nodeType": "MemberAccess", + "referencedDeclaration": 1661, + "src": "7019:29:19", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 1577, + "indexExpression": { + "id": 1576, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7049:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7019:38:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 1578, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7060:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "7019:43:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1580, + "nodeType": "ExpressionStatement", + "src": "7019:43:19" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "id": 1584, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7101:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 1582, + "name": "ERC721", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1641, + "src": "7086:6:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC721_$1641_$", + "typeString": "type(contract ERC721)" + } + }, + "id": 1583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "ownerOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1022, + "src": "7086:14:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_address_$", + "typeString": "function (uint256) view returns (address)" + } + }, + "id": 1585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7086:23:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1586, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1568, + "src": "7111:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1587, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "7115:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1581, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "7077:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 1588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7077:46:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1589, + "nodeType": "EmitStatement", + "src": "7072:51:19" + } + ] + }, + "id": 1591, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nameLocation": "6954:8:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1568, + "mutability": "mutable", + "name": "to", + "nameLocation": "6971:2:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6963:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1567, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6963:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1570, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "6983:7:19", + "nodeType": "VariableDeclaration", + "scope": 1591, + "src": "6975:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6975:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "6962:29:19" + }, + "returnParameters": { + "id": 1572, + "nodeType": "ParameterList", + "parameters": [], + "src": "7009:0:19" + }, + "scope": 1641, + "src": "6945:185:19", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 1639, + "nodeType": "Block", + "src": "7291:355:19", + "statements": [ + { + "condition": { + "arguments": [ + { + "id": 1606, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7328:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 1604, + "name": "AddressUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1696, + "src": "7305:11:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AddressUtil_$1696_$", + "typeString": "type(library AddressUtil)" + } + }, + "id": 1605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 1695, + "src": "7305:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 1607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7305:26:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 1637, + "nodeType": "Block", + "src": "7604:36:19", + "statements": [ + { + "expression": { + "hexValue": "74727565", + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7625:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 1603, + "id": 1636, + "nodeType": "Return", + "src": "7618:11:19" + } + ] + }, + "id": 1638, + "nodeType": "IfStatement", + "src": "7301:339:19", + "trueBody": { + "id": 1634, + "nodeType": "Block", + "src": "7333:265:19", + "statements": [ + { + "clauses": [ + { + "block": { + "id": 1627, + "nodeType": "Block", + "src": "7445:91:19", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "id": 1625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 1621, + "name": "retval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1619, + "src": "7470:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "expression": { + "expression": { + "id": 1622, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7480:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7480:32:19", + "typeDescriptions": { + "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function IERC721Receiver.onERC721Received(address,address,uint256,bytes memory) returns (bytes4)" + } + }, + "id": 1624, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "src": "7480:41:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "src": "7470:51:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1603, + "id": 1626, + "nodeType": "Return", + "src": "7463:58:19" + } + ] + }, + "errorName": "", + "id": 1628, + "nodeType": "TryCatchClause", + "parameters": { + "id": 1620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1619, + "mutability": "mutable", + "name": "retval", + "nameLocation": "7437:6:19", + "nodeType": "VariableDeclaration", + "scope": 1628, + "src": "7430:13:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 1618, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "7430:6:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "7429:15:19" + }, + "src": "7421:115:19" + }, + { + "block": { + "id": 1631, + "nodeType": "Block", + "src": "7543:45:19", + "statements": [ + { + "expression": { + "hexValue": "66616c7365", + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7568:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "functionReturnParameters": 1603, + "id": 1630, + "nodeType": "Return", + "src": "7561:12:19" + } + ] + }, + "errorName": "", + "id": 1632, + "nodeType": "TryCatchClause", + "src": "7537:51:19" + } + ], + "externalCall": { + "arguments": [ + { + "expression": { + "id": 1612, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7388:3:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "7388:10:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1614, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "7400:4:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 1615, + "name": "tokenId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1597, + "src": "7406:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 1616, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1599, + "src": "7415:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "arguments": [ + { + "id": 1609, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "7367:2:19", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1608, + "name": "IERC721Receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 196, + "src": "7351:15:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$196_$", + "typeString": "type(contract IERC721Receiver)" + } + }, + "id": 1610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:19:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC721Receiver_$196", + "typeString": "contract IERC721Receiver" + } + }, + "id": 1611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "onERC721Received", + "nodeType": "MemberAccess", + "referencedDeclaration": 195, + "src": "7351:36:19", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$", + "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)" + } + }, + "id": 1617, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7351:69:19", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "id": 1633, + "nodeType": "TryStatement", + "src": "7347:241:19" + } + ] + } + } + ] + }, + "id": 1640, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_checkOnERC721Received", + "nameLocation": "7145:22:19", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "from", + "nameLocation": "7185:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7177:12:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1592, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7177:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "to", + "nameLocation": "7207:2:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7199:10:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1594, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7199:7:19", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1597, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "7227:7:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7219:15:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1596, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7219:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1599, + "mutability": "mutable", + "name": "data", + "nameLocation": "7257:4:19", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7244:17:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1598, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "7244:5:19", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "7167:100:19" + }, + "returnParameters": { + "id": 1603, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1602, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 1640, + "src": "7285:4:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1601, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7285:4:19", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "7284:6:19" + }, + "scope": 1641, + "src": "7136:510:19", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 1642, + "src": "547:7101:19", + "usedErrors": [ + 5, + 10, + 861, + 865, + 869, + 873 + ] + } + ], + "src": "31:7618:19" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUUPSImplementation {\n function upgradeTo(address newImplementation) external;\n\n function simulateUpgradeTo(address newImplementation) external;\n\n function getImplementation() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IUUPSImplementation.sol", + "exportedSymbols": { + "IUUPSImplementation": [ + 238 + ] + }, + "id": 239, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 222, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:11" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IUUPSImplementation", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 238, + "linearizedBaseContracts": [ + 238 + ], + "name": "IUUPSImplementation", + "nameLocation": "66:19:11", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "3659cfe6", + "id": 227, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "upgradeTo", + "nameLocation": "101:9:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 225, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 224, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "119:17:11", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "111:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 223, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "111:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "110:27:11" + }, + "returnParameters": { + "id": 226, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:11" + }, + "scope": 238, + "src": "92:55:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c7f62cda", + "id": 232, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "simulateUpgradeTo", + "nameLocation": "162:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 229, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "188:17:11", + "nodeType": "VariableDeclaration", + "scope": 232, + "src": "180:25:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "180:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "179:27:11" + }, + "returnParameters": { + "id": 231, + "nodeType": "ParameterList", + "parameters": [], + "src": "215:0:11" + }, + "scope": 238, + "src": "153:63:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "aaf10f42", + "id": 237, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getImplementation", + "nameLocation": "231:17:11", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 233, + "nodeType": "ParameterList", + "parameters": [], + "src": "248:2:11" + }, + "returnParameters": { + "id": 236, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 235, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 237, + "src": "274:7:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 234, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "274:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "273:9:11" + }, + "scope": 238, + "src": "222:61:11", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 239, + "src": "56:229:11", + "usedErrors": [] + } + ], + "src": "31:255:11" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnable {\n function acceptOwnership() external;\n\n function nominateNewOwner(address newNominatedOwner) external;\n\n function renounceNomination() external;\n\n function owner() external view returns (address);\n\n function nominatedOwner() external view returns (address);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IOwnable.sol", + "exportedSymbols": { + "IOwnable": [ + 220 + ] + }, + "id": 221, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:10" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnable", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 220, + "linearizedBaseContracts": [ + 220 + ], + "name": "IOwnable", + "nameLocation": "66:8:10", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "79ba5097", + "id": 201, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "acceptOwnership", + "nameLocation": "90:15:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 199, + "nodeType": "ParameterList", + "parameters": [], + "src": "105:2:10" + }, + "returnParameters": { + "id": 200, + "nodeType": "ParameterList", + "parameters": [], + "src": "116:0:10" + }, + "scope": 220, + "src": "81:36:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "1627540c", + "id": 206, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominateNewOwner", + "nameLocation": "132:16:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 203, + "mutability": "mutable", + "name": "newNominatedOwner", + "nameLocation": "157:17:10", + "nodeType": "VariableDeclaration", + "scope": 206, + "src": "149:25:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 202, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "148:27:10" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [], + "src": "184:0:10" + }, + "scope": 220, + "src": "123:62:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "718fe928", + "id": 209, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "renounceNomination", + "nameLocation": "200:18:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 207, + "nodeType": "ParameterList", + "parameters": [], + "src": "218:2:10" + }, + "returnParameters": { + "id": 208, + "nodeType": "ParameterList", + "parameters": [], + "src": "229:0:10" + }, + "scope": 220, + "src": "191:39:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "8da5cb5b", + "id": 214, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "owner", + "nameLocation": "245:5:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 210, + "nodeType": "ParameterList", + "parameters": [], + "src": "250:2:10" + }, + "returnParameters": { + "id": 213, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 212, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 214, + "src": "276:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 211, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "275:9:10" + }, + "scope": 220, + "src": "236:49:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "53a47bb7", + "id": 219, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "nominatedOwner", + "nameLocation": "300:14:10", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [], + "src": "314:2:10" + }, + "returnParameters": { + "id": 218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 219, + "src": "340:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 216, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "340:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "339:9:10" + }, + "scope": 220, + "src": "291:58:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 221, + "src": "56:295:10", + "usedErrors": [] + } + ], + "src": "31:321:10" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721 is IERC165 {\n function balanceOf(address owner) external view returns (uint256);\n\n function ownerOf(uint256 tokenId) external view returns (address);\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n function approve(address approved, uint256 tokenId) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721": [ + 157 + ] + }, + "id": 158, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 80, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:7" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 81, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 158, + "sourceUnit": 79, + "src": "56:23:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 82, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "102:7:7" + }, + "id": 83, + "nodeType": "InheritanceSpecifier", + "src": "102:7:7" + } + ], + "canonicalName": "IERC721", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 157, + "linearizedBaseContracts": [ + 157, + 78 + ], + "name": "IERC721", + "nameLocation": "91:7:7", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "70a08231", + "id": 90, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nameLocation": "125:9:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 86, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 85, + "mutability": "mutable", + "name": "owner", + "nameLocation": "143:5:7", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "135:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 84, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "135:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "134:15:7" + }, + "returnParameters": { + "id": 89, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 88, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 90, + "src": "173:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 87, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "173:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "172:9:7" + }, + "scope": 157, + "src": "116:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "6352211e", + "id": 97, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "ownerOf", + "nameLocation": "197:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 93, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 92, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "213:7:7", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "205:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "205:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "204:17:7" + }, + "returnParameters": { + "id": 96, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 95, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "245:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 94, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "245:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "244:9:7" + }, + "scope": 157, + "src": "188:66:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "b88d4fde", + "id": 108, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "269:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 99, + "mutability": "mutable", + "name": "from", + "nameLocation": "303:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "295:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 98, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "295:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 101, + "mutability": "mutable", + "name": "to", + "nameLocation": "325:2:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "317:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "317:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "345:7:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "337:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "337:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 105, + "mutability": "mutable", + "name": "data", + "nameLocation": "377:4:7", + "nodeType": "VariableDeclaration", + "scope": 108, + "src": "362:19:7", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 104, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "362:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "285:102:7" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "396:0:7" + }, + "scope": 157, + "src": "260:137:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "42842e0e", + "id": 117, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nameLocation": "412:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 110, + "mutability": "mutable", + "name": "from", + "nameLocation": "446:4:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "438:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 109, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "438:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 112, + "mutability": "mutable", + "name": "to", + "nameLocation": "468:2:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "460:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 111, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "460:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 114, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "488:7:7", + "nodeType": "VariableDeclaration", + "scope": 117, + "src": "480:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "480:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "428:73:7" + }, + "returnParameters": { + "id": 116, + "nodeType": "ParameterList", + "parameters": [], + "src": "510:0:7" + }, + "scope": 157, + "src": "403:108:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "23b872dd", + "id": 126, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nameLocation": "526:12:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 124, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 119, + "mutability": "mutable", + "name": "from", + "nameLocation": "556:4:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "548:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "548:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 121, + "mutability": "mutable", + "name": "to", + "nameLocation": "578:2:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "570:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 120, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "570:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 123, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "598:7:7", + "nodeType": "VariableDeclaration", + "scope": 126, + "src": "590:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "590:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "538:73:7" + }, + "returnParameters": { + "id": 125, + "nodeType": "ParameterList", + "parameters": [], + "src": "620:0:7" + }, + "scope": 157, + "src": "517:104:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "095ea7b3", + "id": 133, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nameLocation": "636:7:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 128, + "mutability": "mutable", + "name": "approved", + "nameLocation": "652:8:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "644:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 127, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "644:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 130, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "670:7:7", + "nodeType": "VariableDeclaration", + "scope": 133, + "src": "662:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "662:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "643:35:7" + }, + "returnParameters": { + "id": 132, + "nodeType": "ParameterList", + "parameters": [], + "src": "687:0:7" + }, + "scope": 157, + "src": "627:61:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "a22cb465", + "id": 140, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setApprovalForAll", + "nameLocation": "703:17:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 138, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 135, + "mutability": "mutable", + "name": "operator", + "nameLocation": "729:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "721:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 134, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "721:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 137, + "mutability": "mutable", + "name": "approved", + "nameLocation": "744:8:7", + "nodeType": "VariableDeclaration", + "scope": 140, + "src": "739:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 136, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "739:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "720:33:7" + }, + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:7" + }, + "scope": 157, + "src": "694:69:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "081812fc", + "id": 147, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getApproved", + "nameLocation": "778:11:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 143, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 142, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "798:7:7", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "790:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 141, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "789:17:7" + }, + "returnParameters": { + "id": 146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 145, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 147, + "src": "830:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 144, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "830:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "829:9:7" + }, + "scope": 157, + "src": "769:70:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "e985e9c5", + "id": 156, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isApprovedForAll", + "nameLocation": "854:16:7", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 149, + "mutability": "mutable", + "name": "owner", + "nameLocation": "879:5:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "871:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 148, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "871:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 151, + "mutability": "mutable", + "name": "operator", + "nameLocation": "894:8:7", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "886:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "886:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "870:33:7" + }, + "returnParameters": { + "id": 155, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 154, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 156, + "src": "927:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 153, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "927:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "926:6:7" + }, + "scope": 157, + "src": "845:88:7", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 158, + "src": "81:854:7", + "usedErrors": [] + } + ], + "src": "31:905:7" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\ninterface IERC721Metadata is IERC165 {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Metadata.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ], + "IERC721Metadata": [ + 180 + ] + }, + "id": 181, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 159, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:8" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "file": "./IERC165.sol", + "id": 160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 181, + "sourceUnit": 79, + "src": "56:23:8", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 161, + "name": "IERC165", + "nodeType": "IdentifierPath", + "referencedDeclaration": 78, + "src": "110:7:8" + }, + "id": 162, + "nodeType": "InheritanceSpecifier", + "src": "110:7:8" + } + ], + "canonicalName": "IERC721Metadata", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 180, + "linearizedBaseContracts": [ + 180, + 78 + ], + "name": "IERC721Metadata", + "nameLocation": "91:15:8", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "06fdde03", + "id": 167, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "name", + "nameLocation": "133:4:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "137:2:8" + }, + "returnParameters": { + "id": 166, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 165, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "163:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 164, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "163:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "162:15:8" + }, + "scope": 180, + "src": "124:54:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "95d89b41", + "id": 172, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nameLocation": "193:6:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "199:2:8" + }, + "returnParameters": { + "id": 171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 170, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 172, + "src": "225:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 169, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "225:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "224:15:8" + }, + "scope": 180, + "src": "184:56:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "c87b56dd", + "id": 179, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "tokenURI", + "nameLocation": "255:8:8", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 174, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "272:7:8", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "264:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 173, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "264:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "263:17:8" + }, + "returnParameters": { + "id": 178, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 177, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 179, + "src": "304:13:8", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 176, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "304:6:8", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "303:15:8" + }, + "scope": 180, + "src": "246:73:8", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 181, + "src": "81:240:8", + "usedErrors": [] + } + ], + "src": "31:291:8" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC721Receiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes memory data\n ) external returns (bytes4);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC721Receiver.sol", + "exportedSymbols": { + "IERC721Receiver": [ + 196 + ] + }, + "id": 197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 182, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:9" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC721Receiver", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 196, + "linearizedBaseContracts": [ + 196 + ], + "name": "IERC721Receiver", + "nameLocation": "66:15:9", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "150b7a02", + "id": 195, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "onERC721Received", + "nameLocation": "97:16:9", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 191, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 184, + "mutability": "mutable", + "name": "operator", + "nameLocation": "131:8:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "123:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "123:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 186, + "mutability": "mutable", + "name": "from", + "nameLocation": "157:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "149:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 185, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "149:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 188, + "mutability": "mutable", + "name": "tokenId", + "nameLocation": "179:7:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "171:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "171:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 190, + "mutability": "mutable", + "name": "data", + "nameLocation": "209:4:9", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "196:17:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 189, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "196:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "src": "113:106:9" + }, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 195, + "src": "238:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 192, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "238:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "237:8:9" + }, + "scope": 196, + "src": "88:158:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 197, + "src": "56:192:9", + "usedErrors": [] + } + ], + "src": "31:218:9" + } + }, + "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract ERC721Storage {\n struct ERC721Store {\n string name;\n string symbol;\n string baseTokenURI;\n mapping(uint256 => address) ownerOf;\n mapping(address => uint256) balanceOf;\n mapping(uint256 => address) tokenApprovals;\n mapping(address => mapping(address => bool)) operatorApprovals;\n }\n\n function _erc721Store() internal pure returns (ERC721Store storage store) {\n assembly {\n // bytes32(uint(keccak256(\"io.synthetix.ERC721\")) - 1)\n store.slot := 0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/token/ERC721Storage.sol", + "exportedSymbols": { + "ERC721Storage": [ + 1677 + ] + }, + "id": 1678, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1643, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:20" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "ERC721Storage", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 1677, + "linearizedBaseContracts": [ + 1677 + ], + "name": "ERC721Storage", + "nameLocation": "65:13:20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "ERC721Storage.ERC721Store", + "id": 1668, + "members": [ + { + "constant": false, + "id": 1645, + "mutability": "mutable", + "name": "name", + "nameLocation": "121:4:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "114:11:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1644, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "114:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1647, + "mutability": "mutable", + "name": "symbol", + "nameLocation": "142:6:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "135:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1646, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "135:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1649, + "mutability": "mutable", + "name": "baseTokenURI", + "nameLocation": "165:12:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "158:19:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1648, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "158:6:20", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1653, + "mutability": "mutable", + "name": "ownerOf", + "nameLocation": "215:7:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "187:35:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1652, + "keyType": { + "id": 1650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "195:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "187:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1651, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "206:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1657, + "mutability": "mutable", + "name": "balanceOf", + "nameLocation": "260:9:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "232:37:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 1656, + "keyType": { + "id": 1654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "240:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "232:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "251:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1661, + "mutability": "mutable", + "name": "tokenApprovals", + "nameLocation": "307:14:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "279:42:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 1660, + "keyType": { + "id": 1658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "279:27:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 1659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "298:7:20", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 1667, + "mutability": "mutable", + "name": "operatorApprovals", + "nameLocation": "376:17:20", + "nodeType": "VariableDeclaration", + "scope": 1668, + "src": "331:62:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "typeName": { + "id": 1666, + "keyType": { + "id": 1662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "339:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "331:44:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_bool_$_$", + "typeString": "mapping(address => mapping(address => bool))" + }, + "valueType": { + "id": 1665, + "keyType": { + "id": 1663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "358:7:20", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "350:24:20", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 1664, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "369:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + } + }, + "visibility": "internal" + } + ], + "name": "ERC721Store", + "nameLocation": "92:11:20", + "nodeType": "StructDefinition", + "scope": 1677, + "src": "85:315:20", + "visibility": "public" + }, + { + "body": { + "id": 1675, + "nodeType": "Block", + "src": "480:196:20", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "499:171:20", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "580:80:20", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "594:66:20", + "type": "", + "value": "0xcff586616dbfd8fcbd4d6ec876c80f6e96179ad989cea8424b590d1e270e5bcf" + }, + "variableNames": [ + { + "name": "store.slot", + "nodeType": "YulIdentifier", + "src": "580:10:20" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1672, + "isOffset": false, + "isSlot": true, + "src": "580:10:20", + "suffix": "slot", + "valueSize": 1 + } + ], + "id": 1674, + "nodeType": "InlineAssembly", + "src": "490:180:20" + } + ] + }, + "id": 1676, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_erc721Store", + "nameLocation": "415:12:20", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1669, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:20" + }, + "returnParameters": { + "id": 1673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1672, + "mutability": "mutable", + "name": "store", + "nameLocation": "473:5:20", + "nodeType": "VariableDeclaration", + "scope": 1676, + "src": "453:25:20", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + }, + "typeName": { + "id": 1671, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 1670, + "name": "ERC721Store", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1668, + "src": "453:11:20" + }, + "referencedDeclaration": 1668, + "src": "453:11:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ERC721Store_$1668_storage_ptr", + "typeString": "struct ERC721Storage.ERC721Store" + } + }, + "visibility": "internal" + } + ], + "src": "452:27:20" + }, + "scope": 1677, + "src": "406:270:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1678, + "src": "56:622:20", + "usedErrors": [] + } + ], + "src": "31:648:20" + } + }, + "@synthetixio/core-contracts/contracts/utils/StringUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * OpenZeppelin - https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol\n*/\n\nlibrary StringUtil {\n function uintToString(uint value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0\";\n }\n\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n\n return string(buffer);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/StringUtil.sol", + "exportedSymbols": { + "StringUtil": [ + 2369 + ] + }, + "id": 2370, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2290, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:25" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "StringUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 2369, + "linearizedBaseContracts": [ + 2369 + ], + "name": "StringUtil", + "nameLocation": "218:10:25", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 2367, + "nodeType": "Block", + "src": "307:447:25", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2297, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "321:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "hexValue": "30", + "id": 2298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "330:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "321:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2303, + "nodeType": "IfStatement", + "src": "317:51:25", + "trueBody": { + "id": 2302, + "nodeType": "Block", + "src": "333:35:25", + "statements": [ + { + "expression": { + "hexValue": "30", + "id": 2300, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:3:25", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "functionReturnParameters": 2296, + "id": 2301, + "nodeType": "Return", + "src": "347:10:25" + } + ] + } + }, + { + "assignments": [ + 2305 + ], + "declarations": [ + { + "constant": false, + "id": 2305, + "mutability": "mutable", + "name": "temp", + "nameLocation": "386:4:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "378:12:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "378:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2307, + "initialValue": { + "id": 2306, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "393:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "378:20:25" + }, + { + "assignments": [ + 2309 + ], + "declarations": [ + { + "constant": false, + "id": 2309, + "mutability": "mutable", + "name": "digits", + "nameLocation": "416:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "408:14:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2308, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "408:7:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 2310, + "nodeType": "VariableDeclarationStatement", + "src": "408:14:25" + }, + { + "body": { + "id": 2321, + "nodeType": "Block", + "src": "450:57:25", + "statements": [ + { + "expression": { + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "464:8:25", + "subExpression": { + "id": 2314, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "464:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2316, + "nodeType": "ExpressionStatement", + "src": "464:8:25" + }, + { + "expression": { + "id": 2319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2317, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "486:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "494:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "486:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2320, + "nodeType": "ExpressionStatement", + "src": "486:10:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2311, + "name": "temp", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "439:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "447:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "439:9:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2322, + "nodeType": "WhileStatement", + "src": "432:75:25" + }, + { + "assignments": [ + 2324 + ], + "declarations": [ + { + "constant": false, + "id": 2324, + "mutability": "mutable", + "name": "buffer", + "nameLocation": "530:6:25", + "nodeType": "VariableDeclaration", + "scope": 2367, + "src": "517:19:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 2323, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "517:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "visibility": "internal" + } + ], + "id": 2329, + "initialValue": { + "arguments": [ + { + "id": 2327, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "549:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "539:9:25", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 2325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "543:5:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 2328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "539:17:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "517:39:25" + }, + { + "body": { + "id": 2360, + "nodeType": "Block", + "src": "585:131:25", + "statements": [ + { + "expression": { + "id": 2335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2333, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "599:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "hexValue": "31", + "id": 2334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "609:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "599:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2336, + "nodeType": "ExpressionStatement", + "src": "599:11:25" + }, + { + "expression": { + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 2337, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "624:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 2339, + "indexExpression": { + "id": 2338, + "name": "digits", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2309, + "src": "631:6:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "624:14:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "hexValue": "3438", + "id": 2344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "654:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2347, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "667:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "hexValue": "3130", + "id": 2348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "675:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "667:10:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "659:7:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 2345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "659:7:25", + "typeDescriptions": {} + } + }, + "id": 2350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "659:19:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "654:24:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "648:5:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 2342, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "648:5:25", + "typeDescriptions": {} + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "648:31:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 2341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "641:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 2340, + "name": "bytes1", + "nodeType": "ElementaryTypeName", + "src": "641:6:25", + "typeDescriptions": {} + } + }, + "id": 2353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "641:39:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "624:56:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 2355, + "nodeType": "ExpressionStatement", + "src": "624:56:25" + }, + { + "expression": { + "id": 2358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 2356, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "694:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "/=", + "rightHandSide": { + "hexValue": "3130", + "id": 2357, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "703:2:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "694:11:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2359, + "nodeType": "ExpressionStatement", + "src": "694:11:25" + } + ] + }, + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 2330, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2292, + "src": "573:5:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "hexValue": "30", + "id": 2331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "582:1:25", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "573:10:25", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 2361, + "nodeType": "WhileStatement", + "src": "566:150:25" + }, + { + "expression": { + "arguments": [ + { + "id": 2364, + "name": "buffer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2324, + "src": "740:6:25", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 2363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "733:6:25", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 2362, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "733:6:25", + "typeDescriptions": {} + } + }, + "id": 2365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "733:14:25", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 2296, + "id": 2366, + "nodeType": "Return", + "src": "726:21:25" + } + ] + }, + "id": 2368, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uintToString", + "nameLocation": "244:12:25", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2292, + "mutability": "mutable", + "name": "value", + "nameLocation": "262:5:25", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "257:10:25", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2291, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "257:4:25", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "256:12:25" + }, + "returnParameters": { + "id": 2296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2295, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2368, + "src": "292:13:25", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2294, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "292:6:25", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + } + ], + "src": "291:15:25" + }, + "scope": 2369, + "src": "235:519:25", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2370, + "src": "210:546:25", + "usedErrors": [] + } + ], + "src": "31:726:25" + } + }, + "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC165 {\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/interfaces/IERC165.sol", + "exportedSymbols": { + "IERC165": [ + 78 + ] + }, + "id": 79, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 70, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:6" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IERC165", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 78, + "linearizedBaseContracts": [ + 78 + ], + "name": "IERC165", + "nameLocation": "66:7:6", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "01ffc9a7", + "id": 77, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "supportsInterface", + "nameLocation": "89:17:6", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 73, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 72, + "mutability": "mutable", + "name": "interfaceID", + "nameLocation": "114:11:6", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "107:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 71, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "107:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "106:20:6" + }, + "returnParameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 77, + "src": "150:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 74, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "150:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "149:6:6" + }, + "scope": 78, + "src": "80:76:6", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 79, + "src": "56:102:6", + "usedErrors": [] + } + ], + "src": "31:128:6" + } + }, + "@synthetixio/core-contracts/contracts/utils/MathUtil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/*\n Reference implementations:\n * Solmate - https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol\n*/\n\nlibrary MathUtil {\n function sqrt(uint256 x) internal pure returns (uint256 z) {\n assembly {\n // Start off with z at 1.\n z := 1\n\n // Used below to help find a nearby power of 2.\n let y := x\n\n // Find the lowest power of 2 that is at least sqrt(x).\n if iszero(lt(y, 0x100000000000000000000000000000000)) {\n y := shr(128, y) // Like dividing by 2 ** 128.\n z := shl(64, z) // Like multiplying by 2 ** 64.\n }\n if iszero(lt(y, 0x10000000000000000)) {\n y := shr(64, y) // Like dividing by 2 ** 64.\n z := shl(32, z) // Like multiplying by 2 ** 32.\n }\n if iszero(lt(y, 0x100000000)) {\n y := shr(32, y) // Like dividing by 2 ** 32.\n z := shl(16, z) // Like multiplying by 2 ** 16.\n }\n if iszero(lt(y, 0x10000)) {\n y := shr(16, y) // Like dividing by 2 ** 16.\n z := shl(8, z) // Like multiplying by 2 ** 8.\n }\n if iszero(lt(y, 0x100)) {\n y := shr(8, y) // Like dividing by 2 ** 8.\n z := shl(4, z) // Like multiplying by 2 ** 4.\n }\n if iszero(lt(y, 0x10)) {\n y := shr(4, y) // Like dividing by 2 ** 4.\n z := shl(2, z) // Like multiplying by 2 ** 2.\n }\n if iszero(lt(y, 0x8)) {\n // Equivalent to 2 ** z.\n z := shl(1, z)\n }\n\n // Shifting right by 1 is like dividing by 2.\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n z := shr(1, add(z, div(x, z)))\n\n // Compute a rounded down version of z.\n let zRoundDown := div(x, z)\n\n // If zRoundDown is smaller, use it.\n if lt(zRoundDown, z) {\n z := zRoundDown\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "exportedSymbols": { + "MathUtil": [ + 1708 + ] + }, + "id": 1709, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1698, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:22" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "MathUtil", + "contractDependencies": [], + "contractKind": "library", + "fullyImplemented": true, + "id": 1708, + "linearizedBaseContracts": [ + 1708 + ], + "name": "MathUtil", + "nameLocation": "200:8:22", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1706, + "nodeType": "Block", + "src": "274:2057:22", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "293:2032:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "345:6:22", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "350:1:22", + "type": "", + "value": "1" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "345:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "425:10:22", + "value": { + "name": "x", + "nodeType": "YulIdentifier", + "src": "434:1:22" + }, + "variables": [ + { + "name": "y", + "nodeType": "YulTypedName", + "src": "429:1:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "571:142:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "589:16:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "598:3:22", + "type": "", + "value": "128" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "603:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "594:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "594:11:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "589:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "652:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "661:2:22", + "type": "", + "value": "64" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "665:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "657:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "657:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "652:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "530:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "533:35:22", + "type": "", + "value": "0x100000000000000000000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "527:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "527:42:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "520:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "520:50:22" + }, + "nodeType": "YulIf", + "src": "517:196:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "764:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "782:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "791:2:22", + "type": "", + "value": "64" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "795:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "787:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "787:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "782:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "843:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "852:2:22", + "type": "", + "value": "32" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "856:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "848:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "848:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "843:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "739:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "742:19:22", + "type": "", + "value": "0x10000000000000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "736:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "736:26:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "729:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "729:34:22" + }, + "nodeType": "YulIf", + "src": "726:178:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "947:140:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "965:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "974:2:22", + "type": "", + "value": "32" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "978:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "970:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "970:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "965:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1026:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1035:2:22", + "type": "", + "value": "16" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1039:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1031:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1031:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1026:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "930:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "933:11:22", + "type": "", + "value": "0x100000000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "927:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "927:18:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "920:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "920:26:22" + }, + "nodeType": "YulIf", + "src": "917:170:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1126:138:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1144:15:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1153:2:22", + "type": "", + "value": "16" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1157:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1149:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1149:10:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1144:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1205:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1214:1:22", + "type": "", + "value": "8" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1217:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1210:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1210:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1205:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1113:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1116:7:22", + "type": "", + "value": "0x10000" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1110:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1110:14:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1103:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1103:22:22" + }, + "nodeType": "YulIf", + "src": "1100:164:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1301:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1319:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1328:1:22", + "type": "", + "value": "8" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1331:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1324:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1324:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1319:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1378:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1387:1:22", + "type": "", + "value": "4" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1390:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1383:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1383:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1378:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1290:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1293:5:22", + "type": "", + "value": "0x100" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1287:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1287:12:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1280:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1280:20:22" + }, + "nodeType": "YulIf", + "src": "1277:160:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1473:136:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1491:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1500:1:22", + "type": "", + "value": "4" + }, + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1503:1:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1496:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1496:9:22" + }, + "variableNames": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1491:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1550:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1559:1:22", + "type": "", + "value": "2" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1562:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1555:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1555:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1550:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1463:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1466:4:22", + "type": "", + "value": "0x10" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1460:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1460:11:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1453:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1453:19:22" + }, + "nodeType": "YulIf", + "src": "1450:159:22" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1644:87:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1703:14:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1712:1:22", + "type": "", + "value": "1" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1715:1:22" + } + ], + "functionName": { + "name": "shl", + "nodeType": "YulIdentifier", + "src": "1708:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1708:9:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1703:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "arguments": [ + { + "name": "y", + "nodeType": "YulIdentifier", + "src": "1635:1:22" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1638:3:22", + "type": "", + "value": "0x8" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1632:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "1632:10:22" + } + ], + "functionName": { + "name": "iszero", + "nodeType": "YulIdentifier", + "src": "1625:6:22" + }, + "nodeType": "YulFunctionCall", + "src": "1625:18:22" + }, + "nodeType": "YulIf", + "src": "1622:109:22" + }, + { + "nodeType": "YulAssignment", + "src": "1803:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1812:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1819:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1826:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1829:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1822:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1822:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1815:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1815:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1808:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1808:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1803:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1846:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1855:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1862:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1869:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1872:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1865:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1865:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1858:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1858:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1851:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1851:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1846:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1889:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1898:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1905:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1912:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1915:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1908:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1908:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1901:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1901:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1894:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1894:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1889:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1932:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1941:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1948:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1955:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1958:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1951:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1951:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1944:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1944:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1937:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1937:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1932:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "1975:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1984:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1991:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "1998:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2001:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "1994:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1994:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "1987:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1987:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1980:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "1980:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "1975:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2018:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2027:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2034:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2041:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2044:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2037:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2037:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2030:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2030:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2023:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2023:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2018:1:22" + } + ] + }, + { + "nodeType": "YulAssignment", + "src": "2061:30:22", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2070:1:22", + "type": "", + "value": "1" + }, + { + "arguments": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2077:1:22" + }, + { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2084:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2087:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2080:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2080:9:22" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "2073:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2073:17:22" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "2066:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2066:25:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2061:1:22" + } + ] + }, + { + "nodeType": "YulVariableDeclaration", + "src": "2157:27:22", + "value": { + "arguments": [ + { + "name": "x", + "nodeType": "YulIdentifier", + "src": "2179:1:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2182:1:22" + } + ], + "functionName": { + "name": "div", + "nodeType": "YulIdentifier", + "src": "2175:3:22" + }, + "nodeType": "YulFunctionCall", + "src": "2175:9:22" + }, + "variables": [ + { + "name": "zRoundDown", + "nodeType": "YulTypedName", + "src": "2161:10:22", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2268:47:22", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2286:15:22", + "value": { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2291:10:22" + }, + "variableNames": [ + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2286:1:22" + } + ] + } + ] + }, + "condition": { + "arguments": [ + { + "name": "zRoundDown", + "nodeType": "YulIdentifier", + "src": "2253:10:22" + }, + { + "name": "z", + "nodeType": "YulIdentifier", + "src": "2265:1:22" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2250:2:22" + }, + "nodeType": "YulFunctionCall", + "src": "2250:17:22" + }, + "nodeType": "YulIf", + "src": "2247:68:22" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1826:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1869:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1912:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1955:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "1998:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2041:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2084:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "2179:1:22", + "valueSize": 1 + }, + { + "declaration": 1700, + "isOffset": false, + "isSlot": false, + "src": "434:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1026:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1039:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1205:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1217:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1378:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1390:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1550:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1562:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1703:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1715:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1803:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1819:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1829:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1846:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1862:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1872:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1889:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1905:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1915:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1932:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1948:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1958:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1975:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "1991:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2001:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2018:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2034:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2044:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2061:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2077:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2087:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2182:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2265:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "2286:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "345:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "652:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "665:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "843:1:22", + "valueSize": 1 + }, + { + "declaration": 1703, + "isOffset": false, + "isSlot": false, + "src": "856:1:22", + "valueSize": 1 + } + ], + "id": 1705, + "nodeType": "InlineAssembly", + "src": "284:2041:22" + } + ] + }, + "id": 1707, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nameLocation": "224:4:22", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1701, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1700, + "mutability": "mutable", + "name": "x", + "nameLocation": "237:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "229:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "229:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "228:11:22" + }, + "returnParameters": { + "id": 1704, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1703, + "mutability": "mutable", + "name": "z", + "nameLocation": "271:1:22", + "nodeType": "VariableDeclaration", + "scope": 1707, + "src": "263:9:22", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1702, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "263:7:22", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "262:11:22" + }, + "scope": 1708, + "src": "215:2116:22", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1709, + "src": "192:2141:22", + "usedErrors": [] + } + ], + "src": "31:2303:22" + } + }, + "@synthetixio/core-modules/contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/ownership/Ownable.sol\";\nimport \"@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol\";\nimport \"../interfaces/IOwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is Ownable, IOwnerModule, InitializableMixin {\n function _isInitialized() internal view override returns (bool) {\n return _ownableStore().initialized;\n }\n\n function isOwnerModuleInitialized() external view override returns (bool) {\n return _isInitialized();\n }\n\n function initializeOwnerModule(address initialOwner) external override onlyIfNotInitialized {\n nominateNewOwner(initialOwner);\n acceptOwnership();\n\n _ownableStore().initialized = true;\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "ChangeError": [ + 25 + ], + "IOwnable": [ + 220 + ], + "IOwnerModule": [ + 2791 + ], + "InitError": [ + 32 + ], + "InitializableMixin": [ + 68 + ], + "Ownable": [ + 414 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "OwnerModule": [ + 4196 + ] + }, + "id": 4197, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4143, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:31" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/Ownable.sol", + "id": 4144, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 415, + "src": "56:69:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/initializable/InitializableMixin.sol", + "id": 4145, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 69, + "src": "126:84:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "file": "../interfaces/IOwnerModule.sol", + "id": 4146, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4197, + "sourceUnit": 2792, + "src": "211:40:31", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4147, + "name": "Ownable", + "nodeType": "IdentifierPath", + "referencedDeclaration": 414, + "src": "322:7:31" + }, + "id": 4148, + "nodeType": "InheritanceSpecifier", + "src": "322:7:31" + }, + { + "baseName": { + "id": 4149, + "name": "IOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2791, + "src": "331:12:31" + }, + "id": 4150, + "nodeType": "InheritanceSpecifier", + "src": "331:12:31" + }, + { + "baseName": { + "id": 4151, + "name": "InitializableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 68, + "src": "345:18:31" + }, + "id": 4152, + "nodeType": "InheritanceSpecifier", + "src": "345:18:31" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4196, + "linearizedBaseContracts": [ + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "307:11:31", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 67 + ], + "body": { + "id": 4162, + "nodeType": "Block", + "src": "434:51:31", + "statements": [ + { + "expression": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4158, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "451:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "451:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4157, + "id": 4161, + "nodeType": "Return", + "src": "444:34:31" + } + ] + }, + "id": 4163, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_isInitialized", + "nameLocation": "379:14:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4154, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "410:8:31" + }, + "parameters": { + "id": 4153, + "nodeType": "ParameterList", + "parameters": [], + "src": "393:2:31" + }, + "returnParameters": { + "id": 4157, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4156, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4163, + "src": "428:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4155, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "428:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "427:6:31" + }, + "scope": 4196, + "src": "370:115:31", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "baseFunctions": [ + 2790 + ], + "body": { + "id": 4172, + "nodeType": "Block", + "src": "565:40:31", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4169, + "name": "_isInitialized", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4163 + ], + "referencedDeclaration": 4163, + "src": "582:14:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bool_$", + "typeString": "function () view returns (bool)" + } + }, + "id": 4170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:16:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4168, + "id": 4171, + "nodeType": "Return", + "src": "575:23:31" + } + ] + }, + "functionSelector": "35eb2824", + "id": 4173, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "500:24:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4165, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "541:8:31" + }, + "parameters": { + "id": 4164, + "nodeType": "ParameterList", + "parameters": [], + "src": "524:2:31" + }, + "returnParameters": { + "id": 4168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4167, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 4173, + "src": "559:4:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4166, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "559:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "558:6:31" + }, + "scope": 4196, + "src": "491:114:31", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2785 + ], + "body": { + "id": 4194, + "nodeType": "Block", + "src": "703:119:31", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4182, + "name": "initialOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4175, + "src": "730:12:31", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4181, + "name": "nominateNewOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "713:16:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "713:30:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4184, + "nodeType": "ExpressionStatement", + "src": "713:30:31" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4185, + "name": "acceptOwnership", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "753:15:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 4186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "753:17:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4187, + "nodeType": "ExpressionStatement", + "src": "753:17:31" + }, + { + "expression": { + "id": 4192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4188, + "name": "_ownableStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 493, + "src": "781:13:31", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_OwnableStore_$485_storage_ptr_$", + "typeString": "function () pure returns (struct OwnableStorage.OwnableStore storage pointer)" + } + }, + "id": 4189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "781:15:31", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_OwnableStore_$485_storage_ptr", + "typeString": "struct OwnableStorage.OwnableStore storage pointer" + } + }, + "id": 4190, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "initialized", + "nodeType": "MemberAccess", + "referencedDeclaration": 480, + "src": "781:27:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 4191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "811:4:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "781:34:31", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 4193, + "nodeType": "ExpressionStatement", + "src": "781:34:31" + } + ] + }, + "functionSelector": "624bd96d", + "id": 4195, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4179, + "kind": "modifierInvocation", + "modifierName": { + "id": 4178, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "682:20:31" + }, + "nodeType": "ModifierInvocation", + "src": "682:20:31" + } + ], + "name": "initializeOwnerModule", + "nameLocation": "620:21:31", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4177, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "673:8:31" + }, + "parameters": { + "id": 4176, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4175, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "650:12:31", + "nodeType": "VariableDeclaration", + "scope": 4195, + "src": "642:20:31", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4174, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "642:7:31", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "641:22:31" + }, + "returnParameters": { + "id": 4180, + "nodeType": "ParameterList", + "parameters": [], + "src": "703:0:31" + }, + "scope": 4196, + "src": "611:211:31", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4197, + "src": "298:526:31", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:794:31" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IOwnerModule {\n function initializeOwnerModule(address initialOwner) external;\n\n function isOwnerModuleInitialized() external view returns (bool);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IOwnerModule.sol", + "exportedSymbols": { + "IOwnerModule": [ + 2791 + ] + }, + "id": 2792, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2780, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:28" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IOwnerModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 2791, + "linearizedBaseContracts": [ + 2791 + ], + "name": "IOwnerModule", + "nameLocation": "66:12:28", + "nodeType": "ContractDefinition", + "nodes": [ + { + "functionSelector": "624bd96d", + "id": 2785, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeOwnerModule", + "nameLocation": "94:21:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2783, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2782, + "mutability": "mutable", + "name": "initialOwner", + "nameLocation": "124:12:28", + "nodeType": "VariableDeclaration", + "scope": 2785, + "src": "116:20:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2781, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "116:7:28", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "115:22:28" + }, + "returnParameters": { + "id": 2784, + "nodeType": "ParameterList", + "parameters": [], + "src": "146:0:28" + }, + "scope": 2791, + "src": "85:62:28", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "functionSelector": "35eb2824", + "id": 2790, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isOwnerModuleInitialized", + "nameLocation": "162:24:28", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2786, + "nodeType": "ParameterList", + "parameters": [], + "src": "186:2:28" + }, + "returnParameters": { + "id": 2789, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2788, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2790, + "src": "212:4:28", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2787, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "212:4:28", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "211:6:28" + }, + "scope": 2791, + "src": "153:65:28", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2792, + "src": "56:164:28", + "usedErrors": [] + } + ], + "src": "31:190:28" + } + }, + "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol\";\nimport \"@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol\";\n\ncontract UpgradeModule is UUPSImplementation, OwnableMixin {\n function upgradeTo(address newImplementation) public override onlyOwner {\n _upgradeTo(newImplementation);\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "AccessError": [ + 6 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ChangeError": [ + 25 + ], + "IUUPSImplementation": [ + 238 + ], + "OwnableMixin": [ + 476 + ], + "OwnableStorage": [ + 494 + ], + "ProxyStorage": [ + 542 + ], + "UUPSImplementation": [ + 756 + ], + "UpgradeModule": [ + 4218 + ] + }, + "id": 4219, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4198, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:32" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSImplementation.sol", + "id": 4199, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 757, + "src": "56:76:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "file": "@synthetixio/core-contracts/contracts/ownership/OwnableMixin.sol", + "id": 4200, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 4219, + "sourceUnit": 477, + "src": "133:74:32", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 4201, + "name": "UUPSImplementation", + "nodeType": "IdentifierPath", + "referencedDeclaration": 756, + "src": "235:18:32" + }, + "id": 4202, + "nodeType": "InheritanceSpecifier", + "src": "235:18:32" + }, + { + "baseName": { + "id": 4203, + "name": "OwnableMixin", + "nodeType": "IdentifierPath", + "referencedDeclaration": 476, + "src": "255:12:32" + }, + "id": 4204, + "nodeType": "InheritanceSpecifier", + "src": "255:12:32" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 4218, + "linearizedBaseContracts": [ + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "218:13:32", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 227 + ], + "body": { + "id": 4216, + "nodeType": "Block", + "src": "346:46:32", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 4213, + "name": "newImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "367:17:32", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4212, + "name": "_upgradeTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "356:10:32", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 4214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "356:29:32", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4215, + "nodeType": "ExpressionStatement", + "src": "356:29:32" + } + ] + }, + "functionSelector": "3659cfe6", + "id": 4217, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 4210, + "kind": "modifierInvocation", + "modifierName": { + "id": 4209, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "336:9:32" + }, + "nodeType": "ModifierInvocation", + "src": "336:9:32" + } + ], + "name": "upgradeTo", + "nameLocation": "283:9:32", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 4208, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "327:8:32" + }, + "parameters": { + "id": 4207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4206, + "mutability": "mutable", + "name": "newImplementation", + "nameLocation": "301:17:32", + "nodeType": "VariableDeclaration", + "scope": 4217, + "src": "293:25:32", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "293:7:32", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "292:27:32" + }, + "returnParameters": { + "id": 4211, + "nodeType": "ParameterList", + "parameters": [], + "src": "346:0:32" + }, + "scope": 4218, + "src": "274:118:32", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 4219, + "src": "209:185:32", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:364:32" + } + }, + "contracts/modules/UpgradeModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {UpgradeModule as BaseUpgradeModule} from \"@synthetixio/core-modules/contracts/modules/UpgradeModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract UpgradeModule is BaseUpgradeModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/UpgradeModule.sol", + "exportedSymbols": { + "BaseUpgradeModule": [ + 4218 + ], + "UpgradeModule": [ + 7238 + ] + }, + "id": 7239, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7233, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:51" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/UpgradeModule.sol", + "id": 7235, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7239, + "sourceUnit": 4219, + "src": "56:113:51", + "symbolAliases": [ + { + "foreign": { + "id": 7234, + "name": "UpgradeModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:13:51", + "typeDescriptions": {} + }, + "local": "BaseUpgradeModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7236, + "name": "BaseUpgradeModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4218, + "src": "242:17:51" + }, + "id": 7237, + "nodeType": "InheritanceSpecifier", + "src": "242:17:51" + } + ], + "canonicalName": "UpgradeModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7238, + "linearizedBaseContracts": [ + 7238, + 4218, + 476, + 494, + 756, + 542, + 238 + ], + "name": "UpgradeModule", + "nameLocation": "225:13:51", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7239, + "src": "216:48:51", + "usedErrors": [ + 5, + 10, + 14, + 24, + 561, + 563 + ] + } + ], + "src": "31:234:51" + } + }, + "contracts/TreasuryCouncil.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol\";\n\ncontract TreasuryCouncil is UUPSProxy {\n // solhint-disable-next-line no-empty-blocks\n constructor(address firstImplementation) UUPSProxy(firstImplementation) {}\n}\n", + "ast": { + "absolutePath": "contracts/TreasuryCouncil.sol", + "exportedSymbols": { + "AbstractProxy": [ + 526 + ], + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "ProxyStorage": [ + 542 + ], + "TreasuryCouncil": [ + 7214 + ], + "UUPSProxy": [ + 816 + ] + }, + "id": 7215, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7201, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:47" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "file": "@synthetixio/core-contracts/contracts/proxy/UUPSProxy.sol", + "id": 7202, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7215, + "sourceUnit": 817, + "src": "56:67:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7203, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "153:9:47" + }, + "id": 7204, + "nodeType": "InheritanceSpecifier", + "src": "153:9:47" + } + ], + "canonicalName": "TreasuryCouncil", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7214, + "linearizedBaseContracts": [ + 7214, + 816, + 542, + 526 + ], + "name": "TreasuryCouncil", + "nameLocation": "134:15:47", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 7212, + "nodeType": "Block", + "src": "290:2:47", + "statements": [] + }, + "id": 7213, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "id": 7209, + "name": "firstImplementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7206, + "src": "269:19:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 7210, + "kind": "baseConstructorSpecifier", + "modifierName": { + "id": 7208, + "name": "UUPSProxy", + "nodeType": "IdentifierPath", + "referencedDeclaration": 816, + "src": "259:9:47" + }, + "nodeType": "ModifierInvocation", + "src": "259:30:47" + } + ], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 7207, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7206, + "mutability": "mutable", + "name": "firstImplementation", + "nameLocation": "238:19:47", + "nodeType": "VariableDeclaration", + "scope": 7213, + "src": "230:27:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "230:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "229:29:47" + }, + "returnParameters": { + "id": 7211, + "nodeType": "ParameterList", + "parameters": [], + "src": "290:0:47" + }, + "scope": 7214, + "src": "218:74:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + } + ], + "scope": 7215, + "src": "125:169:47", + "usedErrors": [ + 10, + 14 + ] + } + ], + "src": "31:264:47" + } + }, + "contracts/modules/OwnerModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {OwnerModule as BaseOwnerModule} from \"@synthetixio/core-modules/contracts/modules/OwnerModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract OwnerModule is BaseOwnerModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/OwnerModule.sol", + "exportedSymbols": { + "BaseOwnerModule": [ + 4196 + ], + "OwnerModule": [ + 7231 + ] + }, + "id": 7232, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7226, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:50" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/OwnerModule.sol", + "id": 7228, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7232, + "sourceUnit": 4197, + "src": "56:107:50", + "symbolAliases": [ + { + "foreign": { + "id": 7227, + "name": "OwnerModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:11:50", + "typeDescriptions": {} + }, + "local": "BaseOwnerModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7229, + "name": "BaseOwnerModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4196, + "src": "234:15:50" + }, + "id": 7230, + "nodeType": "InheritanceSpecifier", + "src": "234:15:50" + } + ], + "canonicalName": "OwnerModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7231, + "linearizedBaseContracts": [ + 7231, + 4196, + 68, + 2791, + 414, + 476, + 494, + 220 + ], + "name": "OwnerModule", + "nameLocation": "219:11:50", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7232, + "src": "210:44:50", + "usedErrors": [ + 5, + 10, + 24, + 29, + 262 + ] + } + ], + "src": "31:224:50" + } + }, + "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {IElectionModule as IBaseElectionModule} from \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\n\ninterface ISynthetixElectionModule is IBaseElectionModule {\n /// @notice Initializes the module and immediately starts the first epoch\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external;\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n /// @notice Sets the Synthetix v2 DebtShare contract that determines vote power\n function setDebtShareContract(address newDebtShareContractAddress) external;\n\n /// @notice Returns the Synthetix v2 DebtShare contract that determines vote power\n function getDebtShareContract() external view returns (address);\n\n /// @notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch\n function setDebtShareSnapshotId(uint snapshotId) external;\n\n /// @notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch\n function getDebtShareSnapshotId() external view returns (uint);\n\n /// @notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot\n function getDebtShare(address user) external view returns (uint);\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n /// @notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber) external;\n\n /// @notice Returns the current epoch's merkle root for user debt shares on other chains\n function getCrossChainDebtShareMerkleRoot() external view returns (bytes32);\n\n /// @notice Returns the current epoch's merkle root block number\n function getCrossChainDebtShareMerkleRootBlockNumber() external view returns (uint);\n\n /// @notice Allows users to declare their Synthetix v2 debt shares on other chains\n function declareCrossChainDebtShare(\n address account,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) external;\n\n /// @notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains\n function getDeclaredCrossChainDebtShare(address account) external view returns (uint);\n\n /// @notice Declares cross chain debt shares and casts a vote\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Sets the Optimism cross domain messenger on L2.\n function setCrossDomainMessenger(address messenger) external;\n\n /// @notice Returns the Optimism cross domain messenger on L2.\n function getCrossDomainMessenger() external view returns (address);\n\n /// @notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts.\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) external;\n\n /// @notice Allows L1 non-EOA addresses to vote on an election.\n function castRelayed(address user, address[] calldata candidates) external;\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "exportedSymbols": { + "IBaseElectionModule": [ + 2778 + ], + "ISynthetixElectionModule": [ + 6574 + ] + }, + "id": 6575, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6430, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6432, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6575, + "sourceUnit": 2779, + "src": "56:122:42", + "symbolAliases": [ + { + "foreign": { + "id": 6431, + "name": "IElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:15:42", + "typeDescriptions": {} + }, + "local": "IBaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6433, + "name": "IBaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2778, + "src": "218:19:42" + }, + "id": 6434, + "nodeType": "InheritanceSpecifier", + "src": "218:19:42" + } + ], + "canonicalName": "ISynthetixElectionModule", + "contractDependencies": [], + "contractKind": "interface", + "fullyImplemented": false, + "id": 6574, + "linearizedBaseContracts": [ + 6574, + 2778 + ], + "name": "ISynthetixElectionModule", + "nameLocation": "190:24:42", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 6435, + "nodeType": "StructuredDocumentation", + "src": "244:73:42", + "text": "@notice Initializes the module and immediately starts the first epoch" + }, + "functionSelector": "0166451a", + "id": 6455, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "initializeElectionModule", + "nameLocation": "331:24:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6453, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6437, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "379:16:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "365:30:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6436, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "365:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6439, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "419:18:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "405:32:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6438, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "405:6:42", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6442, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "464:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "447:29:42", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6440, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "447:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6441, + "nodeType": "ArrayTypeName", + "src": "447:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "492:20:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "486:26:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6443, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "486:5:42", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6446, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "529:25:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "522:32:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6445, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "522:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6448, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "571:21:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "564:28:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6447, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "564:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "609:12:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "602:19:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6449, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "602:6:42", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6452, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "639:17:42", + "nodeType": "VariableDeclaration", + "scope": 6455, + "src": "631:25:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6451, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "631:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "355:307:42" + }, + "returnParameters": { + "id": 6454, + "nodeType": "ParameterList", + "parameters": [], + "src": "671:0:42" + }, + "scope": 6574, + "src": "322:350:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6456, + "nodeType": "StructuredDocumentation", + "src": "792:79:42", + "text": "@notice Sets the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "0ebf4796", + "id": 6461, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareContract", + "nameLocation": "885:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6458, + "mutability": "mutable", + "name": "newDebtShareContractAddress", + "nameLocation": "914:27:42", + "nodeType": "VariableDeclaration", + "scope": 6461, + "src": "906:35:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6457, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "906:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "905:37:42" + }, + "returnParameters": { + "id": 6460, + "nodeType": "ParameterList", + "parameters": [], + "src": "951:0:42" + }, + "scope": 6574, + "src": "876:76:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6462, + "nodeType": "StructuredDocumentation", + "src": "958:82:42", + "text": "@notice Returns the Synthetix v2 DebtShare contract that determines vote power" + }, + "functionSelector": "aeff252a", + "id": 6467, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "1054:20:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6463, + "nodeType": "ParameterList", + "parameters": [], + "src": "1074:2:42" + }, + "returnParameters": { + "id": 6466, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6465, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6467, + "src": "1100:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6464, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1100:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1099:9:42" + }, + "scope": 6574, + "src": "1045:64:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6468, + "nodeType": "StructuredDocumentation", + "src": "1115:94:42", + "text": "@notice Sets the Synthetix v2 DebtShare snapshot that determines vote power for this epoch" + }, + "functionSelector": "a0f42837", + "id": 6473, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setDebtShareSnapshotId", + "nameLocation": "1223:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6471, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6470, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "1251:10:42", + "nodeType": "VariableDeclaration", + "scope": 6473, + "src": "1246:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6469, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1246:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1245:17:42" + }, + "returnParameters": { + "id": 6472, + "nodeType": "ParameterList", + "parameters": [], + "src": "1271:0:42" + }, + "scope": 6574, + "src": "1214:58:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6474, + "nodeType": "StructuredDocumentation", + "src": "1278:77:42", + "text": "@notice Returns the Synthetix v2 DebtShare snapshot id set for this epoch" + }, + "functionSelector": "dfe7cd3a", + "id": 6479, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "1369:22:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6475, + "nodeType": "ParameterList", + "parameters": [], + "src": "1391:2:42" + }, + "returnParameters": { + "id": 6478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6477, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6479, + "src": "1417:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1417:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1416:6:42" + }, + "scope": 6574, + "src": "1360:63:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6480, + "nodeType": "StructuredDocumentation", + "src": "1429:98:42", + "text": "@notice Returns the Synthetix v2 debt share for the provided address, at this epoch's snapshot" + }, + "functionSelector": "f2e56dea", + "id": 6487, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "1541:12:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6482, + "mutability": "mutable", + "name": "user", + "nameLocation": "1562:4:42", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1554:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6481, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1554:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1553:14:42" + }, + "returnParameters": { + "id": 6486, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6485, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6487, + "src": "1591:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6484, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1591:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1590:6:42" + }, + "scope": 6574, + "src": "1532:65:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6488, + "nodeType": "StructuredDocumentation", + "src": "1729:112:42", + "text": "@notice Allows the system owner to declare a merkle root for user debt shares on other chains for this epoch" + }, + "functionSelector": "33f3f3de", + "id": 6495, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "1855:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6490, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "1896:10:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1888:18:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6489, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1888:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6492, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "1913:11:42", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "1908:16:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6491, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1908:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1887:38:42" + }, + "returnParameters": { + "id": 6494, + "nodeType": "ParameterList", + "parameters": [], + "src": "1934:0:42" + }, + "scope": 6574, + "src": "1846:89:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "1941:88:42", + "text": "@notice Returns the current epoch's merkle root for user debt shares on other chains" + }, + "functionSelector": "b55c43d2", + "id": 6501, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "2043:32:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6497, + "nodeType": "ParameterList", + "parameters": [], + "src": "2075:2:42" + }, + "returnParameters": { + "id": 6500, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6499, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6501, + "src": "2101:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6498, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2101:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "2100:9:42" + }, + "scope": 6574, + "src": "2034:76:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6502, + "nodeType": "StructuredDocumentation", + "src": "2116:64:42", + "text": "@notice Returns the current epoch's merkle root block number" + }, + "functionSelector": "d9617851", + "id": 6507, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "2194:43:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6503, + "nodeType": "ParameterList", + "parameters": [], + "src": "2237:2:42" + }, + "returnParameters": { + "id": 6506, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6505, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6507, + "src": "2263:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6504, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2263:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2262:6:42" + }, + "scope": 6574, + "src": "2185:84:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6508, + "nodeType": "StructuredDocumentation", + "src": "2275:82:42", + "text": "@notice Allows users to declare their Synthetix v2 debt shares on other chains" + }, + "functionSelector": "7d264ccb", + "id": 6518, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareCrossChainDebtShare", + "nameLocation": "2371:26:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6510, + "mutability": "mutable", + "name": "account", + "nameLocation": "2415:7:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2407:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6509, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2407:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6512, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2440:9:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2432:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6511, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2432:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6515, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2478:11:42", + "nodeType": "VariableDeclaration", + "scope": 6518, + "src": "2459:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6513, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2459:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6514, + "nodeType": "ArrayTypeName", + "src": "2459:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "2397:98:42" + }, + "returnParameters": { + "id": 6517, + "nodeType": "ParameterList", + "parameters": [], + "src": "2504:0:42" + }, + "scope": 6574, + "src": "2362:143:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6519, + "nodeType": "StructuredDocumentation", + "src": "2511:116:42", + "text": "@notice Returns the Synthetix v2 debt shares for the provided address, at this epoch's snapshot, in other chains" + }, + "functionSelector": "796c5c80", + "id": 6526, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "2641:30:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6521, + "mutability": "mutable", + "name": "account", + "nameLocation": "2680:7:42", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2672:15:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6520, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2672:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "2671:17:42" + }, + "returnParameters": { + "id": 6525, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6524, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6526, + "src": "2712:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6523, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2712:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2711:6:42" + }, + "scope": 6574, + "src": "2632:86:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6527, + "nodeType": "StructuredDocumentation", + "src": "2724:61:42", + "text": "@notice Declares cross chain debt shares and casts a vote" + }, + "functionSelector": "9a9a8e1a", + "id": 6538, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCast", + "nameLocation": "2799:14:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6536, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6529, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "2831:9:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2823:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6528, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2823:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6532, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "2869:11:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2850:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6530, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2850:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6531, + "nodeType": "ArrayTypeName", + "src": "2850:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6535, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2909:10:42", + "nodeType": "VariableDeclaration", + "scope": 6538, + "src": "2890:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2890:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6534, + "nodeType": "ArrayTypeName", + "src": "2890:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2813:112:42" + }, + "returnParameters": { + "id": 6537, + "nodeType": "ParameterList", + "parameters": [], + "src": "2934:0:42" + }, + "scope": 6574, + "src": "2790:145:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6539, + "nodeType": "StructuredDocumentation", + "src": "2941:59:42", + "text": "@notice Sets the Optimism cross domain messenger on L2." + }, + "functionSelector": "211de0b4", + "id": 6544, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "setCrossDomainMessenger", + "nameLocation": "3014:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6541, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "3046:9:42", + "nodeType": "VariableDeclaration", + "scope": 6544, + "src": "3038:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6540, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3038:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3037:19:42" + }, + "returnParameters": { + "id": 6543, + "nodeType": "ParameterList", + "parameters": [], + "src": "3065:0:42" + }, + "scope": 6574, + "src": "3005:61:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6545, + "nodeType": "StructuredDocumentation", + "src": "3072:62:42", + "text": "@notice Returns the Optimism cross domain messenger on L2." + }, + "functionSelector": "f675fa62", + "id": 6550, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "3148:23:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [], + "src": "3171:2:42" + }, + "returnParameters": { + "id": 6549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6548, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6550, + "src": "3197:7:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6547, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3197:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3196:9:42" + }, + "scope": 6574, + "src": "3139:67:42", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6551, + "nodeType": "StructuredDocumentation", + "src": "3212:87:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election using cross-chain debts." + }, + "functionSelector": "4b144674", + "id": 6564, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "declareAndCastRelayed", + "nameLocation": "3313:21:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6562, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6553, + "mutability": "mutable", + "name": "user", + "nameLocation": "3352:4:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3344:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6552, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3344:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6555, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "3374:9:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3366:17:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6554, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6558, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "3412:11:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3393:30:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6556, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3393:7:42", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6557, + "nodeType": "ArrayTypeName", + "src": "3393:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6561, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3452:10:42", + "nodeType": "VariableDeclaration", + "scope": 6564, + "src": "3433:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6559, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3433:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6560, + "nodeType": "ArrayTypeName", + "src": "3433:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3334:134:42" + }, + "returnParameters": { + "id": 6563, + "nodeType": "ParameterList", + "parameters": [], + "src": "3477:0:42" + }, + "scope": 6574, + "src": "3304:174:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 6565, + "nodeType": "StructuredDocumentation", + "src": "3484:63:42", + "text": "@notice Allows L1 non-EOA addresses to vote on an election." + }, + "functionSelector": "5a2b3fd7", + "id": 6573, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "castRelayed", + "nameLocation": "3561:11:42", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6571, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6567, + "mutability": "mutable", + "name": "user", + "nameLocation": "3581:4:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3573:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6566, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6570, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "3606:10:42", + "nodeType": "VariableDeclaration", + "scope": 6573, + "src": "3587:29:42", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6568, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3587:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6569, + "nodeType": "ArrayTypeName", + "src": "3587:9:42", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "3572:45:42" + }, + "returnParameters": { + "id": 6572, + "nodeType": "ParameterList", + "parameters": [], + "src": "3626:0:42" + }, + "scope": 6574, + "src": "3552:75:42", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 6575, + "src": "180:3449:42", + "usedErrors": [] + } + ], + "src": "31:3599:42" + } + }, + "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"../interfaces/IElectionInspectorModule.sol\";\nimport \"../submodules/election/ElectionBase.sol\";\n\ncontract ElectionInspectorModule is IElectionInspectorModule, ElectionBase {\n using SetUtil for SetUtil.AddressSet;\n\n function getEpochStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).startDate;\n }\n\n function getEpochEndDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).endDate;\n }\n\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).nominationPeriodStartDate;\n }\n\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view override returns (uint64) {\n return _getEpochAtIndex(epochIndex).votingPeriodStartDate;\n }\n\n function wasNominated(address candidate, uint epochIndex) external view override returns (bool) {\n return _getElectionAtIndex(epochIndex).nominees.contains(candidate);\n }\n\n function getNomineesAtEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).nominees.values();\n }\n\n function getBallotVotedAtEpoch(address user, uint epochIndex) public view override returns (bytes32) {\n return _getElectionAtIndex(epochIndex).ballotIdsByAddress[user];\n }\n\n function hasVotedInEpoch(address user, uint epochIndex) external view override returns (bool) {\n return getBallotVotedAtEpoch(user, epochIndex) != bytes32(0);\n }\n\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view override returns (uint) {\n return _getBallotInEpoch(ballotId, epochIndex).votes;\n }\n\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex)\n external\n view\n override\n returns (address[] memory)\n {\n return _getBallotInEpoch(ballotId, epochIndex).candidates;\n }\n\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view override returns (uint) {\n return _getElectionAtIndex(epochIndex).candidateVotes[candidate];\n }\n\n function getElectionWinnersInEpoch(uint epochIndex) external view override returns (address[] memory) {\n return _getElectionAtIndex(epochIndex).winners.values();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "exportedSymbols": { + "ElectionBase": [ + 4683 + ], + "ElectionInspectorModule": [ + 3005 + ], + "ElectionStorage": [ + 4331 + ], + "IElectionInspectorModule": [ + 2484 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 3006, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2793, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:29" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "file": "../interfaces/IElectionInspectorModule.sol", + "id": 2794, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 2485, + "src": "56:52:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/submodules/election/ElectionBase.sol", + "file": "../submodules/election/ElectionBase.sol", + "id": 2795, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 3006, + "sourceUnit": 4684, + "src": "109:49:29", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 2796, + "name": "IElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2484, + "src": "196:24:29" + }, + "id": 2797, + "nodeType": "InheritanceSpecifier", + "src": "196:24:29" + }, + { + "baseName": { + "id": 2798, + "name": "ElectionBase", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4683, + "src": "222:12:29" + }, + "id": 2799, + "nodeType": "InheritanceSpecifier", + "src": "222:12:29" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 3005, + "linearizedBaseContracts": [ + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "169:23:29", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2803, + "libraryName": { + "id": 2800, + "name": "SetUtil", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2288, + "src": "247:7:29" + }, + "nodeType": "UsingForDirective", + "src": "241:37:29", + "typeName": { + "id": 2802, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 2801, + "name": "SetUtil.AddressSet", + "nodeType": "IdentifierPath", + "referencedDeclaration": 1788, + "src": "259:18:29" + }, + "referencedDeclaration": 1788, + "src": "259:18:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage_ptr", + "typeString": "struct SetUtil.AddressSet" + } + } + }, + { + "baseFunctions": [ + 2380 + ], + "body": { + "id": 2816, + "nodeType": "Block", + "src": "376:62:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2812, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2805, + "src": "410:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2811, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "393:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "393:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2814, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "startDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4263, + "src": "393:38:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2810, + "id": 2815, + "nodeType": "Return", + "src": "386:45:29" + } + ] + }, + "functionSelector": "714d8d0e", + "id": 2817, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "293:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2807, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "350:8:29" + }, + "parameters": { + "id": 2806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2805, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "324:10:29", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "319:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2804, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "319:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "318:17:29" + }, + "returnParameters": { + "id": 2810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2809, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2817, + "src": "368:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2808, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "368:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "367:8:29" + }, + "scope": 3005, + "src": "284:154:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2388 + ], + "body": { + "id": 2830, + "nodeType": "Block", + "src": "534:60:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2826, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2819, + "src": "568:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2825, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "551:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "551:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2828, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "endDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4265, + "src": "551:36:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2824, + "id": 2829, + "nodeType": "Return", + "src": "544:43:29" + } + ] + }, + "functionSelector": "ba9a5b25", + "id": 2831, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "453:23:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2821, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "508:8:29" + }, + "parameters": { + "id": 2820, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2819, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "482:10:29", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "477:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2818, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "477:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "476:17:29" + }, + "returnParameters": { + "id": 2824, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2823, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2831, + "src": "526:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2822, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "526:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "525:8:29" + }, + "scope": 3005, + "src": "444:150:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2396 + ], + "body": { + "id": 2844, + "nodeType": "Block", + "src": "703:78:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2840, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2833, + "src": "737:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2839, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "720:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "720:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2842, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominationPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4267, + "src": "720:54:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2838, + "id": 2843, + "nodeType": "Return", + "src": "713:61:29" + } + ] + }, + "functionSelector": "b749be55", + "id": 2845, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "609:36:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2835, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "677:8:29" + }, + "parameters": { + "id": 2834, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2833, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "651:10:29", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "646:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "645:17:29" + }, + "returnParameters": { + "id": 2838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2837, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2845, + "src": "695:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2836, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "695:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "694:8:29" + }, + "scope": 3005, + "src": "600:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2404 + ], + "body": { + "id": 2858, + "nodeType": "Block", + "src": "886:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2854, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2847, + "src": "920:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2853, + "name": "_getEpochAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4577, + "src": "903:16:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_EpochData_$4270_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.EpochData storage pointer)" + } + }, + "id": 2855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "903:28:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_EpochData_$4270_storage_ptr", + "typeString": "struct ElectionStorage.EpochData storage pointer" + } + }, + "id": 2856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votingPeriodStartDate", + "nodeType": "MemberAccess", + "referencedDeclaration": 4269, + "src": "903:50:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "functionReturnParameters": 2852, + "id": 2857, + "nodeType": "Return", + "src": "896:57:29" + } + ] + }, + "functionSelector": "82e28473", + "id": 2859, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "796:32:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2849, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "860:8:29" + }, + "parameters": { + "id": 2848, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2847, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "834:10:29", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "829:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2846, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "829:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "828:17:29" + }, + "returnParameters": { + "id": 2852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2851, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2859, + "src": "878:6:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2850, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "878:6:29", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "877:8:29" + }, + "scope": 3005, + "src": "787:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2414 + ], + "body": { + "id": 2877, + "nodeType": "Block", + "src": "1062:84:29", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 2874, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2861, + "src": "1129:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "expression": { + "arguments": [ + { + "id": 2870, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2863, + "src": "1099:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2869, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1079:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2872, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1079:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "contains", + "nodeType": "MemberAccess", + "referencedDeclaration": 1898, + "src": "1079:49:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer,address) view returns (bool)" + } + }, + "id": 2875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:60:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2868, + "id": 2876, + "nodeType": "Return", + "src": "1072:67:29" + } + ] + }, + "functionSelector": "205569c2", + "id": 2878, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "975:12:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2865, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1038:8:29" + }, + "parameters": { + "id": 2864, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2861, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "996:9:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "988:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2860, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "988:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2863, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1012:10:29", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1007:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2862, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1007:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "987:36:29" + }, + "returnParameters": { + "id": 2868, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2867, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2878, + "src": "1056:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2866, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1056:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1055:6:29" + }, + "scope": 3005, + "src": "966:180:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2423 + ], + "body": { + "id": 2894, + "nodeType": "Block", + "src": "1247:73:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2888, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2880, + "src": "1284:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2887, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1264:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "nominees", + "nodeType": "MemberAccess", + "referencedDeclaration": 4279, + "src": "1264:40:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 2891, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "1264:47:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 2892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:49:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2886, + "id": 2893, + "nodeType": "Return", + "src": "1257:56:29" + } + ] + }, + "functionSelector": "ca80a2ed", + "id": 2895, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1161:18:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2882, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1211:8:29" + }, + "parameters": { + "id": 2881, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2880, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1185:10:29", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1180:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2879, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1180:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1179:17:29" + }, + "returnParameters": { + "id": 2886, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2885, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2895, + "src": "1229:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1229:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2884, + "nodeType": "ArrayTypeName", + "src": "1229:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1228:18:29" + }, + "scope": 3005, + "src": "1152:168:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2433 + ], + "body": { + "id": 2912, + "nodeType": "Block", + "src": "1427:80:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2906, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2899, + "src": "1464:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2905, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "1444:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1444:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2908, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "ballotIdsByAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 4294, + "src": "1444:50:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 2910, + "indexExpression": { + "id": 2909, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2897, + "src": "1495:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1444:56:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 2904, + "id": 2911, + "nodeType": "Return", + "src": "1437:63:29" + } + ] + }, + "functionSelector": "49aed35c", + "id": 2913, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1335:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2901, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1400:8:29" + }, + "parameters": { + "id": 2900, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2897, + "mutability": "mutable", + "name": "user", + "nameLocation": "1365:4:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1357:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2896, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1357:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2899, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1376:10:29", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1371:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2898, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1371:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1356:31:29" + }, + "returnParameters": { + "id": 2904, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2903, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2913, + "src": "1418:7:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2902, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1418:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1417:9:29" + }, + "scope": 3005, + "src": "1326:181:29", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 2443 + ], + "body": { + "id": 2933, + "nodeType": "Block", + "src": "1607:77:29", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 2931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 2924, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2915, + "src": "1646:4:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 2925, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2917, + "src": "1652:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2923, + "name": "getBallotVotedAtEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2913, + "src": "1624:21:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_uint256_$returns$_t_bytes32_$", + "typeString": "function (address,uint256) view returns (bytes32)" + } + }, + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1624:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 2929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:1:29", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2928, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1667:7:29", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes32_$", + "typeString": "type(bytes32)" + }, + "typeName": { + "id": 2927, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1667:7:29", + "typeDescriptions": {} + } + }, + "id": 2930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1667:10:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1624:53:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 2922, + "id": 2932, + "nodeType": "Return", + "src": "1617:60:29" + } + ] + }, + "functionSelector": "1209644e", + "id": 2934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1522:15:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2919, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1583:8:29" + }, + "parameters": { + "id": 2918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2915, + "mutability": "mutable", + "name": "user", + "nameLocation": "1546:4:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1538:12:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2914, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1538:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2917, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1557:10:29", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1552:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2916, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1552:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1537:31:29" + }, + "returnParameters": { + "id": 2922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2921, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2934, + "src": "1601:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2920, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1601:4:29", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1600:6:29" + }, + "scope": 3005, + "src": "1513:171:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2453 + ], + "body": { + "id": 2950, + "nodeType": "Block", + "src": "1794:69:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2945, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2936, + "src": "1829:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2946, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2938, + "src": "1839:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2944, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "1811:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1811:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4301, + "src": "1811:45:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2943, + "id": 2949, + "nodeType": "Return", + "src": "1804:52:29" + } + ] + }, + "functionSelector": "2c3c5ba3", + "id": 2951, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1699:21:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2940, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1770:8:29" + }, + "parameters": { + "id": 2939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2936, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1729:8:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1721:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2935, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1721:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2938, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1744:10:29", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1739:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2937, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1739:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1720:35:29" + }, + "returnParameters": { + "id": 2943, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2942, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2951, + "src": "1788:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2941, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1788:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1787:6:29" + }, + "scope": 3005, + "src": "1690:173:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2464 + ], + "body": { + "id": 2968, + "nodeType": "Block", + "src": "2026:74:29", + "statements": [ + { + "expression": { + "expression": { + "arguments": [ + { + "id": 2963, + "name": "ballotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2953, + "src": "2061:8:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 2964, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2955, + "src": "2071:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2962, + "name": "_getBallotInEpoch", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4637, + "src": "2043:17:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_bytes32_$_t_uint256_$returns$_t_struct$_BallotData_$4309_storage_ptr_$", + "typeString": "function (bytes32,uint256) view returns (struct ElectionStorage.BallotData storage pointer)" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2043:39:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_BallotData_$4309_storage_ptr", + "typeString": "struct ElectionStorage.BallotData storage pointer" + } + }, + "id": 2966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidates", + "nodeType": "MemberAccess", + "referencedDeclaration": 4304, + "src": "2043:50:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "functionReturnParameters": 2961, + "id": 2967, + "nodeType": "Return", + "src": "2036:57:29" + } + ] + }, + "functionSelector": "0a8b471a", + "id": 2969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "1878:26:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2957, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1978:8:29" + }, + "parameters": { + "id": 2956, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2953, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1913:8:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1905:16:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2952, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1905:7:29", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2955, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1928:10:29", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "1923:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2954, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1923:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1904:35:29" + }, + "returnParameters": { + "id": 2961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2960, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2969, + "src": "2004:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2958, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2004:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2959, + "nodeType": "ArrayTypeName", + "src": "2004:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2003:18:29" + }, + "scope": 3005, + "src": "1869:231:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2474 + ], + "body": { + "id": 2986, + "nodeType": "Block", + "src": "2214:81:29", + "statements": [ + { + "expression": { + "baseExpression": { + "expression": { + "arguments": [ + { + "id": 2980, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2973, + "src": "2251:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2979, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2231:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2231:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "candidateVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4298, + "src": "2231:46:29", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2984, + "indexExpression": { + "id": 2983, + "name": "candidate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2971, + "src": "2278:9:29", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2231:57:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2978, + "id": 2985, + "nodeType": "Return", + "src": "2224:64:29" + } + ] + }, + "functionSelector": "793b9a9d", + "id": 2987, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2115:24:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2975, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2190:8:29" + }, + "parameters": { + "id": 2974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2971, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2148:9:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2140:17:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2970, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2140:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2973, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2164:10:29", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2159:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2972, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2159:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2139:36:29" + }, + "returnParameters": { + "id": 2978, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2977, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2987, + "src": "2208:4:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2976, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2208:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2207:6:29" + }, + "scope": 3005, + "src": "2106:189:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2483 + ], + "body": { + "id": 3003, + "nodeType": "Block", + "src": "2403:72:29", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "arguments": [ + { + "id": 2997, + "name": "epochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2989, + "src": "2440:10:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2996, + "name": "_getElectionAtIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4604, + "src": "2420:19:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_struct$_ElectionData_$4299_storage_ptr_$", + "typeString": "function (uint256) view returns (struct ElectionStorage.ElectionData storage pointer)" + } + }, + "id": 2998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:31:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ElectionData_$4299_storage_ptr", + "typeString": "struct ElectionStorage.ElectionData storage pointer" + } + }, + "id": 2999, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "winners", + "nodeType": "MemberAccess", + "referencedDeclaration": 4282, + "src": "2420:39:29", + "typeDescriptions": { + "typeIdentifier": "t_struct$_AddressSet_$1788_storage", + "typeString": "struct SetUtil.AddressSet storage ref" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "values", + "nodeType": "MemberAccess", + "referencedDeclaration": 1993, + "src": "2420:46:29", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_AddressSet_$1788_storage_ptr_$returns$_t_array$_t_address_$dyn_memory_ptr_$bound_to$_t_struct$_AddressSet_$1788_storage_ptr_$", + "typeString": "function (struct SetUtil.AddressSet storage pointer) view returns (address[] memory)" + } + }, + "id": 3001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2420:48:29", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "functionReturnParameters": 2995, + "id": 3002, + "nodeType": "Return", + "src": "2413:55:29" + } + ] + }, + "functionSelector": "cce32c52", + "id": 3004, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2310:25:29", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2991, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2367:8:29" + }, + "parameters": { + "id": 2990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2989, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2341:10:29", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2336:15:29", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2988, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2336:4:29", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2335:17:29" + }, + "returnParameters": { + "id": 2995, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2994, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 3004, + "src": "2385:16:29", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2992, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2385:7:29", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2993, + "nodeType": "ArrayTypeName", + "src": "2385:9:29", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2384:18:29" + }, + "scope": 3005, + "src": "2301:174:29", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3006, + "src": "160:2317:29", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:2447:29" + } + }, + "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/// @title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n/// @dev View functions add to contract size, since they bloat the Solidity function dispatcher\ninterface IElectionInspectorModule {\n // ---------------------------------------\n // View functions\n // ---------------------------------------\n\n /// @notice Returns the date in which the given epoch started\n function getEpochStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the given epoch ended\n function getEpochEndDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Nomination period in the given epoch started\n function getNominationPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Returns the date in which the Voting period in the given epoch started\n function getVotingPeriodStartDateForIndex(uint epochIndex) external view returns (uint64);\n\n /// @notice Shows if a candidate was nominated in the given epoch\n function wasNominated(address candidate, uint epochIndex) external view returns (bool);\n\n /// @notice Returns a list of all nominated candidates in the given epoch\n function getNomineesAtEpoch(uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the ballot id that user voted on in the given election\n function getBallotVotedAtEpoch(address user, uint epochIndex) external view returns (bytes32);\n\n /// @notice Returns if user has voted in the given election\n function hasVotedInEpoch(address user, uint epochIndex) external view returns (bool);\n\n /// @notice Returns the number of votes given to a particular ballot in a given epoch\n function getBallotVotesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the list of candidates that a particular ballot has in a given epoch\n function getBallotCandidatesInEpoch(bytes32 ballotId, uint epochIndex) external view returns (address[] memory);\n\n /// @notice Returns the number of votes a candidate received in a given epoch\n function getCandidateVotesInEpoch(address candidate, uint epochIndex) external view returns (uint);\n\n /// @notice Returns the winners of the given election\n function getElectionWinnersInEpoch(uint epochIndex) external view returns (address[] memory);\n}\n", + "ast": { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionInspectorModule.sol", + "exportedSymbols": { + "IElectionInspectorModule": [ + 2484 + ] + }, + "id": 2485, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2371, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:26" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "IElectionInspectorModule", + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 2372, + "nodeType": "StructuredDocumentation", + "src": "56:233:26", + "text": "@title Module that simply adds view functions to retrieve additional info from the election module, such as historical election info\n @dev View functions add to contract size, since they bloat the Solidity function dispatcher" + }, + "fullyImplemented": false, + "id": 2484, + "linearizedBaseContracts": [ + 2484 + ], + "name": "IElectionInspectorModule", + "nameLocation": "299:24:26", + "nodeType": "ContractDefinition", + "nodes": [ + { + "documentation": { + "id": 2373, + "nodeType": "StructuredDocumentation", + "src": "447:61:26", + "text": "@notice Returns the date in which the given epoch started" + }, + "functionSelector": "714d8d0e", + "id": 2380, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochStartDateForIndex", + "nameLocation": "522:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2376, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2375, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "553:10:26", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "548:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2374, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "548:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "547:17:26" + }, + "returnParameters": { + "id": 2379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2378, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2380, + "src": "588:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2377, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "588:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "587:8:26" + }, + "scope": 2484, + "src": "513:83:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2381, + "nodeType": "StructuredDocumentation", + "src": "602:59:26", + "text": "@notice Returns the date in which the given epoch ended" + }, + "functionSelector": "ba9a5b25", + "id": 2388, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getEpochEndDateForIndex", + "nameLocation": "675:23:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2383, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "704:10:26", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "699:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2382, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "699:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "698:17:26" + }, + "returnParameters": { + "id": 2387, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2386, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2388, + "src": "739:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2385, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "739:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "738:8:26" + }, + "scope": 2484, + "src": "666:81:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2389, + "nodeType": "StructuredDocumentation", + "src": "753:86:26", + "text": "@notice Returns the date in which the Nomination period in the given epoch started" + }, + "functionSelector": "b749be55", + "id": 2396, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNominationPeriodStartDateForIndex", + "nameLocation": "853:36:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2392, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2391, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "895:10:26", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "890:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2390, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "890:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "889:17:26" + }, + "returnParameters": { + "id": 2395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2396, + "src": "930:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2393, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "930:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "929:8:26" + }, + "scope": 2484, + "src": "844:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2397, + "nodeType": "StructuredDocumentation", + "src": "944:82:26", + "text": "@notice Returns the date in which the Voting period in the given epoch started" + }, + "functionSelector": "82e28473", + "id": 2404, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getVotingPeriodStartDateForIndex", + "nameLocation": "1040:32:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2399, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1078:10:26", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1073:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2398, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1073:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1072:17:26" + }, + "returnParameters": { + "id": 2403, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2402, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2404, + "src": "1113:6:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 2401, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1113:6:26", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1112:8:26" + }, + "scope": 2484, + "src": "1031:90:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2405, + "nodeType": "StructuredDocumentation", + "src": "1127:65:26", + "text": "@notice Shows if a candidate was nominated in the given epoch" + }, + "functionSelector": "205569c2", + "id": 2414, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "wasNominated", + "nameLocation": "1206:12:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2407, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "1227:9:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1219:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2406, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1219:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2409, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1243:10:26", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1238:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1238:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1218:36:26" + }, + "returnParameters": { + "id": 2413, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2412, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2414, + "src": "1278:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2411, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1278:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1277:6:26" + }, + "scope": 2484, + "src": "1197:87:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2415, + "nodeType": "StructuredDocumentation", + "src": "1290:73:26", + "text": "@notice Returns a list of all nominated candidates in the given epoch" + }, + "functionSelector": "ca80a2ed", + "id": 2423, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getNomineesAtEpoch", + "nameLocation": "1377:18:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2418, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2417, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1401:10:26", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1396:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2416, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1396:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1395:17:26" + }, + "returnParameters": { + "id": 2422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2421, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2423, + "src": "1436:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2419, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1436:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2420, + "nodeType": "ArrayTypeName", + "src": "1436:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "1435:18:26" + }, + "scope": 2484, + "src": "1368:86:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2424, + "nodeType": "StructuredDocumentation", + "src": "1460:74:26", + "text": "@notice Returns the ballot id that user voted on in the given election" + }, + "functionSelector": "49aed35c", + "id": 2433, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotedAtEpoch", + "nameLocation": "1548:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2426, + "mutability": "mutable", + "name": "user", + "nameLocation": "1578:4:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1570:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2425, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1570:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2428, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1589:10:26", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1584:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2427, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1584:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1569:31:26" + }, + "returnParameters": { + "id": 2432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2431, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2433, + "src": "1624:7:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2430, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1624:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "1623:9:26" + }, + "scope": 2484, + "src": "1539:94:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2434, + "nodeType": "StructuredDocumentation", + "src": "1639:59:26", + "text": "@notice Returns if user has voted in the given election" + }, + "functionSelector": "1209644e", + "id": 2443, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "hasVotedInEpoch", + "nameLocation": "1712:15:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2439, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2436, + "mutability": "mutable", + "name": "user", + "nameLocation": "1736:4:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1728:12:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1728:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2438, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1747:10:26", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1742:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2437, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1742:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1727:31:26" + }, + "returnParameters": { + "id": 2442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2441, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2443, + "src": "1782:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2440, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1782:4:26", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "1781:6:26" + }, + "scope": 2484, + "src": "1703:85:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2444, + "nodeType": "StructuredDocumentation", + "src": "1794:85:26", + "text": "@notice Returns the number of votes given to a particular ballot in a given epoch" + }, + "functionSelector": "2c3c5ba3", + "id": 2453, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotVotesInEpoch", + "nameLocation": "1893:21:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2446, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "1923:8:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1915:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1915:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2448, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "1938:10:26", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1933:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2447, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1933:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1914:35:26" + }, + "returnParameters": { + "id": 2452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2451, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2453, + "src": "1973:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2450, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1973:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1972:6:26" + }, + "scope": 2484, + "src": "1884:95:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2454, + "nodeType": "StructuredDocumentation", + "src": "1985:88:26", + "text": "@notice Returns the list of candidates that a particular ballot has in a given epoch" + }, + "functionSelector": "0a8b471a", + "id": 2464, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getBallotCandidatesInEpoch", + "nameLocation": "2087:26:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2459, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2456, + "mutability": "mutable", + "name": "ballotId", + "nameLocation": "2122:8:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2114:16:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 2455, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "2114:7:26", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2458, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2137:10:26", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2132:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2457, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2132:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2113:35:26" + }, + "returnParameters": { + "id": 2463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2462, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2464, + "src": "2172:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2172:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2461, + "nodeType": "ArrayTypeName", + "src": "2172:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2171:18:26" + }, + "scope": 2484, + "src": "2078:112:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2465, + "nodeType": "StructuredDocumentation", + "src": "2196:77:26", + "text": "@notice Returns the number of votes a candidate received in a given epoch" + }, + "functionSelector": "793b9a9d", + "id": 2474, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCandidateVotesInEpoch", + "nameLocation": "2287:24:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2467, + "mutability": "mutable", + "name": "candidate", + "nameLocation": "2320:9:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2312:17:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2466, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2312:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 2469, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2336:10:26", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2331:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2468, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2331:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2311:36:26" + }, + "returnParameters": { + "id": 2473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2472, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2474, + "src": "2371:4:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2471, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2371:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2370:6:26" + }, + "scope": 2484, + "src": "2278:99:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "documentation": { + "id": 2475, + "nodeType": "StructuredDocumentation", + "src": "2383:53:26", + "text": "@notice Returns the winners of the given election" + }, + "functionSelector": "cce32c52", + "id": 2483, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getElectionWinnersInEpoch", + "nameLocation": "2450:25:26", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 2478, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2477, + "mutability": "mutable", + "name": "epochIndex", + "nameLocation": "2481:10:26", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2476:15:26", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2476, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2476:4:26", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2475:17:26" + }, + "returnParameters": { + "id": 2482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2481, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 2483, + "src": "2516:16:26", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 2479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2516:7:26", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 2480, + "nodeType": "ArrayTypeName", + "src": "2516:9:26", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2515:18:26" + }, + "scope": 2484, + "src": "2441:93:26", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 2485, + "src": "289:2247:26", + "usedErrors": [] + } + ], + "src": "31:2506:26" + } + }, + "contracts/modules/ElectionInspectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionInspectorModule as BaseElectionInspectorModule} from \"@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol\";\n\n// solhint-disable-next-line no-empty-blocks\ncontract ElectionInspectorModule is BaseElectionInspectorModule {\n\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionInspectionModule.sol", + "exportedSymbols": { + "BaseElectionInspectorModule": [ + 3005 + ], + "ElectionInspectorModule": [ + 7224 + ] + }, + "id": 7225, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7219, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:49" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionInspectorModule.sol", + "id": 7221, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7225, + "sourceUnit": 3006, + "src": "56:143:49", + "symbolAliases": [ + { + "foreign": { + "id": 7220, + "name": "ElectionInspectorModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:23:49", + "typeDescriptions": {} + }, + "local": "BaseElectionInspectorModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7222, + "name": "BaseElectionInspectorModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3005, + "src": "282:27:49" + }, + "id": 7223, + "nodeType": "InheritanceSpecifier", + "src": "282:27:49" + } + ], + "canonicalName": "ElectionInspectorModule", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7224, + "linearizedBaseContracts": [ + 7224, + 3005, + 4683, + 4331, + 2484 + ], + "name": "ElectionInspectorModule", + "nameLocation": "255:23:49", + "nodeType": "ContractDefinition", + "nodes": [], + "scope": 7225, + "src": "246:68:49", + "usedErrors": [ + 4344, + 4346, + 4348, + 4350, + 4352, + 4354, + 4356, + 4358, + 4360, + 4362, + 4364, + 4366, + 4368, + 4370, + 4372, + 4374, + 4376, + 4378 + ] + } + ], + "src": "31:284:49" + } + }, + "contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as SynthetixElectionModule} from \"@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol\";\n\ncontract ElectionModule is SynthetixElectionModule {\n // ---------------------------------------\n // Internal\n // ---------------------------------------\n\n /// @dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains\n /// @dev Note that this removes the use of Math.sqrt defined in synthetix-governance\n function _getVotePower(address user) internal view override returns (uint) {\n return _getDebtShare(user) + _getDeclaredCrossChainDebtShare(user);\n }\n}\n", + "ast": { + "absolutePath": "contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "ElectionModule": [ + 7208 + ], + "SynthetixElectionModule": [ + 6628 + ] + }, + "id": 7209, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 7185, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:42" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "id": 7187, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 7209, + "sourceUnit": 6629, + "src": "56:129:42", + "symbolAliases": [ + { + "foreign": { + "id": 7186, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:42", + "typeDescriptions": {} + }, + "local": "SynthetixElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 7188, + "name": "SynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6628, + "src": "214:23:42" + }, + "id": 7189, + "nodeType": "InheritanceSpecifier", + "src": "214:23:42" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 7208, + "linearizedBaseContracts": [ + 7208, + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "196:14:42", + "nodeType": "ContractDefinition", + "nodes": [ + { + "baseFunctions": [ + 6597 + ], + "body": { + "id": 7206, + "nodeType": "Block", + "src": "635:83:42", + "statements": [ + { + "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 7199, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "666:4:42", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7198, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "652:13:42", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 7200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "652:19:42", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 7202, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7192, + "src": "706:4:42", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 7201, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "674:31:42", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 7203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "674:37:42", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "652:59:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 7197, + "id": 7205, + "nodeType": "Return", + "src": "645:66:42" + } + ] + }, + "documentation": { + "id": 7190, + "nodeType": "StructuredDocumentation", + "src": "355:200:42", + "text": "@dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains\n @dev Note that this removes the use of Math.sqrt defined in synthetix-governance" + }, + "id": 7207, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "569:13:42", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 7194, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "611:8:42" + }, + "parameters": { + "id": 7193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7192, + "mutability": "mutable", + "name": "user", + "nameLocation": "591:4:42", + "nodeType": "VariableDeclaration", + "scope": 7207, + "src": "583:12:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 7191, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "583:7:42", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "582:14:42" + }, + "returnParameters": { + "id": 7197, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 7196, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 7207, + "src": "629:4:42", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7195, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "629:4:42", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "628:6:42" + }, + "scope": 7208, + "src": "560:158:42", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 7209, + "src": "187:533:42", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:690:42" + } + }, + "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol": { + "sourceCode": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport {ElectionModule as BaseElectionModule} from \"@synthetixio/core-modules/contracts/modules/ElectionModule.sol\";\nimport \"@synthetixio/core-contracts/contracts/utils/MathUtil.sol\";\nimport \"@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol\";\nimport \"../interfaces/ISynthetixElectionModule.sol\";\nimport \"../submodules/election/DebtShareManager.sol\";\nimport \"../submodules/election/CrossChainDebtShareManager.sol\";\n\n/// @title Module for electing a council, represented by a set of NFT holders\n/// @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n/// @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n/// @dev A snapshot must be set to determine the debt share id to use.\n/// @dev The merkle proof must also be provided for L1 debt shares before an election.\n/// @dev L1 EOA debt share holders can use declareAndCast to vote.\n/// @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers.\ncontract ElectionModule is ISynthetixElectionModule, BaseElectionModule, DebtShareManager, CrossChainDebtShareManager {\n error TooManyCandidates();\n error WrongInitializer();\n\n /// @dev The BaseElectionModule initializer should not be called, and this one must be called instead\n function initializeElectionModule(\n string memory,\n string memory,\n address[] memory,\n uint8,\n uint64,\n uint64,\n uint64\n ) external view override(BaseElectionModule, IElectionModule) onlyOwner onlyIfNotInitialized {\n revert WrongInitializer();\n }\n\n /// @dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract\n function initializeElectionModule(\n string memory councilTokenName,\n string memory councilTokenSymbol,\n address[] memory firstCouncil,\n uint8 minimumActiveMembers,\n uint64 nominationPeriodStartDate,\n uint64 votingPeriodStartDate,\n uint64 epochEndDate,\n address debtShareContract\n ) external override onlyOwner onlyIfNotInitialized {\n _setDebtShareContract(debtShareContract);\n\n _initializeElectionModule(\n councilTokenName,\n councilTokenSymbol,\n firstCouncil,\n minimumActiveMembers,\n nominationPeriodStartDate,\n votingPeriodStartDate,\n epochEndDate\n );\n }\n\n /// @dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n /// @dev This function is all that needs to be called by L2 debt share holders to vote.\n function cast(address[] calldata candidates)\n public\n override(BaseElectionModule, IElectionModule)\n onlyInPeriod(ElectionPeriod.Vote)\n {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n _cast(msg.sender, candidates);\n }\n\n // ---------------------------------------\n // Debt shares\n // ---------------------------------------\n\n function setDebtShareContract(address debtShareContract)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Administration)\n {\n _setDebtShareContract(debtShareContract);\n\n emit DebtShareContractSet(debtShareContract);\n }\n\n function getDebtShareContract() external view override returns (address) {\n return address(_debtShareStore().debtShareContract);\n }\n\n function setDebtShareSnapshotId(uint snapshotId) external override onlyOwner onlyInPeriod(ElectionPeriod.Nomination) {\n _setDebtShareSnapshotId(snapshotId);\n }\n\n function getDebtShareSnapshotId() external view override returns (uint) {\n return _getDebtShareSnapshotId();\n }\n\n function getDebtShare(address user) external view override returns (uint) {\n return _getDebtShare(user);\n }\n\n // ---------------------------------------\n // Cross chain debt shares\n // ---------------------------------------\n\n function setCrossChainDebtShareMerkleRoot(bytes32 merkleRoot, uint blocknumber)\n external\n override\n onlyOwner\n onlyInPeriod(ElectionPeriod.Nomination)\n {\n _setCrossChainDebtShareMerkleRoot(merkleRoot, blocknumber);\n\n emit CrossChainDebtShareMerkleRootSet(merkleRoot, blocknumber, _getCurrentEpochIndex());\n }\n\n function getCrossChainDebtShareMerkleRoot() external view override returns (bytes32) {\n return _getCrossChainDebtShareMerkleRoot();\n }\n\n function getCrossChainDebtShareMerkleRootBlockNumber() external view override returns (uint) {\n return _getCrossChainDebtShareMerkleRootBlockNumber();\n }\n\n function declareCrossChainDebtShare(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n _declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n emit CrossChainDebtShareDeclared(user, debtShare);\n }\n\n /// @dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls.\n function getDeclaredCrossChainDebtShare(address user) external view override returns (uint) {\n return _getDeclaredCrossChainDebtShare(user);\n }\n\n /// @dev L1 EOA debt share holders can call this single function to vote.\n function declareAndCast(\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n declareCrossChainDebtShare(msg.sender, debtShare, merkleProof);\n\n cast(candidates);\n }\n\n function setCrossDomainMessenger(address messenger) external onlyOwner {\n _setCrossDomainMessenger(messenger);\n\n emit CrossDomainMessengerSet(messenger);\n }\n\n function getCrossDomainMessenger() external view returns (address) {\n return _getCrossDomainMessenger();\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000).\n function declareAndCastRelayed(\n address user,\n uint256 debtShare,\n bytes32[] calldata merkleProof,\n address[] calldata candidates\n ) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n declareCrossChainDebtShare(user, debtShare, merkleProof);\n\n _cast(user, candidates);\n }\n\n /// @dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n /// @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000).\n function castRelayed(address user, address[] calldata candidates) public override onlyInPeriod(ElectionPeriod.Vote) {\n if (candidates.length > 1) {\n revert TooManyCandidates();\n }\n\n // Reverts if msg.sender is not the Optimism messenger on L2,\n // or if the initiator on L1 is not the user that is voting.\n _validateCrossChainMessage(user);\n\n _cast(user, candidates);\n }\n\n // ---------------------------------------\n // Internal\n // ---------------------------------------\n\n /// @dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered\n function _getVotePower(address user) internal view virtual override returns (uint) {\n uint votePower = _getDebtShare(user) + _getDeclaredCrossChainDebtShare(user);\n\n return MathUtil.sqrt(votePower);\n }\n\n function _createNewEpoch() internal virtual override {\n super._createNewEpoch();\n\n DebtShareStore storage store = _debtShareStore();\n\n store.debtShareIds.push();\n store.crossChainDebtShareData.push();\n }\n}\n", + "ast": { + "absolutePath": "@synthetixio/synthetix-governance/contracts/modules/ElectionModule.sol", + "exportedSymbols": { + "AddressError": [ + 15 + ], + "AddressUtil": [ + 1696 + ], + "BaseElectionModule": [ + 3799 + ], + "ChangeError": [ + 25 + ], + "CrossChainDebtShareManager": [ + 7004 + ], + "DebtShareManager": [ + 7183 + ], + "DebtShareStorage": [ + 6665 + ], + "ElectionBase": [ + 4264 + ], + "ElectionModule": [ + 6628 + ], + "ElectionStorage": [ + 3912 + ], + "IBaseElectionModule": [ + 2663 + ], + "ICrossDomainMessenger": [ + 5997 + ], + "IDebtShare": [ + 6009 + ], + "IElectionModule": [ + 2663 + ], + "ISynthetixElectionModule": [ + 6155 + ], + "MathUtil": [ + 1708 + ], + "MerkleProof": [ + 1782 + ], + "SetUtil": [ + 2288 + ] + }, + "id": 6629, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 6157, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "31:23:38" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/modules/ElectionModule.sol", + "id": 6159, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 3800, + "src": "56:116:38", + "symbolAliases": [ + { + "foreign": { + "id": 6158, + "name": "ElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "64:14:38", + "typeDescriptions": {} + }, + "local": "BaseElectionModule", + "nameLocation": "-1:-1:-1" + } + ], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "file": "@synthetixio/core-contracts/contracts/utils/MathUtil.sol", + "id": 6160, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 1709, + "src": "173:66:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "file": "@synthetixio/core-modules/contracts/interfaces/IElectionModule.sol", + "id": 6161, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 2664, + "src": "240:76:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/interfaces/ISynthetixElectionModule.sol", + "file": "../interfaces/ISynthetixElectionModule.sol", + "id": 6162, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 6156, + "src": "317:52:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/DebtShareManager.sol", + "file": "../submodules/election/DebtShareManager.sol", + "id": 6163, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7184, + "src": "370:53:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@synthetixio/synthetix-governance/contracts/submodules/election/CrossChainDebtShareManager.sol", + "file": "../submodules/election/CrossChainDebtShareManager.sol", + "id": 6164, + "nameLocation": "-1:-1:-1", + "nodeType": "ImportDirective", + "scope": 6629, + "sourceUnit": 7005, + "src": "424:63:38", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "baseName": { + "id": 6166, + "name": "ISynthetixElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6155, + "src": "1206:24:38" + }, + "id": 6167, + "nodeType": "InheritanceSpecifier", + "src": "1206:24:38" + }, + { + "baseName": { + "id": 6168, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1232:18:38" + }, + "id": 6169, + "nodeType": "InheritanceSpecifier", + "src": "1232:18:38" + }, + { + "baseName": { + "id": 6170, + "name": "DebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7183, + "src": "1252:16:38" + }, + "id": 6171, + "nodeType": "InheritanceSpecifier", + "src": "1252:16:38" + }, + { + "baseName": { + "id": 6172, + "name": "CrossChainDebtShareManager", + "nodeType": "IdentifierPath", + "referencedDeclaration": 7004, + "src": "1270:26:38" + }, + "id": 6173, + "nodeType": "InheritanceSpecifier", + "src": "1270:26:38" + } + ], + "canonicalName": "ElectionModule", + "contractDependencies": [ + 816, + 5960 + ], + "contractKind": "contract", + "documentation": { + "id": 6165, + "nodeType": "StructuredDocumentation", + "src": "489:690:38", + "text": "@title Module for electing a council, represented by a set of NFT holders\n @notice This extends the base ElectionModule by determining voting power by Synthetix v2 debt shares, both on L1 and on L2.\n @dev The L2 debt shares are read directly from a contract, and the L1 debt shares are read from a merkle tree.\n @dev A snapshot must be set to determine the debt share id to use.\n @dev The merkle proof must also be provided for L1 debt shares before an election.\n @dev L1 EOA debt share holders can use declareAndCast to vote.\n @dev L1 non-EOA debt share holders can use declareAndCastCrossChain to vote, but they need to relay the call through Optimism's messengers." + }, + "fullyImplemented": true, + "id": 6628, + "linearizedBaseContracts": [ + 6628, + 7004, + 7183, + 6665, + 3799, + 68, + 476, + 494, + 5542, + 5860, + 4646, + 5211, + 4264, + 3912, + 6155, + 2663 + ], + "name": "ElectionModule", + "nameLocation": "1188:14:38", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 6175, + "name": "TooManyCandidates", + "nameLocation": "1309:17:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6174, + "nodeType": "ParameterList", + "parameters": [], + "src": "1326:2:38" + }, + "src": "1303:26:38" + }, + { + "id": 6177, + "name": "WrongInitializer", + "nameLocation": "1340:16:38", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 6176, + "nodeType": "ParameterList", + "parameters": [], + "src": "1356:2:38" + }, + "src": "1334:25:38" + }, + { + "baseFunctions": [ + 2391, + 2725 + ], + "body": { + "id": 6206, + "nodeType": "Block", + "src": "1737:42:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6203, + "name": "WrongInitializer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6177, + "src": "1754:16:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1754:18:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6205, + "nodeType": "RevertStatement", + "src": "1747:25:38" + } + ] + }, + "documentation": { + "id": 6178, + "nodeType": "StructuredDocumentation", + "src": "1365:101:38", + "text": "@dev The BaseElectionModule initializer should not be called, and this one must be called instead" + }, + "functionSelector": "ee695137", + "id": 6207, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6199, + "kind": "modifierInvocation", + "modifierName": { + "id": 6198, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "1706:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "1706:9:38" + }, + { + "id": 6201, + "kind": "modifierInvocation", + "modifierName": { + "id": 6200, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "1716:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "1716:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1480:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6197, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6195, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "1669:18:38" + }, + { + "id": 6196, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "1689:15:38" + } + ], + "src": "1660:45:38" + }, + "parameters": { + "id": 6194, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6180, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1514:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6179, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1514:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6182, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1537:13:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6181, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1537:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6185, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1560:16:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6183, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1560:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6184, + "nodeType": "ArrayTypeName", + "src": "1560:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6187, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1586:5:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6186, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1586:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6189, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1601:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6188, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1601:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6191, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1617:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6190, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1617:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6193, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6207, + "src": "1633:6:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6192, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "1633:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + } + ], + "src": "1504:141:38" + }, + "returnParameters": { + "id": 6202, + "nodeType": "ParameterList", + "parameters": [], + "src": "1737:0:38" + }, + "scope": 6628, + "src": "1471:308:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6036 + ], + "body": { + "id": 6247, + "nodeType": "Block", + "src": "2290:325:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6234, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6225, + "src": "2322:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6233, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "2300:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2300:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6236, + "nodeType": "ExpressionStatement", + "src": "2300:40:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6238, + "name": "councilTokenName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6210, + "src": "2390:16:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6239, + "name": "councilTokenSymbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6212, + "src": "2420:18:38", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 6240, + "name": "firstCouncil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6215, + "src": "2452:12:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "id": 6241, + "name": "minimumActiveMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6217, + "src": "2478:20:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 6242, + "name": "nominationPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6219, + "src": "2512:25:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6243, + "name": "votingPeriodStartDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6221, + "src": "2551:21:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + { + "id": 6244, + "name": "epochEndDate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6223, + "src": "2586:12:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + ], + "id": 6237, + "name": "_initializeElectionModule", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2871, + "src": "2351:25:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$_t_array$_t_address_$dyn_memory_ptr_$_t_uint8_$_t_uint64_$_t_uint64_$_t_uint64_$returns$__$", + "typeString": "function (string memory,string memory,address[] memory,uint8,uint64,uint64,uint64)" + } + }, + "id": 6245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2351:257:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6246, + "nodeType": "ExpressionStatement", + "src": "2351:257:38" + } + ] + }, + "documentation": { + "id": 6208, + "nodeType": "StructuredDocumentation", + "src": "1785:110:38", + "text": "@dev Overloads the BaseElectionModule initializer with an additional parameter for the debt share contract" + }, + "functionSelector": "0166451a", + "id": 6248, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6229, + "kind": "modifierInvocation", + "modifierName": { + "id": 6228, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "2259:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "2259:9:38" + }, + { + "id": 6231, + "kind": "modifierInvocation", + "modifierName": { + "id": 6230, + "name": "onlyIfNotInitialized", + "nodeType": "IdentifierPath", + "referencedDeclaration": 62, + "src": "2269:20:38" + }, + "nodeType": "ModifierInvocation", + "src": "2269:20:38" + } + ], + "name": "initializeElectionModule", + "nameLocation": "1909:24:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6227, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2250:8:38" + }, + "parameters": { + "id": 6226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6210, + "mutability": "mutable", + "name": "councilTokenName", + "nameLocation": "1957:16:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1943:30:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6209, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1943:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6212, + "mutability": "mutable", + "name": "councilTokenSymbol", + "nameLocation": "1997:18:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "1983:32:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 6211, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1983:6:38", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6215, + "mutability": "mutable", + "name": "firstCouncil", + "nameLocation": "2042:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2025:29:38", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2025:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6214, + "nodeType": "ArrayTypeName", + "src": "2025:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6217, + "mutability": "mutable", + "name": "minimumActiveMembers", + "nameLocation": "2070:20:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2064:26:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 6216, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "2064:5:38", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6219, + "mutability": "mutable", + "name": "nominationPeriodStartDate", + "nameLocation": "2107:25:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2100:32:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6218, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2100:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6221, + "mutability": "mutable", + "name": "votingPeriodStartDate", + "nameLocation": "2149:21:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2142:28:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6220, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2142:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6223, + "mutability": "mutable", + "name": "epochEndDate", + "nameLocation": "2187:12:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2180:19:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + }, + "typeName": { + "id": 6222, + "name": "uint64", + "nodeType": "ElementaryTypeName", + "src": "2180:6:38", + "typeDescriptions": { + "typeIdentifier": "t_uint64", + "typeString": "uint64" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6225, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "2217:17:38", + "nodeType": "VariableDeclaration", + "scope": 6248, + "src": "2209:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2209:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1933:307:38" + }, + "returnParameters": { + "id": 6232, + "nodeType": "ParameterList", + "parameters": [], + "src": "2290:0:38" + }, + "scope": 6628, + "src": "1900:715:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 2479, + 3273 + ], + "body": { + "id": 6277, + "nodeType": "Block", + "src": "2972:134:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6262, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "2986:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "2986:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3006:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2986:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6270, + "nodeType": "IfStatement", + "src": "2982:78:38", + "trueBody": { + "id": 6269, + "nodeType": "Block", + "src": "3009:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6266, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "3030:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3030:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6268, + "nodeType": "RevertStatement", + "src": "3023:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6272, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3076:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "3076:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6274, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6252, + "src": "3088:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6271, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "3070:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3070:29:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6276, + "nodeType": "ExpressionStatement", + "src": "3070:29:38" + } + ] + }, + "documentation": { + "id": 6249, + "nodeType": "StructuredDocumentation", + "src": "2621:186:38", + "text": "@dev Overrides the BaseElectionModule cast function to only allow 1 candidate to be voted.\n @dev This function is all that needs to be called by L2 debt share holders to vote." + }, + "functionSelector": "84ae670c", + "id": 6278, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6258, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "2947:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "2947:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6260, + "kind": "modifierInvocation", + "modifierName": { + "id": 6257, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "2934:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "2934:33:38" + } + ], + "name": "cast", + "nameLocation": "2821:4:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6256, + "nodeType": "OverrideSpecifier", + "overrides": [ + { + "id": 6254, + "name": "BaseElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 3799, + "src": "2889:18:38" + }, + { + "id": 6255, + "name": "IElectionModule", + "nodeType": "IdentifierPath", + "referencedDeclaration": 2663, + "src": "2909:15:38" + } + ], + "src": "2880:45:38" + }, + "parameters": { + "id": 6253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6252, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "2845:10:38", + "nodeType": "VariableDeclaration", + "scope": 6278, + "src": "2826:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6250, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2826:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6251, + "nodeType": "ArrayTypeName", + "src": "2826:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "2825:31:38" + }, + "returnParameters": { + "id": 6261, + "nodeType": "ParameterList", + "parameters": [], + "src": "2972:0:38" + }, + "scope": 6628, + "src": "2812:294:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6042 + ], + "body": { + "id": 6298, + "nodeType": "Block", + "src": "3391:112:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6291, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3423:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6290, + "name": "_setDebtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7150, + "src": "3401:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3401:40:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6293, + "nodeType": "ExpressionStatement", + "src": "3401:40:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6295, + "name": "debtShareContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6280, + "src": "3478:17:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6294, + "name": "DebtShareContractSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7024, + "src": "3457:20:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3457:39:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6297, + "nodeType": "EmitStatement", + "src": "3452:44:38" + } + ] + }, + "functionSelector": "0ebf4796", + "id": 6299, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6284, + "kind": "modifierInvocation", + "modifierName": { + "id": 6283, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3325:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3325:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6286, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3356:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6287, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Administration", + "nodeType": "MemberAccess", + "referencedDeclaration": 3919, + "src": "3356:29:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6288, + "kind": "modifierInvocation", + "modifierName": { + "id": 6285, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3343:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3343:43:38" + } + ], + "name": "setDebtShareContract", + "nameLocation": "3235:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6282, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3308:8:38" + }, + "parameters": { + "id": 6281, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6280, + "mutability": "mutable", + "name": "debtShareContract", + "nameLocation": "3264:17:38", + "nodeType": "VariableDeclaration", + "scope": 6299, + "src": "3256:25:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3256:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3255:27:38" + }, + "returnParameters": { + "id": 6289, + "nodeType": "ParameterList", + "parameters": [], + "src": "3391:0:38" + }, + "scope": 6628, + "src": "3226:277:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6048 + ], + "body": { + "id": 6312, + "nodeType": "Block", + "src": "3582:68:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6307, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "3607:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3607:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6309, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareContract", + "nodeType": "MemberAccess", + "referencedDeclaration": 6636, + "src": "3607:35:38", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IDebtShare_$6009", + "typeString": "contract IDebtShare" + } + ], + "id": 6306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3599:7:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 6305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3599:7:38", + "typeDescriptions": {} + } + }, + "id": 6310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3599:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6304, + "id": 6311, + "nodeType": "Return", + "src": "3592:51:38" + } + ] + }, + "functionSelector": "aeff252a", + "id": 6313, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareContract", + "nameLocation": "3518:20:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6301, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3555:8:38" + }, + "parameters": { + "id": 6300, + "nodeType": "ParameterList", + "parameters": [], + "src": "3538:2:38" + }, + "returnParameters": { + "id": 6304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6303, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6313, + "src": "3573:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3572:9:38" + }, + "scope": 6628, + "src": "3509:141:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6054 + ], + "body": { + "id": 6329, + "nodeType": "Block", + "src": "3773:52:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6326, + "name": "snapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6315, + "src": "3807:10:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6325, + "name": "_setDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7060, + "src": "3783:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 6327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3783:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6328, + "nodeType": "ExpressionStatement", + "src": "3783:35:38" + } + ] + }, + "functionSelector": "a0f42837", + "id": 6330, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6319, + "kind": "modifierInvocation", + "modifierName": { + "id": 6318, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "3723:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "3723:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6321, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "3746:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "3746:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6323, + "kind": "modifierInvocation", + "modifierName": { + "id": 6320, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "3733:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "3733:39:38" + } + ], + "name": "setDebtShareSnapshotId", + "nameLocation": "3665:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6317, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3714:8:38" + }, + "parameters": { + "id": 6316, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6315, + "mutability": "mutable", + "name": "snapshotId", + "nameLocation": "3693:10:38", + "nodeType": "VariableDeclaration", + "scope": 6330, + "src": "3688:15:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6314, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3688:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3687:17:38" + }, + "returnParameters": { + "id": 6324, + "nodeType": "ParameterList", + "parameters": [], + "src": "3773:0:38" + }, + "scope": 6628, + "src": "3656:169:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6060 + ], + "body": { + "id": 6339, + "nodeType": "Block", + "src": "3903:49:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6336, + "name": "_getDebtShareSnapshotId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7090, + "src": "3920:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3920:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6335, + "id": 6338, + "nodeType": "Return", + "src": "3913:32:38" + } + ] + }, + "functionSelector": "dfe7cd3a", + "id": 6340, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShareSnapshotId", + "nameLocation": "3840:22:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6332, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3879:8:38" + }, + "parameters": { + "id": 6331, + "nodeType": "ParameterList", + "parameters": [], + "src": "3862:2:38" + }, + "returnParameters": { + "id": 6335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6334, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6340, + "src": "3897:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6333, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3897:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "3896:6:38" + }, + "scope": 6628, + "src": "3831:121:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6068 + ], + "body": { + "id": 6352, + "nodeType": "Block", + "src": "4032:43:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6349, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6342, + "src": "4063:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6348, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "4049:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4049:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6347, + "id": 6351, + "nodeType": "Return", + "src": "4042:26:38" + } + ] + }, + "functionSelector": "f2e56dea", + "id": 6353, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDebtShare", + "nameLocation": "3967:12:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6344, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4008:8:38" + }, + "parameters": { + "id": 6343, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6342, + "mutability": "mutable", + "name": "user", + "nameLocation": "3988:4:38", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "3980:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6341, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3980:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "3979:14:38" + }, + "returnParameters": { + "id": 6347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6346, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6353, + "src": "4026:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6345, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4026:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4025:6:38" + }, + "scope": 6628, + "src": "3958:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6076 + ], + "body": { + "id": 6379, + "nodeType": "Block", + "src": "4391:173:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6368, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4435:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6369, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4447:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6367, + "name": "_setCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6728, + "src": "4401:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256)" + } + }, + "id": 6370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4401:58:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6371, + "nodeType": "ExpressionStatement", + "src": "4401:58:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6373, + "name": "merkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6355, + "src": "4508:10:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 6374, + "name": "blocknumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6357, + "src": "4520:11:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6375, + "name": "_getCurrentEpochIndex", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4117, + "src": "4533:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4533:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6372, + "name": "CrossChainDebtShareMerkleRootSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6692, + "src": "4475:32:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (bytes32,uint256,uint256)" + } + }, + "id": 6377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4475:82:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6378, + "nodeType": "EmitStatement", + "src": "4470:87:38" + } + ] + }, + "functionSelector": "33f3f3de", + "id": 6380, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6361, + "kind": "modifierInvocation", + "modifierName": { + "id": 6360, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "4329:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "4329:9:38" + }, + { + "arguments": [ + { + "expression": { + "id": 6363, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "4360:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6364, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Nomination", + "nodeType": "MemberAccess", + "referencedDeclaration": 3920, + "src": "4360:25:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6365, + "kind": "modifierInvocation", + "modifierName": { + "id": 6362, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "4347:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "4347:39:38" + } + ], + "name": "setCrossChainDebtShareMerkleRoot", + "nameLocation": "4216:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6359, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4312:8:38" + }, + "parameters": { + "id": 6358, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6355, + "mutability": "mutable", + "name": "merkleRoot", + "nameLocation": "4257:10:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4249:18:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6354, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4249:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6357, + "mutability": "mutable", + "name": "blocknumber", + "nameLocation": "4274:11:38", + "nodeType": "VariableDeclaration", + "scope": 6380, + "src": "4269:16:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6356, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4269:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4248:38:38" + }, + "returnParameters": { + "id": 6366, + "nodeType": "ParameterList", + "parameters": [], + "src": "4391:0:38" + }, + "scope": 6628, + "src": "4207:357:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6082 + ], + "body": { + "id": 6389, + "nodeType": "Block", + "src": "4655:59:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6386, + "name": "_getCrossChainDebtShareMerkleRoot", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6828, + "src": "4672:33:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_bytes32_$", + "typeString": "function () view returns (bytes32)" + } + }, + "id": 6387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4672:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 6385, + "id": 6388, + "nodeType": "Return", + "src": "4665:42:38" + } + ] + }, + "functionSelector": "b55c43d2", + "id": 6390, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRoot", + "nameLocation": "4579:32:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6382, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4628:8:38" + }, + "parameters": { + "id": 6381, + "nodeType": "ParameterList", + "parameters": [], + "src": "4611:2:38" + }, + "returnParameters": { + "id": 6385, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6384, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6390, + "src": "4646:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 6383, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4646:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "4645:9:38" + }, + "scope": 6628, + "src": "4570:144:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6088 + ], + "body": { + "id": 6399, + "nodeType": "Block", + "src": "4813:70:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6396, + "name": "_getCrossChainDebtShareMerkleRootBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6856, + "src": "4830:44:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 6397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4830:46:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6395, + "id": 6398, + "nodeType": "Return", + "src": "4823:53:38" + } + ] + }, + "functionSelector": "d9617851", + "id": 6400, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossChainDebtShareMerkleRootBlockNumber", + "nameLocation": "4729:43:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6392, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4789:8:38" + }, + "parameters": { + "id": 6391, + "nodeType": "ParameterList", + "parameters": [], + "src": "4772:2:38" + }, + "returnParameters": { + "id": 6395, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6394, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6400, + "src": "4807:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6393, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4807:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "4806:6:38" + }, + "scope": 6628, + "src": "4720:163:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6099 + ], + "body": { + "id": 6426, + "nodeType": "Block", + "src": "5070:134:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6416, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5108:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6417, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5114:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6418, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6407, + "src": "5125:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6415, + "name": "_declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6800, + "src": "5080:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5080:57:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6420, + "nodeType": "ExpressionStatement", + "src": "5080:57:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6422, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6402, + "src": "5181:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6423, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6404, + "src": "5187:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 6421, + "name": "CrossChainDebtShareDeclared", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6698, + "src": "5153:27:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 6424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5153:44:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6425, + "nodeType": "EmitStatement", + "src": "5148:49:38" + } + ] + }, + "functionSelector": "7d264ccb", + "id": 6427, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6411, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5049:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5049:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6413, + "kind": "modifierInvocation", + "modifierName": { + "id": 6410, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5036:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5036:33:38" + } + ], + "name": "declareCrossChainDebtShare", + "nameLocation": "4898:26:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6409, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5027:8:38" + }, + "parameters": { + "id": 6408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6402, + "mutability": "mutable", + "name": "user", + "nameLocation": "4942:4:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4934:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6401, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4934:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6404, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "4964:9:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4956:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4956:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6407, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5002:11:38", + "nodeType": "VariableDeclaration", + "scope": 6427, + "src": "4983:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6405, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "4983:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6406, + "nodeType": "ArrayTypeName", + "src": "4983:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + } + ], + "src": "4924:95:38" + }, + "returnParameters": { + "id": 6414, + "nodeType": "ParameterList", + "parameters": [], + "src": "5070:0:38" + }, + "scope": 6628, + "src": "4889:315:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6107 + ], + "body": { + "id": 6440, + "nodeType": "Block", + "src": "5451:61:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6437, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6430, + "src": "5500:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6436, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "5468:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5468:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6435, + "id": 6439, + "nodeType": "Return", + "src": "5461:44:38" + } + ] + }, + "documentation": { + "id": 6428, + "nodeType": "StructuredDocumentation", + "src": "5210:144:38", + "text": "@dev L1 EOA debt share holders need to call this function before calling cast, or can call declareAndCast to avoid having to make two calls." + }, + "functionSelector": "796c5c80", + "id": 6441, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getDeclaredCrossChainDebtShare", + "nameLocation": "5368:30:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6432, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5427:8:38" + }, + "parameters": { + "id": 6431, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6430, + "mutability": "mutable", + "name": "user", + "nameLocation": "5407:4:38", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5399:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5399:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5398:14:38" + }, + "returnParameters": { + "id": 6435, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6434, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6441, + "src": "5445:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6433, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5445:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "5444:6:38" + }, + "scope": 6628, + "src": "5359:153:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6119 + ], + "body": { + "id": 6469, + "nodeType": "Block", + "src": "5782:106:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "expression": { + "id": 6459, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5819:3:38", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 6460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "src": "5819:10:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6461, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6444, + "src": "5831:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6462, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6447, + "src": "5842:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6458, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "5792:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5792:62:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6464, + "nodeType": "ExpressionStatement", + "src": "5792:62:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6466, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6450, + "src": "5870:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6465, + "name": "cast", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 6278 + ], + "referencedDeclaration": 6278, + "src": "5865:4:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address[] calldata)" + } + }, + "id": 6467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5865:16:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6468, + "nodeType": "ExpressionStatement", + "src": "5865:16:38" + } + ] + }, + "documentation": { + "id": 6442, + "nodeType": "StructuredDocumentation", + "src": "5518:73:38", + "text": "@dev L1 EOA debt share holders can call this single function to vote." + }, + "functionSelector": "9a9a8e1a", + "id": 6470, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6454, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "5761:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "5761:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6456, + "kind": "modifierInvocation", + "modifierName": { + "id": 6453, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "5748:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "5748:33:38" + } + ], + "name": "declareAndCast", + "nameLocation": "5605:14:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6452, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5739:8:38" + }, + "parameters": { + "id": 6451, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6444, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "5637:9:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5629:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5629:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6447, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "5675:11:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5656:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6445, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "5656:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6446, + "nodeType": "ArrayTypeName", + "src": "5656:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6450, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "5715:10:38", + "nodeType": "VariableDeclaration", + "scope": 6470, + "src": "5696:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5696:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6449, + "nodeType": "ArrayTypeName", + "src": "5696:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "5619:112:38" + }, + "returnParameters": { + "id": 6457, + "nodeType": "ParameterList", + "parameters": [], + "src": "5782:0:38" + }, + "scope": 6628, + "src": "5596:292:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6125 + ], + "body": { + "id": 6485, + "nodeType": "Block", + "src": "5965:102:38", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 6478, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6000:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6477, + "name": "_setCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6939, + "src": "5975:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5975:35:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6480, + "nodeType": "ExpressionStatement", + "src": "5975:35:38" + }, + { + "eventCall": { + "arguments": [ + { + "id": 6482, + "name": "messenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6472, + "src": "6050:9:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6481, + "name": "CrossDomainMessengerSet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4080, + "src": "6026:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 6483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6026:34:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6484, + "nodeType": "EmitStatement", + "src": "6021:39:38" + } + ] + }, + "functionSelector": "211de0b4", + "id": 6486, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 6475, + "kind": "modifierInvocation", + "modifierName": { + "id": 6474, + "name": "onlyOwner", + "nodeType": "IdentifierPath", + "referencedDeclaration": 427, + "src": "5955:9:38" + }, + "nodeType": "ModifierInvocation", + "src": "5955:9:38" + } + ], + "name": "setCrossDomainMessenger", + "nameLocation": "5903:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6472, + "mutability": "mutable", + "name": "messenger", + "nameLocation": "5935:9:38", + "nodeType": "VariableDeclaration", + "scope": 6486, + "src": "5927:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6471, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5927:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "5926:19:38" + }, + "returnParameters": { + "id": 6476, + "nodeType": "ParameterList", + "parameters": [], + "src": "5965:0:38" + }, + "scope": 6628, + "src": "5894:173:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6131 + ], + "body": { + "id": 6494, + "nodeType": "Block", + "src": "6140:50:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6491, + "name": "_getCrossDomainMessenger", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6952, + "src": "6157:24:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", + "typeString": "function () view returns (address)" + } + }, + "id": 6492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6157:26:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 6490, + "id": 6493, + "nodeType": "Return", + "src": "6150:33:38" + } + ] + }, + "functionSelector": "f675fa62", + "id": 6495, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCrossDomainMessenger", + "nameLocation": "6082:23:38", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6487, + "nodeType": "ParameterList", + "parameters": [], + "src": "6105:2:38" + }, + "returnParameters": { + "id": 6490, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6489, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6495, + "src": "6131:7:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6131:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "6130:9:38" + }, + "scope": 6628, + "src": "6073:117:38", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "baseFunctions": [ + 6145 + ], + "body": { + "id": 6538, + "nodeType": "Block", + "src": "6870:377:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6514, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "6884:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "6884:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6904:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6884:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6522, + "nodeType": "IfStatement", + "src": "6880:78:38", + "trueBody": { + "id": 6521, + "nodeType": "Block", + "src": "6907:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6518, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "6928:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6928:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6520, + "nodeType": "RevertStatement", + "src": "6921:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6524, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7134:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6523, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "7107:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7107:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6526, + "nodeType": "ExpressionStatement", + "src": "7107:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6528, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7177:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6529, + "name": "debtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6500, + "src": "7183:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 6530, + "name": "merkleProof", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6503, + "src": "7194:11:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[] calldata" + } + ], + "id": 6527, + "name": "declareCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6427, + "src": "7150:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_array$_t_bytes32_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes32[] calldata)" + } + }, + "id": 6531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7150:56:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6532, + "nodeType": "ExpressionStatement", + "src": "7150:56:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6534, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6498, + "src": "7223:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6535, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6506, + "src": "7229:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6533, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "7217:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7217:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6537, + "nodeType": "ExpressionStatement", + "src": "7217:23:38" + } + ] + }, + "documentation": { + "id": 6496, + "nodeType": "StructuredDocumentation", + "src": "6196:454:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"declareAndCastRelayed(address,uint256,bytes32[],address[])\", user, debtShare, merkleProof, candidates)), 1000000)." + }, + "functionSelector": "4b144674", + "id": 6539, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6510, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "6849:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "6849:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6512, + "kind": "modifierInvocation", + "modifierName": { + "id": 6509, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "6836:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "6836:33:38" + } + ], + "name": "declareAndCastRelayed", + "nameLocation": "6664:21:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6508, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "6827:8:38" + }, + "parameters": { + "id": 6507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6498, + "mutability": "mutable", + "name": "user", + "nameLocation": "6703:4:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6695:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6500, + "mutability": "mutable", + "name": "debtShare", + "nameLocation": "6725:9:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6717:17:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6499, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6717:7:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6503, + "mutability": "mutable", + "name": "merkleProof", + "nameLocation": "6763:11:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6744:30:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_calldata_ptr", + "typeString": "bytes32[]" + }, + "typeName": { + "baseType": { + "id": 6501, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "6744:7:38", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 6502, + "nodeType": "ArrayTypeName", + "src": "6744:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr", + "typeString": "bytes32[]" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6506, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "6803:10:38", + "nodeType": "VariableDeclaration", + "scope": 6539, + "src": "6784:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6504, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6784:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6505, + "nodeType": "ArrayTypeName", + "src": "6784:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "6685:134:38" + }, + "returnParameters": { + "id": 6513, + "nodeType": "ParameterList", + "parameters": [], + "src": "6870:0:38" + }, + "scope": 6628, + "src": "6655:592:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 6154 + ], + "body": { + "id": 6571, + "nodeType": "Block", + "src": "7776:310:38", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "expression": { + "id": 6553, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "7790:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + }, + "id": 6554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "src": "7790:17:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "hexValue": "31", + "id": 6555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7810:1:38", + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "7790:21:38", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 6561, + "nodeType": "IfStatement", + "src": "7786:78:38", + "trueBody": { + "id": 6560, + "nodeType": "Block", + "src": "7813:51:38", + "statements": [ + { + "errorCall": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6557, + "name": "TooManyCandidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6175, + "src": "7834:17:38", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7834:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6559, + "nodeType": "RevertStatement", + "src": "7827:26:38" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "id": 6563, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8040:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6562, + "name": "_validateCrossChainMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7003, + "src": "8013:26:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$__$", + "typeString": "function (address) view" + } + }, + "id": 6564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8013:32:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6565, + "nodeType": "ExpressionStatement", + "src": "8013:32:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6567, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6542, + "src": "8062:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 6568, + "name": "candidates", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6545, + "src": "8068:10:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[] calldata" + } + ], + "id": 6566, + "name": "_cast", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3332, + "src": "8056:5:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_array$_t_address_$dyn_calldata_ptr_$returns$__$", + "typeString": "function (address,address[] calldata)" + } + }, + "id": 6569, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8056:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6570, + "nodeType": "ExpressionStatement", + "src": "8056:23:38" + } + ] + }, + "documentation": { + "id": 6540, + "nodeType": "StructuredDocumentation", + "src": "7253:402:38", + "text": "@dev L1 non-EOA debt share holders can use Optimism cross chain messengers to initiate a message on L1, and finalize it in this function to vote.\n @dev Call Proxy__OVM_L1CrossDomainMessenger 0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1 on L1 with ICrossDomainMessenger.sendMessage(, abi.encodeWithSignature(\"castRelayed(address,address[])\", user, candidates)), 1000000)." + }, + "functionSelector": "5a2b3fd7", + "id": 6572, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": [ + { + "expression": { + "id": 6549, + "name": "ElectionPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3923, + "src": "7755:14:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_ElectionPeriod_$3923_$", + "typeString": "type(enum ElectionBase.ElectionPeriod)" + } + }, + "id": 6550, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Vote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3921, + "src": "7755:19:38", + "typeDescriptions": { + "typeIdentifier": "t_enum$_ElectionPeriod_$3923", + "typeString": "enum ElectionBase.ElectionPeriod" + } + } + ], + "id": 6551, + "kind": "modifierInvocation", + "modifierName": { + "id": 6548, + "name": "onlyInPeriod", + "nodeType": "IdentifierPath", + "referencedDeclaration": 4665, + "src": "7742:12:38" + }, + "nodeType": "ModifierInvocation", + "src": "7742:33:38" + } + ], + "name": "castRelayed", + "nameLocation": "7669:11:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6547, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "7733:8:38" + }, + "parameters": { + "id": 6546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6542, + "mutability": "mutable", + "name": "user", + "nameLocation": "7689:4:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7681:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6541, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7681:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6545, + "mutability": "mutable", + "name": "candidates", + "nameLocation": "7714:10:38", + "nodeType": "VariableDeclaration", + "scope": 6572, + "src": "7695:29:38", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 6543, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7695:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 6544, + "nodeType": "ArrayTypeName", + "src": "7695:9:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "visibility": "internal" + } + ], + "src": "7680:45:38" + }, + "returnParameters": { + "id": 6552, + "nodeType": "ParameterList", + "parameters": [], + "src": "7776:0:38" + }, + "scope": 6628, + "src": "7660:426:38", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 5859 + ], + "body": { + "id": 6596, + "nodeType": "Block", + "src": "8426:135:38", + "statements": [ + { + "assignments": [ + 6582 + ], + "declarations": [ + { + "constant": false, + "id": 6582, + "mutability": "mutable", + "name": "votePower", + "nameLocation": "8441:9:38", + "nodeType": "VariableDeclaration", + "scope": 6596, + "src": "8436:14:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6581, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8436:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 6590, + "initialValue": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 6589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "arguments": [ + { + "id": 6584, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8467:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6583, + "name": "_getDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7182, + "src": "8453:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8453:19:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "arguments": [ + { + "id": 6587, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6575, + "src": "8507:4:38", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 6586, + "name": "_getDeclaredCrossChainDebtShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6879, + "src": "8475:31:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 6588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8475:37:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8453:59:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8436:76:38" + }, + { + "expression": { + "arguments": [ + { + "id": 6593, + "name": "votePower", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6582, + "src": "8544:9:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 6591, + "name": "MathUtil", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1708, + "src": "8530:8:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MathUtil_$1708_$", + "typeString": "type(library MathUtil)" + } + }, + "id": 6592, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sqrt", + "nodeType": "MemberAccess", + "referencedDeclaration": 1707, + "src": "8530:13:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 6594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8530:24:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 6580, + "id": 6595, + "nodeType": "Return", + "src": "8523:31:38" + } + ] + }, + "documentation": { + "id": 6573, + "nodeType": "StructuredDocumentation", + "src": "8203:135:38", + "text": "@dev Overrides the user's voting power by combining local chain debt share with debt shares in other chains, quadratically filtered" + }, + "id": 6597, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getVotePower", + "nameLocation": "8352:13:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6577, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8402:8:38" + }, + "parameters": { + "id": 6576, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6575, + "mutability": "mutable", + "name": "user", + "nameLocation": "8374:4:38", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8366:12:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6574, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8366:7:38", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "8365:14:38" + }, + "returnParameters": { + "id": 6580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 6579, + "mutability": "mutable", + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "VariableDeclaration", + "scope": 6597, + "src": "8420:4:38", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6578, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8420:4:38", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "8419:6:38" + }, + "scope": 6628, + "src": "8343:218:38", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "baseFunctions": [ + 4104 + ], + "body": { + "id": 6626, + "nodeType": "Block", + "src": "8620:181:38", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "id": 6601, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "8630:5:38", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_super$_ElectionModule_$6628_$", + "typeString": "type(contract super ElectionModule)" + } + }, + "id": 6603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_createNewEpoch", + "nodeType": "MemberAccess", + "referencedDeclaration": 4104, + "src": "8630:21:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 6604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8630:23:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 6605, + "nodeType": "ExpressionStatement", + "src": "8630:23:38" + }, + { + "assignments": [ + 6608 + ], + "declarations": [ + { + "constant": false, + "id": 6608, + "mutability": "mutable", + "name": "store", + "nameLocation": "8687:5:38", + "nodeType": "VariableDeclaration", + "scope": 6626, + "src": "8664:28:38", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + }, + "typeName": { + "id": 6607, + "nodeType": "UserDefinedTypeName", + "pathNode": { + "id": 6606, + "name": "DebtShareStore", + "nodeType": "IdentifierPath", + "referencedDeclaration": 6647, + "src": "8664:14:38" + }, + "referencedDeclaration": 6647, + "src": "8664:14:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore" + } + }, + "visibility": "internal" + } + ], + "id": 6611, + "initialValue": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 6609, + "name": "_debtShareStore", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6664, + "src": "8695:15:38", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_DebtShareStore_$6647_storage_ptr_$", + "typeString": "function () pure returns (struct DebtShareStorage.DebtShareStore storage pointer)" + } + }, + "id": 6610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8695:17:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8664:48:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6612, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8723:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "debtShareIds", + "nodeType": "MemberAccess", + "referencedDeclaration": 6639, + "src": "8723:18:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint128_$dyn_storage", + "typeString": "uint128[] storage ref" + } + }, + "id": 6616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8723:23:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_uint128_$dyn_storage_ptr_$returns$_t_uint128_$bound_to$_t_array$_t_uint128_$dyn_storage_ptr_$", + "typeString": "function (uint128[] storage pointer) returns (uint128)" + } + }, + "id": 6617, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8723:25:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 6618, + "nodeType": "ExpressionStatement", + "src": "8723:25:38" + }, + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "expression": { + "id": 6619, + "name": "store", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6608, + "src": "8758:5:38", + "typeDescriptions": { + "typeIdentifier": "t_struct$_DebtShareStore_$6647_storage_ptr", + "typeString": "struct DebtShareStorage.DebtShareStore storage pointer" + } + }, + "id": 6622, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "crossChainDebtShareData", + "nodeType": "MemberAccess", + "referencedDeclaration": 6643, + "src": "8758:29:38", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage ref" + } + }, + "id": 6623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "src": "8758:34:38", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$returns$_t_struct$_CrossChainDebtShareData_$6656_storage_$bound_to$_t_array$_t_struct$_CrossChainDebtShareData_$6656_storage_$dyn_storage_ptr_$", + "typeString": "function (struct DebtShareStorage.CrossChainDebtShareData storage ref[] storage pointer) returns (struct DebtShareStorage.CrossChainDebtShareData storage ref)" + } + }, + "id": 6624, + "isConstant": false, + "isLValue": true, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8758:36:38", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_CrossChainDebtShareData_$6656_storage", + "typeString": "struct DebtShareStorage.CrossChainDebtShareData storage ref" + } + }, + "id": 6625, + "nodeType": "ExpressionStatement", + "src": "8758:36:38" + } + ] + }, + "id": 6627, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_createNewEpoch", + "nameLocation": "8576:15:38", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 6599, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "8611:8:38" + }, + "parameters": { + "id": 6598, + "nodeType": "ParameterList", + "parameters": [], + "src": "8591:2:38" + }, + "returnParameters": { + "id": 6600, + "nodeType": "ParameterList", + "parameters": [], + "src": "8620:0:38" + }, + "scope": 6628, + "src": "8567:234:38", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 6629, + "src": "1179:7624:38", + "usedErrors": [ + 5, + 10, + 14, + 19, + 24, + 29, + 31, + 1995, + 1997, + 1999, + 3925, + 3927, + 3929, + 3931, + 3933, + 3935, + 3937, + 3939, + 3941, + 3943, + 3945, + 3947, + 3949, + 3951, + 3953, + 3955, + 3957, + 3959, + 6175, + 6177, + 6680, + 6682, + 6684, + 7018, + 7020 + ] + } + ], + "src": "31:8773:38" + } + }, + "contracts/Router.sol": { + "sourceCode": "//SPDX-License-Identifier: Unlicense\npragma solidity ^0.8.0;\n\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n// GENERATED CODE - do not edit manually!!\n// --------------------------------------------------------------------------------\n// --------------------------------------------------------------------------------\n\ncontract Router {\n error UnknownSelector(bytes4 sel);\n\n address private constant _ELECTION_INSPECTOR_MODULE = 0x79f1d073a1493D112f07743c784dE81cb56147d5;\n address private constant _ELECTION_MODULE = 0xCc62313D5c88a07faBb4Bb50631FB13f8bF9f393;\n address private constant _OWNER_MODULE = 0x4D7a0980DB5Cb48413DC96f784792dB4b1Fa68E1;\n address private constant _UPGRADE_MODULE = 0x8A5609A110181839599064Bf6bE25ddF4cB73356;\n\n fallback() external payable {\n _forward();\n }\n\n receive() external payable {\n _forward();\n }\n\n function _forward() internal {\n // Lookup table: Function selector => implementation contract\n bytes4 sig4 = msg.sig;\n address implementation;\n\n assembly {\n let sig32 := shr(224, sig4)\n\n function findImplementation(sig) -> result {\n if lt(sig,0x85160425) {\n if lt(sig,0x447068ef) {\n if lt(sig,0x211de0b4) {\n if lt(sig,0x0ebf4796) {\n switch sig\n case 0x0166451a { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0x0438d06e { result := _ELECTION_MODULE } // ElectionModule.setMinimumActiveMembers()\n case 0x086146d2 { result := _ELECTION_MODULE } // ElectionModule.getCurrentPeriod()\n case 0x09eef43e { result := _ELECTION_MODULE } // ElectionModule.hasVoted()\n case 0x0a8b471a { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotCandidatesInEpoch()\n leave\n }\n switch sig\n case 0x0ebf4796 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareContract()\n case 0x0f98dfba { result := _ELECTION_MODULE } // ElectionModule.getDefaultBallotEvaluationBatchSize()\n case 0x1209644e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.hasVotedInEpoch()\n case 0x1627540c { result := _OWNER_MODULE } // OwnerModule.nominateNewOwner()\n case 0x205569c2 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.wasNominated()\n leave\n }\n if lt(sig,0x362c906d) {\n switch sig\n case 0x211de0b4 { result := _ELECTION_MODULE } // ElectionModule.setCrossDomainMessenger()\n case 0x2810e1d6 { result := _ELECTION_MODULE } // ElectionModule.resolve()\n case 0x2c3c5ba3 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotesInEpoch()\n case 0x33f3f3de { result := _ELECTION_MODULE } // ElectionModule.setCrossChainDebtShareMerkleRoot()\n case 0x35eb2824 { result := _OWNER_MODULE } // OwnerModule.isOwnerModuleInitialized()\n leave\n }\n switch sig\n case 0x362c906d { result := _ELECTION_MODULE } // ElectionModule.getEpochEndDate()\n case 0x3659cfe6 { result := _UPGRADE_MODULE } // UpgradeModule.upgradeTo()\n case 0x37143233 { result := _ELECTION_MODULE } // ElectionModule.evaluate()\n case 0x3a3e6c81 { result := _ELECTION_MODULE } // ElectionModule.isNominated()\n case 0x3ac1c5fe { result := _ELECTION_MODULE } // ElectionModule.setMaxDateAdjustmentTolerance()\n leave\n }\n if lt(sig,0x655aaaca) {\n if lt(sig,0x54520478) {\n switch sig\n case 0x447068ef { result := _ELECTION_MODULE } // ElectionModule.getNextEpochSeatCount()\n case 0x49aed35c { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getBallotVotedAtEpoch()\n case 0x4b144674 { result := _ELECTION_MODULE } // ElectionModule.declareAndCastRelayed()\n case 0x4b5dacac { result := _ELECTION_MODULE } // ElectionModule.setNextEpochSeatCount()\n case 0x53a47bb7 { result := _OWNER_MODULE } // OwnerModule.nominatedOwner()\n leave\n }\n switch sig\n case 0x54520478 { result := _ELECTION_MODULE } // ElectionModule.upgradeCouncilToken()\n case 0x5a2b3fd7 { result := _ELECTION_MODULE } // ElectionModule.castRelayed()\n case 0x606a6b76 { result := _ELECTION_MODULE } // ElectionModule.getCouncilMembers()\n case 0x624bd96d { result := _OWNER_MODULE } // OwnerModule.initializeOwnerModule()\n case 0x64deab73 { result := _ELECTION_MODULE } // ElectionModule.setDefaultBallotEvaluationBatchSize()\n leave\n }\n if lt(sig,0x79ba5097) {\n switch sig\n case 0x655aaaca { result := _ELECTION_MODULE } // ElectionModule.getBallotCandidates()\n case 0x714d8d0e { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochStartDateForIndex()\n case 0x718fe928 { result := _OWNER_MODULE } // OwnerModule.renounceNomination()\n case 0x793b9a9d { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getCandidateVotesInEpoch()\n case 0x796c5c80 { result := _ELECTION_MODULE } // ElectionModule.getDeclaredCrossChainDebtShare()\n leave\n }\n switch sig\n case 0x79ba5097 { result := _OWNER_MODULE } // OwnerModule.acceptOwnership()\n case 0x7a3bc0ee { result := _ELECTION_MODULE } // ElectionModule.getBallotVotes()\n case 0x7d264ccb { result := _ELECTION_MODULE } // ElectionModule.declareCrossChainDebtShare()\n case 0x82e28473 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getVotingPeriodStartDateForIndex()\n case 0x84ae670c { result := _ELECTION_MODULE } // ElectionModule.cast()\n leave\n }\n if lt(sig,0xca80a2ed) {\n if lt(sig,0xaaf10f42) {\n if lt(sig,0x9636f67c) {\n switch sig\n case 0x85160425 { result := _ELECTION_MODULE } // ElectionModule.getMinimumActiveMembers()\n case 0x8625c053 { result := _ELECTION_MODULE } // ElectionModule.getMinEpochDurations()\n case 0x8da5cb5b { result := _OWNER_MODULE } // OwnerModule.owner()\n case 0x8f701997 { result := _ELECTION_MODULE } // ElectionModule.tweakEpochSchedule()\n case 0x95ff6584 { result := _ELECTION_MODULE } // ElectionModule.getBallotVoted()\n leave\n }\n switch sig\n case 0x9636f67c { result := _ELECTION_MODULE } // ElectionModule.getNominees()\n case 0x9a25eaf3 { result := _ELECTION_MODULE } // ElectionModule.dismissMembers()\n case 0x9a9a8e1a { result := _ELECTION_MODULE } // ElectionModule.declareAndCast()\n case 0xa0f42837 { result := _ELECTION_MODULE } // ElectionModule.setDebtShareSnapshotId()\n case 0xa25a9f3a { result := _ELECTION_MODULE } // ElectionModule.setMinEpochDurations()\n leave\n }\n if lt(sig,0xbb9c0920) {\n switch sig\n case 0xaaf10f42 { result := _UPGRADE_MODULE } // UpgradeModule.getImplementation()\n case 0xaeff252a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareContract()\n case 0xb55c43d2 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRoot()\n case 0xb749be55 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNominationPeriodStartDateForIndex()\n case 0xba9a5b25 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getEpochEndDateForIndex()\n leave\n }\n switch sig\n case 0xbb9c0920 { result := _ELECTION_MODULE } // ElectionModule.getVotePower()\n case 0xc07de0d3 { result := _ELECTION_MODULE } // ElectionModule.getCouncilToken()\n case 0xc14d0528 { result := _ELECTION_MODULE } // ElectionModule.modifyEpochSchedule()\n case 0xc5798523 { result := _ELECTION_MODULE } // ElectionModule.isElectionModuleInitialized()\n case 0xc7f62cda { result := _UPGRADE_MODULE } // UpgradeModule.simulateUpgradeTo()\n leave\n }\n if lt(sig,0xe420d7f9) {\n if lt(sig,0xd83eb231) {\n switch sig\n case 0xca80a2ed { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getNomineesAtEpoch()\n case 0xcce32c52 { result := _ELECTION_INSPECTOR_MODULE } // ElectionInspectorModule.getElectionWinnersInEpoch()\n case 0xce04e44c { result := _ELECTION_MODULE } // ElectionModule.getEpochStartDate()\n case 0xd11801cf { result := _ELECTION_MODULE } // ElectionModule.withdrawNomination()\n case 0xd82f25f0 { result := _ELECTION_MODULE } // ElectionModule.getCandidateVotes()\n leave\n }\n switch sig\n case 0xd83eb231 { result := _ELECTION_MODULE } // ElectionModule.withdrawVote()\n case 0xd9617851 { result := _ELECTION_MODULE } // ElectionModule.getCrossChainDebtShareMerkleRootBlockNumber()\n case 0xdfe7cd3a { result := _ELECTION_MODULE } // ElectionModule.getDebtShareSnapshotId()\n case 0xe1509015 { result := _ELECTION_MODULE } // ElectionModule.getVotingPeriodStartDate()\n case 0xe327b585 { result := _ELECTION_MODULE } // ElectionModule.isElectionEvaluated()\n leave\n }\n switch sig\n case 0xe420d7f9 { result := _ELECTION_MODULE } // ElectionModule.getNominationPeriodStartDate()\n case 0xe9544a51 { result := _ELECTION_MODULE } // ElectionModule.getMaxDateAdjustmentTolerance()\n case 0xedc968ba { result := _ELECTION_MODULE } // ElectionModule.calculateBallotId()\n case 0xee695137 { result := _ELECTION_MODULE } // ElectionModule.initializeElectionModule()\n case 0xf2516dbf { result := _ELECTION_MODULE } // ElectionModule.getElectionWinners()\n case 0xf2e56dea { result := _ELECTION_MODULE } // ElectionModule.getDebtShare()\n case 0xf675fa62 { result := _ELECTION_MODULE } // ElectionModule.getCrossDomainMessenger()\n case 0xfcd7e1d7 { result := _ELECTION_MODULE } // ElectionModule.nominate()\n case 0xffe7f643 { result := _ELECTION_MODULE } // ElectionModule.getEpochIndex()\n leave\n }\n\n implementation := findImplementation(sig32)\n }\n\n if (implementation == address(0)) {\n revert UnknownSelector(sig4);\n }\n\n // Delegatecall to the implementation contract\n assembly {\n calldatacopy(0, 0, calldatasize())\n\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n returndatacopy(0, 0, returndatasize())\n\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n", + "ast": { + "absolutePath": "contracts/Router.sol", + "exportedSymbols": { + "Router": [ + 58 + ] + }, + "id": 59, + "license": "Unlicense", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.8", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "37:23:0" + }, + { + "abstract": false, + "baseContracts": [], + "canonicalName": "Router", + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 58, + "linearizedBaseContracts": [ + 58 + ], + "name": "Router", + "nameLocation": "451:6:0", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "name": "UnknownSelector", + "nameLocation": "470:15:0", + "nodeType": "ErrorDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "mutability": "mutable", + "name": "sel", + "nameLocation": "493:3:0", + "nodeType": "VariableDeclaration", + "scope": 5, + "src": "486:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 2, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "486:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "src": "485:12:0" + }, + "src": "464:34:0" + }, + { + "constant": true, + "id": 8, + "mutability": "constant", + "name": "_ELECTION_INSPECTOR_MODULE", + "nameLocation": "529:26:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "504:96:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 6, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "504:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307837396631643037336131343933443131326630373734336337383464453831636235363134376435", + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "558:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x79f1d073a1493D112f07743c784dE81cb56147d5" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 11, + "mutability": "constant", + "name": "_ELECTION_MODULE", + "nameLocation": "631:16:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "606:86:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 9, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "606:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307843633632333133443563383861303766614262344262353036333146423133663862463966333933", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "650:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0xCc62313D5c88a07faBb4Bb50631FB13f8bF9f393" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 14, + "mutability": "constant", + "name": "_OWNER_MODULE", + "nameLocation": "723:13:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "698:83:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 12, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "698:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307834443761303938304442354362343834313344433936663738343739326442346231466136384531", + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "739:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x4D7a0980DB5Cb48413DC96f784792dB4b1Fa68E1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 17, + "mutability": "constant", + "name": "_UPGRADE_MODULE", + "nameLocation": "812:15:0", + "nodeType": "VariableDeclaration", + "scope": 58, + "src": "787:85:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 15, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "787:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": { + "hexValue": "307838413536303941313130313831383339353939303634426636624532356464463463423733333536", + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "830:42:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "value": "0x8A5609A110181839599064Bf6bE25ddF4cB73356" + }, + "visibility": "private" + }, + { + "body": { + "id": 23, + "nodeType": "Block", + "src": "907:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 20, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "917:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "917:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 22, + "nodeType": "ExpressionStatement", + "src": "917:10:0" + } + ] + }, + "id": 24, + "implemented": true, + "kind": "fallback", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 18, + "nodeType": "ParameterList", + "parameters": [], + "src": "887:2:0" + }, + "returnParameters": { + "id": 19, + "nodeType": "ParameterList", + "parameters": [], + "src": "907:0:0" + }, + "scope": 58, + "src": "879:55:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 30, + "nodeType": "Block", + "src": "967:27:0", + "statements": [ + { + "expression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27, + "name": "_forward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "977:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "977:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 29, + "nodeType": "ExpressionStatement", + "src": "977:10:0" + } + ] + }, + "id": 31, + "implemented": true, + "kind": "receive", + "modifiers": [], + "name": "", + "nameLocation": "-1:-1:-1", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 25, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:2:0" + }, + "returnParameters": { + "id": 26, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:0" + }, + "scope": 58, + "src": "940:54:0", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 56, + "nodeType": "Block", + "src": "1029:11808:0", + "statements": [ + { + "assignments": [ + 35 + ], + "declarations": [ + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "sig4", + "nameLocation": "1116:4:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1109:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + "typeName": { + "id": 34, + "name": "bytes4", + "nodeType": "ElementaryTypeName", + "src": "1109:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "visibility": "internal" + } + ], + "id": 38, + "initialValue": { + "expression": { + "id": 36, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1123:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "1123:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1109:21:0" + }, + { + "assignments": [ + 40 + ], + "declarations": [ + { + "constant": false, + "id": 40, + "mutability": "mutable", + "name": "implementation", + "nameLocation": "1148:14:0", + "nodeType": "VariableDeclaration", + "scope": 56, + "src": "1140:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 39, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1140:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 41, + "nodeType": "VariableDeclarationStatement", + "src": "1140:22:0" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1182:11095:0", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "1196:27:0", + "value": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1213:3:0", + "type": "", + "value": "224" + }, + { + "name": "sig4", + "nodeType": "YulIdentifier", + "src": "1218:4:0" + } + ], + "functionName": { + "name": "shr", + "nodeType": "YulIdentifier", + "src": "1209:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "1209:14:0" + }, + "variables": [ + { + "name": "sig32", + "nodeType": "YulTypedName", + "src": "1200:5:0", + "type": "" + } + ] + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1280:10930:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1320:5729:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1364:2901:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1412:1489:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1464:728:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "1557:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1559:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1569:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1559:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1541:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1546:10:0", + "type": "", + "value": "0x0166451a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1681:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1683:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1693:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1683:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1665:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1670:10:0", + "type": "", + "value": "0x0438d06e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1804:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1806:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1816:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1806:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1788:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1793:10:0", + "type": "", + "value": "0x086146d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "1920:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1922:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "1932:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "1922:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "1904:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1909:10:0", + "type": "", + "value": "0x09eef43e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2028:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2030:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2040:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2030:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2012:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2017:10:0", + "type": "", + "value": "0x0a8b471a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1505:3:0" + }, + "nodeType": "YulSwitch", + "src": "1498:570:0" + }, + { + "nodeType": "YulLeave", + "src": "2157:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1448:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1452:10:0", + "type": "", + "value": "0x0ebf4796" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1445:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1445:18:0" + }, + "nodeType": "YulIf", + "src": "1442:750:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "2276:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2278:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2288:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2278:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2260:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2265:10:0", + "type": "", + "value": "0x0ebf4796" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2392:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2394:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "2404:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2394:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2376:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2381:10:0", + "type": "", + "value": "0x0f98dfba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2523:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2525:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2535:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2525:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2507:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2512:10:0", + "type": "", + "value": "0x1209644e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2653:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2655:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "2665:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2655:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2637:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2642:10:0", + "type": "", + "value": "0x1627540c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2759:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "2761:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "2771:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "2761:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "2743:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2748:10:0", + "type": "", + "value": "0x205569c2" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2228:3:0" + }, + "nodeType": "YulSwitch", + "src": "2221:578:0" + }, + { + "nodeType": "YulLeave", + "src": "2870:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1396:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1400:10:0", + "type": "", + "value": "0x211de0b4" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1393:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1393:18:0" + }, + "nodeType": "YulIf", + "src": "1390:1511:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "2948:700:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3033:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3035:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3045:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3035:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3017:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3022:10:0", + "type": "", + "value": "0x211de0b4" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3152:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3154:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3164:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3154:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3136:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3141:10:0", + "type": "", + "value": "0x2810e1d6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3255:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3257:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "3267:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3257:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3239:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3244:10:0", + "type": "", + "value": "0x2c3c5ba3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3380:10:0", + "type": "", + "value": "0x33f3f3de" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3519:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3521:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "3531:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3521:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3503:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3508:10:0", + "type": "", + "value": "0x35eb2824" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2985:3:0" + }, + "nodeType": "YulSwitch", + "src": "2978:568:0" + }, + { + "nodeType": "YulLeave", + "src": "3617:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "2932:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "2936:10:0", + "type": "", + "value": "0x362c906d" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "2929:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "2929:18:0" + }, + "nodeType": "YulIf", + "src": "2926:722:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "3724:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3726:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3736:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3726:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3708:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3713:10:0", + "type": "", + "value": "0x362c906d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3831:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3833:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "3843:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3833:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3815:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3820:10:0", + "type": "", + "value": "0x3659cfe6" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "3930:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "3932:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "3942:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "3932:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "3914:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "3919:10:0", + "type": "", + "value": "0x37143233" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4030:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4032:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4042:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4032:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4014:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4019:10:0", + "type": "", + "value": "0x3a3e6c81" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4133:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4135:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4145:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4135:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4117:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4122:10:0", + "type": "", + "value": "0x3ac1c5fe" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "3680:3:0" + }, + "nodeType": "YulSwitch", + "src": "3673:490:0" + }, + { + "nodeType": "YulLeave", + "src": "4238:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1348:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1352:10:0", + "type": "", + "value": "0x447068ef" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1345:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1345:18:0" + }, + "nodeType": "YulIf", + "src": "1342:2923:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4308:1383:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4356:691:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "4441:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4443:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4453:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4443:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4425:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4430:10:0", + "type": "", + "value": "0x447068ef" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4558:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4560:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "4570:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4560:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4542:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4547:10:0", + "type": "", + "value": "0x49aed35c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4694:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4696:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4706:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4696:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4678:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4683:10:0", + "type": "", + "value": "0x4b144674" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "4823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4800:10:0", + "type": "", + "value": "0x4b5dacac" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "4928:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "4930:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "4940:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "4930:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "4912:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4917:10:0", + "type": "", + "value": "0x53a47bb7" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4393:3:0" + }, + "nodeType": "YulSwitch", + "src": "4386:569:0" + }, + { + "nodeType": "YulLeave", + "src": "5016:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4340:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4344:10:0", + "type": "", + "value": "0x54520478" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4337:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4337:18:0" + }, + "nodeType": "YulIf", + "src": "4334:713:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5123:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5125:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5135:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5125:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5107:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5112:10:0", + "type": "", + "value": "0x54520478" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5234:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5236:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5246:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5236:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5218:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5223:10:0", + "type": "", + "value": "0x5a2b3fd7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5337:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5339:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5349:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5339:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5321:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5326:10:0", + "type": "", + "value": "0x606a6b76" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5446:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5448:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "5458:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5448:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5430:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5435:10:0", + "type": "", + "value": "0x624bd96d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5553:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5555:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5565:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5555:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5537:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5542:10:0", + "type": "", + "value": "0x64deab73" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5079:3:0" + }, + "nodeType": "YulSwitch", + "src": "5072:511:0" + }, + { + "nodeType": "YulLeave", + "src": "5664:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "4292:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "4296:10:0", + "type": "", + "value": "0x655aaaca" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "4289:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "4289:18:0" + }, + "nodeType": "YulIf", + "src": "4286:1405:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5734:696:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "5811:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5813:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "5823:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5795:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5800:10:0", + "type": "", + "value": "0x655aaaca" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "5922:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "5924:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "5934:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "5924:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "5906:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5911:10:0", + "type": "", + "value": "0x714d8d0e" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6058:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6060:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6070:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6060:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6042:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6047:10:0", + "type": "", + "value": "0x718fe928" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6162:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6164:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6174:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6164:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6146:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6151:10:0", + "type": "", + "value": "0x793b9a9d" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6297:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6299:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6309:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6299:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6281:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6286:10:0", + "type": "", + "value": "0x796c5c80" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5767:3:0" + }, + "nodeType": "YulSwitch", + "src": "5760:567:0" + }, + { + "nodeType": "YulLeave", + "src": "6403:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "5718:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5722:10:0", + "type": "", + "value": "0x79ba5097" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "5715:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "5715:18:0" + }, + "nodeType": "YulIf", + "src": "5712:718:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "6498:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6500:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "6510:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6500:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6482:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6487:10:0", + "type": "", + "value": "0x79ba5097" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6584:10:0", + "type": "", + "value": "0x7a3bc0ee" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6697:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6699:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6709:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6699:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6681:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6686:10:0", + "type": "", + "value": "0x7d264ccb" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6811:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6813:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "6823:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6813:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6795:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6800:10:0", + "type": "", + "value": "0x82e28473" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "6950:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "6952:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "6962:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "6952:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "6934:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "6939:10:0", + "type": "", + "value": "0x84ae670c" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "6458:3:0" + }, + "nodeType": "YulSwitch", + "src": "6451:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7026:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "1304:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "1308:10:0", + "type": "", + "value": "0x85160425" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "1301:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "1301:18:0" + }, + "nodeType": "YulIf", + "src": "1298:5751:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7088:2732:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7132:1330:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7180:654:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7265:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7267:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7277:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7267:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7249:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7254:10:0", + "type": "", + "value": "0x85160425" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7384:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7386:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7396:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7386:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7368:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7373:10:0", + "type": "", + "value": "0x8625c053" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7500:27:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7502:23:0", + "value": { + "name": "_OWNER_MODULE", + "nodeType": "YulIdentifier", + "src": "7512:13:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7502:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7484:43:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7489:10:0", + "type": "", + "value": "0x8da5cb5b" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7584:10:0", + "type": "", + "value": "0x8f701997" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "7709:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7711:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7721:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7711:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7693:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7698:10:0", + "type": "", + "value": "0x95ff6584" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7217:3:0" + }, + "nodeType": "YulSwitch", + "src": "7210:529:0" + }, + { + "nodeType": "YulLeave", + "src": "7803:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7164:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7168:10:0", + "type": "", + "value": "0x9636f67c" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7161:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7161:18:0" + }, + "nodeType": "YulIf", + "src": "7158:676:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "7910:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "7912:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "7922:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "7912:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7894:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7899:10:0", + "type": "", + "value": "0x9636f67c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8013:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8015:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8025:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8015:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "7997:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8002:10:0", + "type": "", + "value": "0x9a25eaf3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8119:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8121:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8131:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8121:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8103:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8108:10:0", + "type": "", + "value": "0x9a9a8e1a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8225:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8227:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8237:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8227:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8209:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8214:10:0", + "type": "", + "value": "0xa0f42837" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8339:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8341:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8351:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8341:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8323:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8328:10:0", + "type": "", + "value": "0xa25a9f3a" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7866:3:0" + }, + "nodeType": "YulSwitch", + "src": "7859:510:0" + }, + { + "nodeType": "YulLeave", + "src": "8435:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7116:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7120:10:0", + "type": "", + "value": "0xaaf10f42" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7113:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7113:18:0" + }, + "nodeType": "YulIf", + "src": "7110:1352:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8505:712:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "8582:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8584:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "8594:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8584:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8566:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8571:10:0", + "type": "", + "value": "0xaaf10f42" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8689:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8691:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8701:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8691:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8673:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8678:10:0", + "type": "", + "value": "0xaeff252a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8801:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8803:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "8813:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8803:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8785:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8790:10:0", + "type": "", + "value": "0xb55c43d2" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "8925:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "8927:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "8937:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "8927:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "8909:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8914:10:0", + "type": "", + "value": "0xb749be55" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9072:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9074:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9084:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9074:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9056:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9061:10:0", + "type": "", + "value": "0xba9a5b25" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8538:3:0" + }, + "nodeType": "YulSwitch", + "src": "8531:581:0" + }, + { + "nodeType": "YulLeave", + "src": "9190:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "8489:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "8493:10:0", + "type": "", + "value": "0xbb9c0920" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "8486:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "8486:18:0" + }, + "nodeType": "YulIf", + "src": "8483:734:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9285:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9287:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9297:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9287:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9269:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9274:10:0", + "type": "", + "value": "0xbb9c0920" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9385:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9387:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9397:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9387:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9369:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9374:10:0", + "type": "", + "value": "0xc07de0d3" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9488:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9490:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9500:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9490:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9472:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9477:10:0", + "type": "", + "value": "0xc14d0528" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9595:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9597:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "9607:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9597:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9579:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9584:10:0", + "type": "", + "value": "0xc5798523" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9710:29:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9712:25:0", + "value": { + "name": "_UPGRADE_MODULE", + "nodeType": "YulIdentifier", + "src": "9722:15:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9712:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9694:45:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9699:10:0", + "type": "", + "value": "0xc7f62cda" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9245:3:0" + }, + "nodeType": "YulSwitch", + "src": "9238:501:0" + }, + { + "nodeType": "YulLeave", + "src": "9797:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "7072:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "7076:10:0", + "type": "", + "value": "0xca80a2ed" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "7069:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "7069:18:0" + }, + "nodeType": "YulIf", + "src": "7066:2754:0" + }, + { + "body": { + "nodeType": "YulBlock", + "src": "9859:1360:0", + "statements": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9903:681:0", + "statements": [ + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "9980:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "9982:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "9992:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "9982:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "9964:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9969:10:0", + "type": "", + "value": "0xca80a2ed" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10109:40:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10111:36:0", + "value": { + "name": "_ELECTION_INSPECTOR_MODULE", + "nodeType": "YulIdentifier", + "src": "10121:26:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10111:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10093:56:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10098:10:0", + "type": "", + "value": "0xcce32c52" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10245:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10247:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10257:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10247:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10229:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10234:10:0", + "type": "", + "value": "0xce04e44c" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10354:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10356:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10366:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10356:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10338:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10343:10:0", + "type": "", + "value": "0xd11801cf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10464:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10466:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10476:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10466:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10448:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10453:10:0", + "type": "", + "value": "0xd82f25f0" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9936:3:0" + }, + "nodeType": "YulSwitch", + "src": "9929:565:0" + }, + { + "nodeType": "YulLeave", + "src": "10557:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9887:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9891:10:0", + "type": "", + "value": "0xd83eb231" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9884:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9884:18:0" + }, + "nodeType": "YulIf", + "src": "9881:703:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "10652:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10654:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10664:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10654:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10636:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10641:10:0", + "type": "", + "value": "0xd83eb231" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10752:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10754:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10764:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10754:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10736:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10741:10:0", + "type": "", + "value": "0xd9617851" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10883:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10885:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "10895:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10885:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10867:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10872:10:0", + "type": "", + "value": "0xdfe7cd3a" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "10993:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "10995:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11005:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "10995:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "10977:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "10982:10:0", + "type": "", + "value": "0xe1509015" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11105:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11107:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11117:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11107:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11089:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11094:10:0", + "type": "", + "value": "0xe327b585" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "10612:3:0" + }, + "nodeType": "YulSwitch", + "src": "10605:530:0" + }, + { + "nodeType": "YulLeave", + "src": "11196:5:0" + } + ] + }, + "condition": { + "arguments": [ + { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "9843:3:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "9847:10:0", + "type": "", + "value": "0xe420d7f9" + } + ], + "functionName": { + "name": "lt", + "nodeType": "YulIdentifier", + "src": "9840:2:0" + }, + "nodeType": "YulFunctionCall", + "src": "9840:18:0" + }, + "nodeType": "YulIf", + "src": "9837:1382:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "11279:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11281:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11291:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11281:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11263:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11268:10:0", + "type": "", + "value": "0xe420d7f9" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11391:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11393:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11403:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11393:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11375:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11380:10:0", + "type": "", + "value": "0xe9544a51" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11504:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11506:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11516:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11506:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11488:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11493:10:0", + "type": "", + "value": "0xedc968ba" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11605:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11607:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11617:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11607:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11589:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11594:10:0", + "type": "", + "value": "0xee695137" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11713:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11715:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11725:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11715:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11697:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11702:10:0", + "type": "", + "value": "0xf2516dbf" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11815:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11817:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11827:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11817:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11799:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11804:10:0", + "type": "", + "value": "0xf2e56dea" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "11911:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "11913:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "11923:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "11913:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "11895:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "11900:10:0", + "type": "", + "value": "0xf675fa62" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12018:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12020:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12030:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12020:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12002:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12007:10:0", + "type": "", + "value": "0xfcd7e1d7" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12110:30:0", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "12112:26:0", + "value": { + "name": "_ELECTION_MODULE", + "nodeType": "YulIdentifier", + "src": "12122:16:0" + }, + "variableNames": [ + { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12112:6:0" + } + ] + } + ] + }, + "nodeType": "YulCase", + "src": "12094:46:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12099:10:0", + "type": "", + "value": "0xffe7f643" + } + } + ], + "expression": { + "name": "sig", + "nodeType": "YulIdentifier", + "src": "11243:3:0" + }, + "nodeType": "YulSwitch", + "src": "11236:904:0" + }, + { + "nodeType": "YulLeave", + "src": "12191:5:0" + } + ] + }, + "name": "findImplementation", + "nodeType": "YulFunctionDefinition", + "parameters": [ + { + "name": "sig", + "nodeType": "YulTypedName", + "src": "1265:3:0", + "type": "" + } + ], + "returnVariables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "1273:6:0", + "type": "" + } + ], + "src": "1237:10973:0" + }, + { + "nodeType": "YulAssignment", + "src": "12224:43:0", + "value": { + "arguments": [ + { + "name": "sig32", + "nodeType": "YulIdentifier", + "src": "12261:5:0" + } + ], + "functionName": { + "name": "findImplementation", + "nodeType": "YulIdentifier", + "src": "12242:18:0" + }, + "nodeType": "YulFunctionCall", + "src": "12242:25:0" + }, + "variableNames": [ + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12224:14:0" + } + ] + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "10121:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2040:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2535:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "2771:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "3267:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "4570:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "5934:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6174:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "6823:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "8937:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9084:26:0", + "valueSize": 1 + }, + { + "declaration": 8, + "isOffset": false, + "isSlot": false, + "src": "9992:26:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10257:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10366:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10476:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10664:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10764:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "10895:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11005:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11117:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11291:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11516:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11617:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11725:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11827:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "11923:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12030:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "12122:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1569:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1693:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1816:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "1932:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2288:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "2404:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3045:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3164:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3403:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3736:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "3942:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4042:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4145:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4453:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4706:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "4823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5135:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5246:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5349:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5565:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "5823:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6309:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6709:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "6962:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7277:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7396:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7607:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7721:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "7922:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8025:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8131:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8237:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8351:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8701:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "8813:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9297:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9397:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9500:16:0", + "valueSize": 1 + }, + { + "declaration": 11, + "isOffset": false, + "isSlot": false, + "src": "9607:16:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "2665:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "3531:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "4940:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "5458:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6070:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "6510:13:0", + "valueSize": 1 + }, + { + "declaration": 14, + "isOffset": false, + "isSlot": false, + "src": "7512:13:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "3843:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "8594:15:0", + "valueSize": 1 + }, + { + "declaration": 17, + "isOffset": false, + "isSlot": false, + "src": "9722:15:0", + "valueSize": 1 + }, + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12224:14:0", + "valueSize": 1 + }, + { + "declaration": 35, + "isOffset": false, + "isSlot": false, + "src": "1218:4:0", + "valueSize": 1 + } + ], + "id": 42, + "nodeType": "InlineAssembly", + "src": "1173:11104:0" + }, + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 48, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 43, + "name": "implementation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "12291:14:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 46, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12317:1:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12309:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 44, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12309:7:0", + "typeDescriptions": {} + } + }, + "id": 47, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12309:10:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12291:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 54, + "nodeType": "IfStatement", + "src": "12287:87:0", + "trueBody": { + "id": 53, + "nodeType": "Block", + "src": "12321:53:0", + "statements": [ + { + "errorCall": { + "arguments": [ + { + "id": 50, + "name": "sig4", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "12358:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 49, + "name": "UnknownSelector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "12342:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_error_pure$_t_bytes4_$returns$__$", + "typeString": "function (bytes4) pure" + } + }, + "id": 51, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12342:21:0", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 52, + "nodeType": "RevertStatement", + "src": "12335:28:0" + } + ] + } + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "12448:383:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12475:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12478:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12481:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12481:14:0" + } + ], + "functionName": { + "name": "calldatacopy", + "nodeType": "YulIdentifier", + "src": "12462:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12462:34:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12462:34:0" + }, + { + "nodeType": "YulVariableDeclaration", + "src": "12510:74:0", + "value": { + "arguments": [ + { + "arguments": [], + "functionName": { + "name": "gas", + "nodeType": "YulIdentifier", + "src": "12537:3:0" + }, + "nodeType": "YulFunctionCall", + "src": "12537:5:0" + }, + { + "name": "implementation", + "nodeType": "YulIdentifier", + "src": "12544:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12560:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "calldatasize", + "nodeType": "YulIdentifier", + "src": "12563:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12563:14:0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12579:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12582:1:0", + "type": "", + "value": "0" + } + ], + "functionName": { + "name": "delegatecall", + "nodeType": "YulIdentifier", + "src": "12524:12:0" + }, + "nodeType": "YulFunctionCall", + "src": "12524:60:0" + }, + "variables": [ + { + "name": "result", + "nodeType": "YulTypedName", + "src": "12514:6:0", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12612:1:0", + "type": "", + "value": "0" + }, + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12615:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12618:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12618:16:0" + } + ], + "functionName": { + "name": "returndatacopy", + "nodeType": "YulIdentifier", + "src": "12597:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12597:38:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12597:38:0" + }, + { + "cases": [ + { + "body": { + "nodeType": "YulBlock", + "src": "12682:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12707:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12710:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12710:16:0" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "12700:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12700:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12700:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12675:66:0", + "value": { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12680:1:0", + "type": "", + "value": "0" + } + }, + { + "body": { + "nodeType": "YulBlock", + "src": "12762:59:0", + "statements": [ + { + "expression": { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "12787:1:0", + "type": "", + "value": "0" + }, + { + "arguments": [], + "functionName": { + "name": "returndatasize", + "nodeType": "YulIdentifier", + "src": "12790:14:0" + }, + "nodeType": "YulFunctionCall", + "src": "12790:16:0" + } + ], + "functionName": { + "name": "return", + "nodeType": "YulIdentifier", + "src": "12780:6:0" + }, + "nodeType": "YulFunctionCall", + "src": "12780:27:0" + }, + "nodeType": "YulExpressionStatement", + "src": "12780:27:0" + } + ] + }, + "nodeType": "YulCase", + "src": "12754:67:0", + "value": "default" + } + ], + "expression": { + "name": "result", + "nodeType": "YulIdentifier", + "src": "12656:6:0" + }, + "nodeType": "YulSwitch", + "src": "12649:172:0" + } + ] + }, + "evmVersion": "london", + "externalReferences": [ + { + "declaration": 40, + "isOffset": false, + "isSlot": false, + "src": "12544:14:0", + "valueSize": 1 + } + ], + "id": 55, + "nodeType": "InlineAssembly", + "src": "12439:392:0" + } + ] + }, + "id": 57, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_forward", + "nameLocation": "1009:8:0", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 32, + "nodeType": "ParameterList", + "parameters": [], + "src": "1017:2:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [], + "src": "1029:0:0" + }, + "scope": 58, + "src": "1000:11837:0", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 59, + "src": "442:12397:0", + "usedErrors": [ + 5 + ] + } + ], + "src": "37:12803:0" + } + } +} \ No newline at end of file